English | 日本
PDF Java
Shopping CartContact Us
Knowledgebase
BCL easy PDF SDK

How do I use custom papersizes?

Last Updated:

To use the custom papersize, you must first either create the paper size and its dimensions within code or manually.

To create a custom paper size manually: Goto control panel > printers > file > Server Properties > and create the custom dimensions you plan to use.

The example below shows how to create the papersize for Windows within code:

oSetting = oPrinter.PrinterSetting
oSetting.CreatePaper("CustSize20x18.50", 20.0, 18.5)
oSetting.LayoutPaperSize = oSetting.GetPaperSize("CustSize20x18.50")
oSetting.Save()
oPrintJob = oPrinter.WordPrintJob
oPrintJob.PaperSize = prnMsoPaperSize.PRN_MSO_PAPER_CUSTOM
oPrintJob.PageHeight = 18.5
oPrintJob.PageWidth = 20.0
oPrintJob.PrintOut(inputfile,outputfile)

Note: Microsoft Word can only handle documents dimensions up to 22x22

PDF SDK Knowledgebase
 
BCL
© 1993 - , BCL Technologies.
All other trademarks are the property of their respective owners.