Great news for .NET developers! Aspose.PSD for .NET 24.7 (DLLs-only) has been released, and it brings useful enhancements for developers working with Adobe Illustrator (.AI) files in their platform-independent C# applications.
Efficient AI and Text Rendering in PDF Documents
With the latest update to the .NET PSD library, developers can ensure accurate text rendering in exported PDFs to remove the previous rendering problems.
C# code example:
string src = Path.Combine(baseFolder, "CVFlor.psd");
string output = Path.Combine(outputFolder, "output.pdf");
using (var psdImage = (PsdImage)Image.Load(src))
{
PdfOptions saveOptions = new PdfOptions();
saveOptions.PdfCoreOptions = new PdfCoreOptions();
psdImage.Save(output, saveOptions);
}
Source*
Optimized AI File Processing
You can now handle AI files more effectively in your cross-platform PSD manipulation C# apps owing to the improved .AI to JPG format conversion functionality.
C# code example:
string sourceFile = Path.Combine(baseFolder, "aaa.ai");
string outputFile = Path.Combine(outputFolder, "aaa.png");
using (AiImage image = (AiImage)Image.Load(sourceFile))
{
image.Save(outputFile, new PngOptions());
}
Source*
Empowered Font Loading
Aspose.PSD for .NET (v24.7) lets you manage font loading more reliably and enhances overall product stability. The problems related to incorrect font loading while using Aspose.Drawing are addressed in this release.
C# code example:
using (var installedFonts = new System.Drawing.Text.InstalledFontCollection())
{
Console.WriteLine("- Before update. Installed fonts count: " + installedFonts.Families.Length);
Console.WriteLine("- Platform: " + Environment.OSVersion.Platform.ToString());
Console.WriteLine("- Refresh the font cache by trying to get the Adobe font name for 'Arial': "
FontSettings.GetAdobeFontName("Arial"));
Console.WriteLine("- After update. Installed fonts count: " + installedFonts.Families.Length);
Assert.Greater(installedFonts.Families.Length, 1);
}
Source*
Better Handling of Large JPEG Smart Objects
Easily creating smart object layers using large JPEG images as we have resolved the issues causing an overflow error during this process in earlier versions.
C# code example:
string srcFile = Path.Combine(baseFolder, "source.psd");
string imageJpg = Path.Combine(baseFolder, "test.jpg");
using (var image = (PsdImage)Image.Load(srcFile, new PsdLoadOptions { DataRecoveryMode = DataRecoveryMode.MaximalRecover }))
{
using (var stream = new FileStream(imageJpg, FileMode.Open))
{
var addedLayer = new SmartObjectLayer(stream);
addedLayer.Name = "Test Layer";
image.AddLayer(addedLayer);
}
}
Source*
Other Updates and Fixes
- Improved handling of AI files by managing layers within content stream operators (PSDNET-2100).
- Resolved an error causing image export failures on Linux (PSDNET-2061).
- Fixed an issue causing an “Image loading failed” exception when opening AI documents (PSDNET-1029).
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.PSD for .NET 24.7 Release Notes.