Hi.
I encountered an unexpected behavior when converting from docx to pdf: the style for the list marker changes on a linux system (Oracle Linux Server 8.8). Markers do not change if I perform the conversion in the Windows system.
Here is my code:
private byte[] WordToPdf(byte[] file)
{
using (var pdfDocStream = new MemoryStream())
using (var stream = new MemoryStream(file))
{
var wordDoc = new Aspose.Words.Document(stream);
wordDoc.Save(pdfDocStream, Aspose.Words.SaveFormat.Pdf);
return pdfDocStream.ToArray();
}
}
In the attachment file examples
bullet list problem.zip (98.8 KB)
@asposeuuups The problem on your side might occur because the fonts used in your input document are not available on the machine where document is converted to PDF. The fonts are required to render document. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout and appearance differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/
To render bullets Symbol
and Wingdings
symbolic fonts are used on Windows machine, but in the PDF produced on Linux machine you have attached Webdings
font is used. This cases the difference.
1 Like