FitToPage Property: Usage Tips
This article discusses the WebGrabber FitToPage property and provides details on its effects on the output PDF.
How the FitToPage Property Works
When you set FitToPage = True, and the HTML content is larger than will fit in the PDF page, the content will get cut off. Essentially, the PDF is one page that is as long and as wide as the HTML content. If the PDF height and width are set to "0". ("0" is "Auto". Default is 11 and 8.5, respectively) WebGrabber sizes the PDF page to fit the HTML content.
When you set FitToPage = False, you are telling WebGrabber to size the content to fit in the parameters of the default PDF width and height (8.5” x 11”).
Additionally, the PDFWidth and PDFLength properties have an effect on the appearance of the PDF.
Appearance When Using FitToPage = True
This section discusses issues with appearance and provides the suggested values for optimal appearance when using FitToPage = True.
Content on Right Side Appears Cut Off
If you are using FitToPage = True and the content is lost off the right side of the PDF page, it is due to setting PDFWidth to a value other than 0.
Here is an example of a conversion with FitToPage = True with PDFWidth = 5 and PDFLength = 0. Note that the content to the right side is "chopped off".
All Content on One Page (Optimal Appearance when FitToPage = True)
If you want the entire content of the HTML page to fit onto one PDF page, set FitToPage to True and leave the PDFWidth and PDFLength set to 0.
Try these settings when you want to resolve content being cut off on the right side or when you want to reduce the number of pages in the PDF.
Here’s an example of FitToPage = True with PDFWidth = 0 and PDFLength = 0. Note that all of the content appears on one PDF page.
Appearance When Using FitToPage = False
This section discusses issues with appearance and provides the suggested values for optimal appearance when using FitToPage = False.
Large Amount of White Space
If you find that your output PDF has a large amount of white space, it is due to either the PDFWidth or PDFLength being set at a value smaller than the default PDF page width of 8.5” or page length of 11”, respectively.
Here is an example of a conversion with FitToPage = False with PDFWidth = 5 and PDFLength = 0. Note the large amount of white space all around the content.
Content is Sized to the Default PDF Page Dimensions (Optimal Appearance when FitToPage = False)
If you want to make the content fit to the default PDF page size of 8.5” x 11”, set FitToPage = False and set PDFWidth = 0 and PDFLength = 0.
Try these settings when you want to create content that is sized to a standard PDF page dimensions of 8.5” x 11”.
Here is an example of a conversion with FitToPage = False with PDFWidth = 0 and PDFLength = 0. Note that the content dimensions are the same as a standard PDF page.
Comments
0 comments
Please sign in to leave a comment.