Description
Setting that enables you to select a format for the embedded images in the PDF file 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.ImageFormat
Describe argument:
"DataWindow.Export.PDF.NativePDF.ImageFormat { = 'value' }"
Parameter |
Description |
---|---|
value |
(exp) An integer indicating the file format of the embedded images in the DataWindow object. Values are:
The image format affects the speed of creating the PDF file and the size of the PDF file. In the order from the fastest to the lowest: JPG, BMP, PNG In the order from the smallest to the biggest: JPG, BMP, PNG To support transparent background of the image, you should set the image format to PNG before exporting the image. |
Examples
This example saves the embedded image as JPG format, and saves the data to a file called custom.pdf:
int li_ret dw_1.Object.DataWindow.Export.PDF.Method = NativePDF! dw_1.Object.DataWindow.Export.PDF.NativePDF.ImageFormat = '1' //JPG 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.Method = NativePDF!") dw1.Modify("DataWindow.Export.PDF.NativePDF.ImageFormat = '1'")
See also
Export.PDF.NativePDF.CustomOrientation
Export.PDF.NativePDF.CustomSize
Export.PDF.NativePDF.MasterPassword
Export.PDF.NativePDF.PDFStandard
Export.PDF.NativePDF.Restrictions
Export.PDF.NativePDF.UserPassword