Large table header is showing only is last page

Large table on my PDF document is breaking in pages correctly.
However, header appears only in last page of the PDF

I am converting HTML to PDF

Any help please?


Would you kindly share your sample HTML with us. We will test the scenario in our environment and address it accordingly.

I have attached HTML file and created PDF (1.1 KB) - HTML file zip
Article.pdf (69.4 KB) - PDF created from browser
Article-aspose.pdf (88.1 KB) - PDF created using Aspose.Pdf


We were able to notice the issue in our environment while testing the scenario using Aspose.PDF for .NET 20.3 and following code snippet.

StringBuilder htmlPage = new StringBuilder();
htmlPage.Append(File.ReadAllText(dataDir + "Article.html"));
byte[] bytes = Encoding.UTF8.GetBytes(htmlPage.ToString());
var streamHtml = new MemoryStream(bytes);
var objLoadOptions = new Aspose.Pdf.HtmlLoadOptions();
// Set Page Margins
objLoadOptions.PageInfo.Margin = new MarginInfo(0, 0, 0, 0);
// You can also set Page Height/Widht
objLoadOptions.PageInfo.Height = PageSize.PageLetter.Width;
objLoadOptions.PageInfo.Width = PageSize.PageLetter.Height;
var doc = new Aspose.Pdf.Document(streamHtml, objLoadOptions);
doc.Save(dataDir + "out20.3.pdf");

Hence, we have logged an issue as PDFNET-47928 in our issue tracking system for the sake of correction. We will further look into details of it and keep you informed with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.

Any updates?

Is there any ETA for the fix?


The earlier logged ticket is still pending for analysis due to other high priority issues logged prior to it. Please note that the ticket was logged under free support model and will be resolved on first come first serve basis. We will surely inform you as soon as we have certain updates regarding ETA or resolution. Please spare us some time.

We are sorry for the inconvenience.

We have recently bought the Aspose.Total license for converting PDF.

This is the only change pending with our release.

Is there any quick fix for this, using Aspose.HTML or anything on your mind?

It would be a great help. Thanks


We regret to share that we cannot offer any quick fix at the moment as issue is still pending for analysis. However, you can please try converting HTML to DOCX and then PDF using Aspose.Words. Please consider using following code snippet:

//Load the docuemnt. 
Document doc = new Document(MyDir + @"Input.html");
//Save the document.
doc.Save(MyDir + @"output.docx", SaveFormat.Docx);

and Convert Document to PDF article.

The issues you have found earlier (filed as PDFNET-47928) have been fixed in Aspose.PDF for .NET 23.3.