Hi Team,
The total page count is mismatched when converting a Word document to a PDF document.
38page.docx (25.8 KB)
The original word document has 38 pages. But the converted PDF document has only 37 pages.
output.pdf (89.7 KB)
Code sample:
pdfConvertOptions = document.GetPdfConvertOptions();
document.Content.Seek(0, SeekOrigin.Begin);
using var outputPdfStream = new MemoryStream();
using var converter = new Converter(() => document.Content);
converter.Convert(() => outputPdfStream, pdfConvertOptions);
var outputStream = new MemoryStream(outputPdfStream.ToArray());
Could you please check and advise to resolve it? Please find attachments of source and converted documents.
@leovdr1
We tried to reproduce this issue (getting 37 pages in the resultant PDF). Please take a look at this screenshot -
image.png (7.4 KB). MS Word shows 37 out of 37 pages and Libre Office shows 36 out of 36 pages. Could you please clarify this?
When I open the document in MS-word it shows the page count as 38.
What version of MS Word you are using?
image.png (3.5 KB)
@leovdr1
Sorry for the inconvenience. There was some issue at our end. However, this issue is reproduced at our end. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CONVERSIONNET-6802
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Thanks and we would like to know if there is any planned date of release for this issue?
@leovdr1
This ticket is currently under investigation. We’ll notify you as soon as we have an ETA for the fix.
@leovdr1
The difference is due to “Aptos” font. It is a Microsoft Office cloud font (Cloud fonts in Office - Microsoft Support). API does not download Office cloud fonts by itself and also do not use cloud fonts by default. If a font is not found in the system fonts during the conversion, it is substituted by default font. That is the case here.
As a workaround you can install the missing font(s). If Conversion is used on a machine where MS Word is installed, MS Office cloud fonts folder “%USERPROFILE%\AppData\Local\Microsoft\FontCache\4\CloudFonts” could be added to font sources.
Also it’s possible to add Aptos fonts in a custom folder and to add it to font sources.
var settings = new ConverterSettings();
settings.FontDirectories.Add("some font folder");