Rank: Newbie Groups: Member
Joined: 3/3/2021 Posts: 2
|
Hello, I'm using EO.Pdf for generating PDF files from html source. Is it possible set page height to some auto-adjust value in order to generate single page PDF, containing whole HTML document?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
There is no built-in support for this. In theory you can run the conversion twice. The first time you use it "measure" the height of your web page, then you can set your page size based on the result of this conversion. However this is not recommended as it would generate "non-standard" page sizes and it might cause problems with some PDF Viewer or during printing.
You can however set HtmlToPdf.Options.AutoFitX and AutoFitY to ShrinkToFit. In that case it will always zoom your HTML page to fit into a single page. Note that this option does not change the PDF page size, it scales your web page to fit the PDF page instead.
Thanks
|
Rank: Newbie Groups: Member
Joined: 3/3/2021 Posts: 2
|
Hi, thank you for your tip, two stage conversion may work for me. Non-standard page size is not an issue, source HTML contains a pos (cash) receipt of a variable length.
Bye.
|