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.

Fri Feb 13, 2015 3:10 pm

When I create a pdf file from a web page the right side of the web page is cut off. Is there a way to shrink the page to fit the pdf? I tried the following:

pdfDoc.LoadFromHTML(url, False, True, True)
pdfDoc.PageScaling = PdfPrintPageScaling.FitSize
pdfDoc.SaveToFile(path, FileFormat.PDF)

Still cut off. Also tried PdfPrintPageScaling.ShrinkOversized, still no effect. Is the PageScaling only for printing and not for creating the PDF?

Thanks for any help.

michael@vivitech.com
 
Posts: 2
Joined: Fri Feb 13, 2015 3:04 pm

Mon Feb 16, 2015 6:53 am

Hello,

Thanks for your inquiry. Sorry for late reply as weekend. The PageScaling is only for printing and not for creating the PDF. Please try the following method.
Code: Select all
LoadFromHTML(string Url, bool enableJavaScript, bool enableHyperlinks, bool autoDetectPageBreak, PdfPageSettings setting, PdfHtmlLayoutFormat layoutFormat);

If there are any questions, welcome to get it back to us.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Feb 17, 2015 7:46 am

Hello,

Have you tried the method? Has your issue been resolved? Could you please give us some feedback at your convenience?

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Feb 27, 2015 2:18 pm

I didn't know anyone answered. I never received an email until now. I will look at the suggested method and get back to you. Probably not until tomorrow.

Thanks for the follow up.

michael@vivitech.com
 
Posts: 2
Joined: Fri Feb 13, 2015 3:04 pm

Return to Spire.PDF