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

Free Support Forum - aspose.com

HTML table in PDF

Hello I am using the Pdf class to generate a pdf using html. Current my html has a table and the generated pdf is splitting the table between 2 pages. Is there any way to ensure that this does not happen? Thanks

Hi Ronnell,

Thanks for using our products.

When generating PDF file using Aspose.Pdf.Generator namespace, the contents are placed in Flow layout (Top-Left to Bottom-Right) and therefore when converting HTML file to PDF format, I am afraid you cannot control the page break. In case you only need to generate the PDF with single page output, you may consider manipulating resultant PDF file and remove the last/second page. When using this approach, I am afraid, the contents of second page will be lost. We are sorry for this inconvenience.