GetPaperSize Method

Gets a paper size identifier value from a given paper name.

Function GetPaperSize(PaperName As String) As Long


Parameters

PaperName

Name of the paper to get the size identifier value from.

Return Values

A paper size identifier for the specified paper.

Remarks

The value returned from this method can be used to set the LayoutPaperSize property setting. This method is intended to be used for retrieving the identifier value for custom paper sizes. Use one of the values from prnPaperSize instead if the paper size you need is defined there.

This method will fail if the paper name you specified does not exist.

Example Usage


Set oPrinter = CreateObject("easyPDF.Printer.5")
Set oSetting = oPrinter.PrinterSetting
oSetting.CreatePaper "My Custom Paper", 10.0, 10.0
If oSetting.IsPaperAvailable("My Custom Paper") Then
    oSetting.LayoutPaperSize = oSetting.GetPaperSize("My Custom Paper")
End If
oSetting.Save

 

 

<<