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

PaperSize Property

Sets paper size.

prnMsoPaperSize PaperSize { set; }
Property PaperSize As prnMsoPaperSize ' WriteOnly
def setPaperSize(self, value)
void setPaperSize(prnMsoPaperSize value) throws PrinterException
function setPaperSize($value) 
BclPrnResult SetPaperSize(BclPrinter* pPrinter, BclPrnMsoPaperSize newVal);
Property PaperSize As prnMsoPaperSize ' WriteOnly
bepprint +Word -native|-xps -paper <paper>


prnMsoPaperSize (write-only)


Word does not use the paper size setting from the printer driver (in other words the value of the PrinterSetting object's LayoutPaperSize property is ignored). If you need to change the paper size, use this property instead. If you need to use a custom paper size, set this property to PRN_MSO_PAPER_CUSTOM, and set the PageWidth and PageHeight properties.

Example Usage in VBScript

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

Set oPrintJob = oPrinter.WordPrintJobEx
oPrintJob.PaperSize = PRN_MSO_PAPER_A4

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_A4

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_A4;

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