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

PageWidth Property

Sets a custom page width.

Type:

Double (inches, write-only)

Remarks

If you need to use a custom paper size, set PaperSize property to PRN_MSO_PAPER_CUSTOM, and setup the PageWidth and PageHeight properties.

Example Usage in VBScript

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

Set oPrintJob = oPrinter.WordPrintJobEx
oPrintJob.PaperSize = PRN_MSO_PAPER_CUSTOM
oPrintJob.PageWidth = 5.0
oPrintJob.PageHeight = 15.0

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

Example Usage in VB.NET

Dim oPrinter As Printer = CreateObject("easyPDF.Printer.8")

Dim oPrintJob As WordPrintJobEx = oPrinter.WordPrintJobEx
oPrintJob.PaperSize = prnMsoPaperSize.PRN_MSO_PAPER_CUSTOM
oPrintJob.PageWidth = 5.0
oPrintJob.PageHeight = 15.0

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

Example Usage in C#

Printer oPrinter = new Printer();


WordPrintJobEx oPrintJob = oPrinter.WordPrintJobEx;
oPrintJob.PaperSize = prnMsoPaperSize.PRN_MSO_PAPER_CUSTOM;
oPrintJob.PageWidth = 5.0;
oPrintJob.PageHeight = 15.0;

oPrintJob.PrintOut(@"C:\test\input.doc", @"C:\test\output.pdf");