PDF and Docx different

Hi,
I have a template docx file with two columns layout. When the document is saved as docx it corresponds exactly to the template.

Docx save:

//Docx Save Options
OoxmlSaveOptions ooxmlSaveOptionsDoc = new OoxmlSaveOptions()
{
    SaveFormat = GetSaveFormatByType(saveType),
    Compliance = OoxmlCompliance.Iso29500_2008_Transitional,
};
wordDocument.CompatibilityOptions.OptimizeFor(Aspose.Words.Settings.MsWordVersion.Word2016);
//Save Document
wordDocument.Save(outputStream, ooxmlSaveOptionsDoc);

PDF save:

//Pdf Save Options
PdfSaveOptions pso = new PdfSaveOptions()
{
    SaveFormat = GetSaveFormatByType(saveType),
    ImageCompression = PdfImageCompression.Jpeg,
    JpegQuality = 50,
    TextCompression = PdfTextCompression.Flate,
    FontEmbeddingMode=PdfFontEmbeddingMode.EmbedNonstandard,
};
wordDocument.CompatibilityOptions.OptimizeFor(Aspose.Words.Settings.MsWordVersion.Word2016);
//Save Document
wordDocument.Save(outputStream,pso);

As a PDF, the page break of the second column is further down and therefore it has more words on the first page and no longer corresponds to the template. What should the code look like so that docx and pdf are the same? Thank you very much for your help.
Kind regards
Beat

@dendrobates Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.

@alexey.noskov Thanks for your help. Here are the files. Could it be the difference is because of the footnote? If yes what is the best way to have it both the same, pdf and docx.

1003_Information_Brochure_on_Lorem.docx (35.6 KB)
1003_Information_Brochure_on_Lorem.pdf (44.7 KB)

@dendrobates Lato and LLB Sans Standard fonts used in your source document are not available on my side. Could please also attach these fonts here? Font substitution upon building document layout might lead into document layout differences.

Hi Alexey
I found Lato in my system but LLB Sans Standard I could not find. Here is the Download Link Lato Schriftart - 1001 Free Fonts

I have changed the font to Arial. The problem still exists. Here are the documents in Arial for easier testing:

1003_Information_Brochure_on_Lorem.pdf (16.9 KB)
1003_Information_Brochure_on_Lorem.docx (35.7 KB)

@dendrobates Thank you for additional information. I have managed to reproduce the problem on my side. For a sake of correction it has been logged as WORDSNET-24636. We will keep you informed and let you know once it is resolved.

@alexey.noskov Thanks a lot for your help and I wish you a nice weekend.

1 Like