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

Free Support Forum - aspose.com

Combining characters are overlapped after conversion from rtf to pdf

Hi,

We convert MS Office documents to PDF or image files using Aspose.Words for .NET. Currently we use version 18.1 and we found the regression in comparison with version 17.7.

We convert files to PDF by the following code:

Document wordDocument = new Document(contentStream);

// Get all comments
var comments = wordDocument.GetChildNodes(NodeType.Comment, true);

// Remove all comments
comments.Clear();

wordDocument.FieldOptions.FieldUpdateCultureSource = Aspose.Words.Fields.FieldUpdateCultureSource.FieldCode;

wordDocument.LayoutOptions.IsShowHiddenText = false;
wordDocument.LayoutOptions.IsShowParagraphMarks = false;
wordDocument.LayoutOptions.RevisionOptions.ShowOriginalRevision = false;
wordDocument.LayoutOptions.RevisionOptions.ShowRevisionBalloons = false;
wordDocument.LayoutOptions.RevisionOptions.ShowRevisionBars = false;
wordDocument.LayoutOptions.RevisionOptions.ShowRevisionMarks = false;

wordDocument.UpdateFields();

wordDocument.Save(outputStream, SaveFormat.Pdf);

In attached ZIP I placed source RTF and resulting PDFs produced by Aspose.Words of different versions. Please compare line 1 at page 2 in PDFs. This line in PDF produced by version 17.7 is looked correctly, but in files produced by versions 18.2 and 18.9 characters in this line are overlapped.

So this regression appeared between versions 17.7 and 18.1.

Thanks,
Roman

Files.zip (569.1 KB)

@cap.aspose

Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you’re converting documents to PDF. Please refer to the following article:

How Aspose.Words Uses True Type Fonts

If you still face problem, please ZIP and attach the fonts (‘Cordia New’, ‘Courier New CYR’, and ‘Cambria Math’) here for testing. We will investigate the issue and provide you more information about your query.

Hi,

Thank you for the link on article.

I installed all the fonts that are used in RTF document, and made conversion again. The issue is still reproduced in version 18.1 and in latest version 19.1. But it is not reproduced in version 17.7 in the same environment.

I attached ZIP with the files, fonts and screenshot on which the issue is shown.

In the attached ZIP:

Languages and Symbols.rtf - initial RTF file;
Languages and Symbols.rtf.17.7.pdf - file, generated by Words version 17.7;
Languages and Symbols.rtf.18.1.pdf - file, generated by Words version 18.1;
Languages and Symbols.rtf.19.1.pdf - file, generated by Words version 19.1;
ComparisonScreenshot.png - screenshot on which the difference is marked by green and red lines;
TTFonts - folder with the fonts, which MS Word uses for producing PDF file.

Thanks,
Roman

Sorry I forgot to attach ZIP.

FilesWithFonts.zip (8.5 MB)

@cap.aspose

Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-18110. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-18110) have been fixed in this Aspose.Words for .NET 19.4 update and this Aspose.Words for Java 19.4 update.