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.

Mon Mar 11, 2024 11:58 pm

After converting multi-page HTML to PDF, it always ends up as only one page. How can automatic pagination be implemented during the conversion? When we test it normally using Ctrl+P to print, it comes out as 2 pages, but after converting to a PDF file using Spire.PDF, it always ends up as only one page with the content all squeezed together.

多页html转换PDF后始终只有一页,如何实现转换过程中自动分页? 我们正常测试用Ctrl+P 打印出来都是2页,但是通过Spire.PDF转换为PDF文件后始终只有一页设置内容都挤在一起了


////将HTML字符串转换为PDF
HtmlConverter.Convert(invoiceContent, pdfFilePath,true, 100000, new Size(595, 842), new PdfMargins(20), LoadHtmlType.SourceCode);
Last edited by skycomltd on Tue Mar 12, 2024 5:12 am, edited 2 times in total.

skycomltd
 
Posts: 1
Joined: Fri Mar 08, 2024 4:41 am

Tue Mar 12, 2024 1:47 am

Hello,

Thanks for your inquiry.
To help us further investigate your issue, please upload your HTML file as an attachment and send it to us, or you can 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

Return to Spire.PDF

cron