Aspose.PSD for .NET 24.7 (MSI) delivers important improvements for developers working with .AI files and text in their C# applications. Additionally, the issues that previously caused incorrect text rendering in exported PDFs have been fixed.
Reliable AI and Text Rendering in PDFs
This update to the .NET PSD library guarantees accurate text rendering in exported PDF documents to eliminate the previous rendering issues.
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*
Improved AI File Processing
Handle AI files more effectively within your PSD manipulation C# apps as we have optimized the functionality of converting .AI files to JPG format.
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*
Enhanced Font Loading
Aspose.PSD for .NET (v24.7) manages font loading more reliably and improves overall application stability. The issues preventing fonts from loading correctly when using Aspose.Drawing have been addressed in this version.
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*
Large JPEG Smart Object Handling
Creating smart object layers using large JPEG images is easier than ever owing to the resolution of the issues causing an overflow error during this process earlier.
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
- Fixed an issue causing an “Image loading failed” exception when opening AI documents (PSDNET-1029).
- Resolved an error causing image export failures on Linux (PSDNET-2061).
- Improved handling of AI files by managing layers within content stream operators (PSDNET-2100).
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.