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

PageWidth Property

Sets the page width (the horizontal dimension of the paper).


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.
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.IEExtendedPrintJob

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

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

//C# Sample Code

PrinterClass printerObj = new PrinterClass();

IEExtendedPrintJob printJobObj = printerObj.IEExtendedPrintJob;

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

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