Hello,
I am converting URL to pdf using SelectPdf library (HtmlToPdf class).I am able to convert my html url to pdf.
But now i have added one extra big
to html page. Now it converts that url to pdf but not full content.
It cuts most of the content form that
, For Ex : if new table has 1500 lines of code, then it shows only first 300 lines of code and rest lines of code gets removed. Maybe it does not load the data comletely or the pdf conversion have limited content size?
I tried SelectPdf properties such as MaxLoad, MinLoad, MaxHeight, but could not fix the issue
Please let me know what can be done here.
Thanks in advance !
Santosh NadellaRank #1,681 · 906 reputationPosted Feb 1, 2024, 11:56 AM EST
May I know the Front-end technologies you are using for generating the dynamic HTML pages,
Wich I mean wasit in MVC or Blazor WASM etc..?
Sushant TorankarRank #3,026 · 476 reputationPosted Feb 1, 2024, 12:31 PM EST
Hi Nadella,
it is .Net, am using
Tuhin PaulRank #7 · 71.9K reputationPosted Feb 1, 2024, 10:19 AM EST
Investigate and Adjust SelectPdf Settings:
page-break-inside:autoor server-side pagination.Leon DRank #851 · 2.6K reputationPosted Feb 3, 2024, 8:24 PM EST
You can check Spire.PDF:
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-HTML-to-PDF-Customize-HTML-to-PDF-Conversion-by-Yourself.html
Jignesh KumarRank #91 · 22.9K reputationPosted Feb 4, 2024, 5:32 AM EST
Hello Sushant,
Please try these two setting, if it will help you out,
// Increase timeout to 60 seconds. this property need to add values in milliseconds pdfconverter.Options.MaxPageLoadTime = 60000; // 60 seconds // Increase page height 2000 pixels pdfconverter.Options.MaxPageHeight = 2000; // Example: 2000 pixels