Footnote rendering issue: large page breaks after converting DOCX to PDF

Hi
Aspose.Words v24.2

When converting a DOCX file containing footnotes (references) to PDF using Aspose.Words, the resulting PDF is rendered incorrectly. Specifically, after a footnote is inserted, a large page break appears, leaving a significant empty space until the end of the page. This breaks the normal flow of the document and makes the PDF layout unusable for our purposes.

Could you please advise how to fix or avoid this issue?
We are using the following workflow:

  1. Create or edit a DOCX document in Microsoft Word with standard footnotes.
  2. Convert the document to PDF using Aspose.Words (24.2).
  3. The generated PDF file shows unnecessary page breaks after the footnotes.
var doc = new Word.Document("test.docx");
var opt = new Word.Saving.PdfSaveOptions();
opt.ExportDocumentStructure = true;
doc.Save("test.pdf", opt);

Sample of file docx and resut pdf -file:
test.zip (68.9 KB)

@PoweRDeaD

Cause

The issue you’re experiencing with large page breaks after footnotes when converting DOCX to PDF using Aspose.Words is likely related to the formatting of the footnotes or how the document structure is interpreted during the conversion process. This can lead to unexpected layout results in the generated PDF.

Solution

To resolve this issue, adjust the PdfSaveOptions settings. Specifically, experiment with the OptimizeOutput property, which can enhance the layout of the PDF. Additionally, ensure that the footnote formatting in your DOCX file is standard and free from any unusual settings that might affect the conversion.

Here’s a modified version of your code that includes the OptimizeOutput option:

var doc = new Word.Document("test.docx");
var opt = new Word.Saving.PdfSaveOptions
{
    ExportDocumentStructure = true,
    OptimizeOutput = true // This will help with layout issues
};
doc.Save("test.pdf", opt);

Next Steps

  1. Update your code with the suggested changes.
  2. Test the conversion again to see if the page breaks issue is resolved.
  3. If the problem persists, check the footnote settings in your original DOCX file for any irregularities.

Please implement these changes and let me know if it resolves the issue!

The proposed changes did not solve the problem.

@PoweRDeaD The problem is not reproducible on my side using the latest 25.7 version of Aspose.Words. Here is the output produced on my side: out.pdf (39.0 KB)

As I can see you are using an old 24.2 version of Aspose.Words. Please try using the latest 25.7 version of Aspose.Words and let us know if the problem still persists on your side.

…But I only have a license for 24.2

@PoweRDeaD I am afraid, all fixes are provided with new versions of Aspose.Words. We do not provide patches or fixes for old versions of Aspose.Words.
Every Aspose license provides a 1-year subscription for free upgrades to any new Aspose.Words version that comes out.

You can check the license expiration date by opening the license file in Notepad (but take care not to modify and save the license file or it will no longer work) and checking the SubscriptionExpiry field. For example:

<SubscriptionExpiry>20220218</SubscriptionExpiry>

It means that you can free upgrade to version of Aspose.Words published before 02/18/2022.