We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Distorted output with SystemFontsNativeRendering and rotated PDFs

Hi!


I am currently evaluating the possibility to use the SystemFontsNativeRendering RenderingOption of Aspose.PDF. However, in the following scenario Aspose.PDF 8.3.0 generates distorted output:

1. Create a landscape PDF using MS Word 2007.
2. Rotate it using Aspose.PDF PageEditor.
3. Convert it to Postscript using Aspose.PDF PdfViewer using the SystemFontsNativeRendering RenderingOption.

To reproduce the problem, please consider the following example code and the attached PDF:

static void Main (string[] args)
{
SetLicense ();

var inputPath = @"…\SimpleLandscapeWord.pdf";
var outputPath = @"…\SimpleLandscapeWord.ps";

FontRepository.Substitutions.Add (new SystemFontsSubstitution (SubstitutionFontCategories.AllEmbeddedFonts));

using (var pageEditor = new PdfPageEditor())
using (var viewer = new PdfViewer ())
using (var editorStream = new MemoryStream())
{
pageEditor.BindPdf (inputPath);
pageEditor.Rotation = 90;
pageEditor.Save(editorStream);

viewer.BindPdf (editorStream);

viewer.RenderingOptions.SystemFontsNativeRendering = true;

var printerSettings = new PrinterSettings { PrintFileName = outputPath, PrintToFile = true, PrinterName = “PdfToPostscriptConverter” };

var pageSettings = new PageSettings
{
PaperSize = new PaperSize (“A4”, 827, 1170),
Margins = new Margins (0, 0, 0, 0),
PrinterSettings = printerSettings
};

viewer.PrintDocumentWithSettings (pageSettings, printerSettings);
viewer.Close ();
}
}

Kind regards,
Thomas

Hi there,


Sorry for the inconvenience faced. While using the latest version of Aspose.Pdf for NET 8.3.0, I've managed to reproduce this issue on my side and logged the issue in our bug tracking system as PDFNEWNET-35725 for further investigation and resolution. I've also linked your request to this issue and you will be notified via this thread as soon as it is resolved.


Please feel free to contact us for any further assistance.


Best Regards,