Wrong behavior on saving as PDF

I’m using an existing .docx to generate a document, which I am saving as PDF as a result. In the document I use an existing table in which I add rows based on input data.

As far as I see, everything is replaced correctly in the table. If I save the document as DOCX, I also get the completely correct result.

But if I save the document as PDF, the last row of the last table in the document appears as it was not processed.

Code to save:

Output in PDF:

Can anyone help me on this?

@sysmgr42 Do you call Document.UpdatePageLayout method in your code? If so, please try calling Document.UpdatePageLayout method right before saving the document to PDF.

Wow, it was that easy … thank you very much for your help. it works now.

1 Like