Export.PDF.NativePDF.UsePrintSpec

Description

Setting that enables you to use the page orientation and paper size settings in the Print Specifications tab or in the Print.Orientation and Print.Paper.Size properties, when you use the PDFlib method to save data from a DataWindow object to a PDF file.

Applies to

DataWindow objects

Syntax

PowerBuilder dot notation:

dw_control.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec

Describe argument:

"DataWindow.Export.PDF.NativePDF.UsePrintSpec { = 'value' }"

Parameter

Description

value

(exp) Whether to use the settings in the print specifications or not.

Values are:

  • Yes - Use the settings in the Print Specifications page or in the Print.Orientation and Print.Paper.Size properties.

  • No - (Default) Use the settings in the Data Export page or in the Export.PDF.NativePDF.CustomOrientation and Export.PDF.NativePDF.CustomSize properties.


Usage

In the painter

Select the "Use Paper Size and Orientation Settings from Print Specifications" checkbox in the Data Export tab in the Properties view for the DataWindow object.

Examples

This example exports PDF with Letter paper size in Landscape mode, and saves the data to a file called custom.pdf:

int li_ret
dw_1.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
dw_1.Object.DataWindow.Export.PDF.Method = NativePDF!
dw_1.Object.DataWindow.Print.Orientation = '1' //Landscape!
dw_1.Object.DataWindow.Print.Paper.Size = '1' //1 – Letter 8 1/2 x 11 in
li_ret = dw_1.SaveAs("c:\custom.pdf",PDF!, true)

This example uses Modify to set the PDF print properties:

dw1.Modify("DataWindow.Export.PDF.NativePDF.UsePrintSpec = Yes")
dw1.Modify("DataWindow.Export.PDF.Method = NativePDF!")
dw1.Modify("DataWindow.Export.Print.Orientation = '1'")
dw1.Modify("DataWindow.Export.Print.Paper.Size = '1'")

See also

Export.PDF.Method

Export.PDF.NativePDF.Author

Export.PDF.NativePDF.CustomOrientation

Export.PDF.NativePDF.CustomSize

Export.PDF.NativePDF.ImageFormat

Export.PDF.NativePDF.Keywords

Export.PDF.NativePDF.MasterPassword

Export.PDF.NativePDF.PDFStandard

Export.PDF.NativePDF.Restrictions

Export.PDF.NativePDF.Subject

Export.PDF.NativePDF.UserPassword

Print.property