Detect page overflow using Aspose.PDF

I am creating a document from scratch. I am adding rows to a table and at some point the row will cause a page overflow and will not show on the page. I only see one page containing partial output.

Hi Lawrence,


Thanks for contacting support.

You might have set table1.IsBroken = true; so that table breaks/truncated when it reaches page end. However, can you please share the code snippet so that we can test the scenario in our environment. We are sorry for this inconvenience.

I have attached command line source code that will create a PDF file. In the code I have marked where I attempted to get page overflow to have document create next page. I have marked these lines with the following comment.

// does not work



Table and Row isbroken methods do not appear to work.



Also, I have a question about when one should use the Aspose.Pdf.Generator class. I kept getting messages that it will be obsoleted. I created my document entirely using Aspose.Pdf class.

Hi Lawrence,


Thanks for sharing your source code. We have managed to replicate the issue and logged it as PDFNEWNET-37741 in our issue tracking system for further investigation and resolution. We have already noticed a similar issue with HtmlFragment object and it is fixed in upcoming version of API i.e. 9.8.0. Hopefully you issue will be resolved in result of that fix. We will test your scenario with it and will update you our findings.

Moreover, please note Aspose.Pdf.Generator is old generator and is not recommend to use as it would be obsolete very soon. We are migrating it to new generator (Aspose.Pdf.Document) along with fixing issues of old generator in new one.

We are sorry for the inconvenience caused.

Best Regards,

Hi Lawrence.


Thanks for your patience. We have tested the scenario with beta version of Aspose.Pdf for .NET 9.8.0 and found it fixed, sample output is attached for reference. Hopefully if every thing goes as per plan then new version of Aspose.Pdf for .NET will be released by this weekend or start of coming week. However we will notify you as soon as it is released and gets available for download.

Best Regards,

Looks almost right. It appears that the Table header row is not being copied to the overflow page.

table.RepeatingRowsCount = 1; // is not working

Also, how would you change my code to place the document Titling and Subtitling and Image on every page using the Header object.

I have attached a screen shot showing extra column spacing.



I have also attached related source code used to create columns.



How do I remove the extra spacing and box each column correctly?

Hi Lawrence.

Thanks for your inquiry.

objectissue:
Looks almost right. It appears that the Table header row is not being copied to the overflow page.

table.RepeatingRowsCount = 1; // is not working

Also, how would you change my code to place the document Titling and Subtitling and Image on every page using the Header object.


To repeat a table header on all pages, You may add table to Header object and set it to all PDF pages. Please check a sample code snippet for setting header. You may save your PDF to stream and reopen from stream to add header. Hopefully it will help you to accomplish the task.

Please feel free to contact us for any further assistance.

Best Regards,

You miss understood my request. I was showing you how my second table row was formatting and that there was a gap between the cells. Since I assigned column widths to each cell the yellow background color and box should have been the width of each cell. This is not happening. I provided the code so that you can tell me what needs to be changed so that I do not get the horizontal white space between the boxed columns.

Hi Lawrence,


Thanks for your feedback. I have managed to reproduce cells formatting issue and logged it as PDFNEWNET-37782 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is fixed.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-37741) have been fixed in Aspose.Pdf for .NET 9.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as PDFNEWNET-37782) have been fixed in Aspose.Pdf for .NET 10.9.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.