HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › PD4ML Page Height › Re: Re: PD4ML Page Height
In order to predict a document height for particular conversion conditions, you may perform a fake conversion run and collect the conversion statistics:
http://pd4ml.com/cookbook/pd4ml_conversion_status.htm
You are interested in PD4Constants.PD4ML_DOCUMENT_HEIGHT_PX value. After the HTML doc height is known, you may adjust PDF page height proportionally.
Also it is important to distinguish document dimensions in typographic points (“200×750” in your command line) and HTML document height and width, measured in screen pixels.
The following tries to explain the px/pt mapping and scaling:
http://pd4ml.com/cookbook/pdf_page_formatting.htm