Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Feb 04, 2025 5:57 am

We are using Python API for converting HTML to PDF.

We are not able to generate PDF from HTML which has around 100,000 rows in the HTML table.

What approach can be followed?

Also, there are following concerns:

1. In html columns are 13 but only 8 columns are visible in PDF - how to change orientation to landscape?
2. CSS not applied as specified in html
3. PDF generation time is too long
4. if header and footer needs to be added with page number in PDF then is it possible ?
5. What if any image is used in then is it going convert in PDF

16568 Records - 5 min 2 sec
37845 Records - 24 min
100676 Records - not completed after 1 hour

jitendra.shah
 
Posts: 2
Joined: Tue Feb 04, 2025 5:48 am

Tue Feb 04, 2025 7:58 am

Hello,

Thanks for your inquiry.
To assist us in further investigating your issue, please provide your input html file and test code. You can upload them here as an attachment or send it to this email: [email protected]. Thank you in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Mon Feb 17, 2025 7:44 am

Please find the attached zip file containing large HTML data and the python script.

jitendra.shah
 
Posts: 2
Joined: Tue Feb 04, 2025 5:48 am

Tue Feb 18, 2025 1:38 am

Hello,

Thanks for more informations.
I checked your HTML file and found that it is over 130MB. Even if you use the Chrome browser to load and convert it to a PDF file directly, it will take a lot of time. The same is true for our Spire.Doc tool. The more content in the file, the longer it takes to convert. In this case, we recommend that you split the file into multiple smaller HTML files in advance, convert them to PDF separately, and then merge them, which may improve the conversion efficiency. Thank you for your understanding.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF