We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Mis-aligned Repeated Table Headers in PDF Export

I’m generating tables in a word document programatically but getting some undesirable results. Could you assist in identifying why PDF output of these tables results in some misaligned table headers? I’ve attached a zip of a console app which reproduces the problem. I’m using Aspose.Words for .NET version 18.5. The problem also exists in version 18.4.

If you review the attached test.pdf you can see fowled headers on most pages. Some are small glitches in the background coloring such as those on pages 5 and 6. Other times, the top row gets a double bottom border such as on page 5. However, in the most egregious cases the table borders for the repeated row don’t even appear around the header row and the table is pushed down too far such as on on pages 15 and 19 like so image.png (10.7 KB).

test.pdf (272.0 KB)
BadHeadersDemo.zip (77.3 KB)


Please run the code on your end and provide us the following files here for further testing:

  • Aspose.Words generated “test-out.docx
  • Aspose.Words generated “test.pdf
  • Convert (Save As) above “test-out.docx” to PDF by using MS Word and share the MS Word generated PDF.

As soon as you get these pieces of information ready, we will start further investigation into your issue and provide you more information. Thanks for your cooperation.

Thank you for your rapid response. I’ve attached your requested documents hereindex.zip (3.2 MB).

In addition to the “Save as” conversion, i also went ahead and included copies generated via the Microsoft Print to PDF file printer due to this Microsoft known bug.

I couldn’t attach the docx directly so i just zipped everything as one. The zip contains the following files

Identifies the files’ origins.

The original word document. Orientation is supposed to be landscape but MSWord 2016 has a bug which prevents saving the file to PDF when this is the case.

The Aspose.Words v18.5 generated Word document with many tables added

The Aspose.Words v18.5 generated PDF from test.docx with many tables
added programmatically.

A pdf generated from test.docx with many tables added programmatically
then printed to Microsoft’s “Microsoft Print to PDF” printer from
within Aspose.Words v18.5.

test-out.docx converted to PDF using Microsoft Word “Save as”

test-out.docx converted to PDF using Microsoft Word printing to
Microsoft’s “Microsoft Print to PDF” printer.


Thanks for the details. We tested the scenario and have managed to reproduce the same problems on our end. For the sake of correction, we have logged this in our issue tracking system. The ID of this issue is WORDSNET-16944. We will further look into the details of this issue and will keep you updated on the status of correction. We apologize for your inconvenience.