easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

PageHeight Property

Sets the page height (the vertical dimension of the paper).

double PageHeight { set; }
Property PageHeight As Double ' WriteOnly
def setPageHeight(self, value)
void setPageHeight(double value) throws PrinterException
function setPageHeight($value) 
BclPrnResult SetPageHeight(BclPrinter* pPrinter, double newVal);
Property PageHeight As Double ' WriteOnly
bepprint +WebKit -paper <paper> -orientation portrait|landscape


Double (inches)


If this property is not set, the LayoutPaperSize setting is used from PrinterSetting. It is strongly recommended to use PageWidth and PageHeight instead. PageWidth and PageHeight must be set together.

LayoutPaperSize is a global system-wide setting, while PageWidth and PageHeight apply to the current document only, therefore they work well in a multi-threaded environment.

Example Usage

' VB Sample Code

Set oPrinter = CreateObject("easyPDF.Printer.8")

Set oPrintJob = oPrinter.HTMLPrintJob

oPrintJob.MarginLeft = 1.0
oPrintJob.MarginRight = 1.0
oPrintJob.PageWidth = 8.5
oPrintJob.PageHeight = 11.0

oPrintJob.PrintOut "C:\temp\input.htm", "C:\temp\output.pdf"

// C# Sample Code

Printer printerObj = new Printer();

HTMLPrintJob printJobObj = printerObj.HTMLPrintJob;

printJobObj.MarginLeft = 0.75;
printJobObj.MarginRight = 0.75;
printJobObj.PageWidth = 8.5;
printJobObj.PageHeight = 11.0;

printJobObj.PrintOut("http://www.pdfonline.com/", "C:\\temp\\output.pdf");