Hello,
I have a formatting issue with a document when converting it from rtf to pdf.
First I used Aspose.Words 21.3.0 and then updated to 24.8.0 i still have the same issue.
Code:
Aspose.Words.Loading.LoadOptions loadOptions = new Aspose.Words.Loading.LoadOptions();
loadOptions.LoadFormat = Aspose.Words.LoadFormat.Rtf;
var doc = new Aspose.Words.Document(inputMemStream, loadOptions);
// Test via external folder to check if font cannot be loaded throw OS
FontSettings fontSettings = new FontSettings();
fontSettings.SetFontsFolder(@"C:\Temp\Fonts\", true);
doc.FontSettings = fontSettings;
//
doc.WarningCallback = warningCallback;
// Test if this fixes formatting before save
doc.UpdateFields();
doc.Save(outputMemStream, Aspose.Words.SaveFormat.Pdf);
Warning callback gives this Error:
There are known issues with “Through” text wrapping type. Wrapped content could be rendered differently. At Shape Id:1025 ‘’, Paragraph 1, Section 1
And it is MinorFormattingLoss type.
I don’t get any Font Substitution warning (even tho it seems it could be a Font issue )
When I open rtf with ms word is like this image
The font is ‘Courier New’ where the format issue is located.
On your site
https://products.aspose.app/pdf/conversion/rtf-to-pdf
The conversion rtf to pdf is executed without any (formatting) problem.
I attach the file (aspose-app-convertion.pdf)
aspose-app-convertion.pdf (26.0 KB)
But on this site
https://products.aspose.com/words/net/conversion/rtf-to-pdf/
It has the same formatting problem.
I attach the file (aspose-words-convertion.pdf)
aspose-words-convertion.pdf (18.3 KB)
I attach the original rtf file too (test-RTF2.rtf) and also a picture of how i see it in MS word (test-RTF2-MSWord.png)
test-RTF2.7z (7.4 KB)
Could you help me out with this problem?