How to Increase the pdf page width dynamically to render the HTML page with iText? - itext

I have a HTML page which contains a table which has many columns and they do not fit in screen, so one viewing the the table has to scroll left to right to see full content as width of the page is larger than screen.
When i'm converting this HTML page to PDF the content which are not visible without scrolling are not rendered in PDF document. Is there any way we can get the HTML page width and increase the PDF page width?

Related

EVOpdf generates empty pdf page when exporting

Currently I'm working on a PDF export. I want to add an bottom margin to my pdf, but this results in a empty pdf page. The first PDF page has enough room for all of the content but it still produces a blank page. When I remove the bottom margin the blank page disappears but it can happen when I have more than 2 pdf pages it still produces an extra empty PDF between the 2 pages. I don't know why this is happening.
Anybody has any idea? :)
Thanks,
Mark

Evopdf truncate contains in pdf

I use evaluation version of evopdf.
Actually, evopdf truncate contains in the render pdf document.
I think that evopdf only render the part of document visible in window browser.
Is your HTML content inside a scrolling area? In this case you have to either create a version of the HTML which displays the entire content inside the scrolling area or set a large custom viewer height in HtmToPdfConverter.HtmlViewerHeight .
For example:
// Create a HTML to PDF converter object with default settings
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
// Set HTML viewer height in pixels to convert the top part of a HTML page
// Leave it not set to convert the entire HTML
htmlToPdfConverter.HtmlViewerHeight = 2000;
You can also find the working example with C# source code at http://www.evopdf.com/demo/ where you can test online your HTML page.

EvoPdf Page backgrounds and Margins

I am converting HTML pages using EvoPdf and would like to add a background image. I am generating documents and would like to add a cover page, I am doing this by prepending the HTML for the cover page then putting a page break directly after.
I am using this demo as a guide http://www.evopdf.com/demo/HTML_to_PDF/PDF_Pages_Background/Add_Elements_in_Background.aspx and have found that I need to remove the page margins for the image to cover the whole page otherwise it sits inside the margins.
If I remove the margins this means the content that flows over pages now starts directly at the top of the page and flows right to the bottom. I can fix this for left and right margins by putting this in the HTML but this does not work for top and bottom margins that flow over pages. (see the generated PDF from the above demo)
Is there a way to set the PDF page background irrespective of the page margins? I have been looking at creating multiple documents with their own configuration and merging the PDF's but I really want to avoid this.
You can set up a header and footer with the heights you wanted for the top and bottom margins, and then choose to not display them on the first page. This should give you the effect you're looking for.
You can find more information about how to do this here: http://www.evopdf.com/demo/HTML_to_PDF/Headers_and_Footers/HTML_in_Header_Footer.aspx

Have Image in Header Span Full Width of page

In word 2000 I inserted a .jpg into my header, but it shrinks the image down. If I try to expand the image to fit the entire width of the page it only extends one side of the image (running it off the page). What do I need to do so the image in the header runs from the left side of the page to the right side of the page?

UIWebView : Change page number position for pdf file in UIWebView

I'm opening a pdf file with UIWebView and once i'm starting to scroll down it shows be the page number box in left corner.I want to change position of page number to bottom of pdf page. Any idea? Thanks
[self.webView stringByEvaluatingJavaScriptFromString:#"window.scrollTo(0,100);"];
instead of 100, the position of the page to be given.