BCL easyPDF SDK
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 PageWidth { set; }
Property PageWidth As Double ' WriteOnly
def setPageWidth(self, value)
void setPageWidth(double value) throws PrinterException
function setPageWidth($value) 
BclPrnResult SetPageWidth(BclPrinter* pPrinter, double newVal);
Property PageWidth As Double ' WriteOnly
bepprint +WebKit -paper <paper> -orientation portrait|landscape

Type

Double (inches)

Remarks

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");