Export.PDF.NativePDF.Restrictions
property (DataWindow object)
Description
Setting that enables you to specify the permission settings that
restrict certain actions (such as copying/printing/editing) of the
generated 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:
|
1 |
dw_control.Object.DataWindow.Export.PDF.NativePDF.Restrictions |
Describe argument:
|
1 |
"DataWindow.Export.PDF.NativePDF.Restrictions { = 'value' }" |
|
Parameter |
Description |
|---|---|
|
value |
(exp) The password for opening the generated PDF The value can be a string containing one or
|
Usage
If you set the restrictions of the PDF file, you must also set the
master password by the Export.PDF.NativePDF.MasterPassword
property. There must be a value specified for the restriction property,
otherwise syntax error may occur. If you do not want to set any
restriction, please set Export.PDF.NativePDF.MasterPassword
to empty, which indicates no master password or user password is
required to open the file or copy/print/edit the file (which means any
one can open the file and copy/print/edit the file with no
restrictions).
If you set restrictions without setting the user password, a user
can open the PDF file, and has the permissions specified by the
restriction property.
This property takes no effect for files created using PDF/A
standard.
Examples
This example prevents the PDF file being printed and copied, sets
the master password, and saves the data to a file called
custom.pdf:
|
1 2 3 4 5 |
int li_ret dw_1.Object.DataWindow.Export.PDF.Method = NativePDF! dw_1.Object.DataWindow.Export.PDF.NativePDF.Restrictions = 'noprint!,nocopy!' dw_1.Object.DataWindow.Export.PDF.NativePDF.MasterPassword = '456' li_ret = dw_1.SaveAs("c:custom.pdf",PDF!, true) |
This example uses Modify to set the restrictions and the master
password:
|
1 2 3 |
dw1.Modify("DataWindow.Export.PDF.Method = NativePDF!") dw1.Modify("DataWindow.Export.PDF.NativePDF.Restrictions='noprint!,nocopy!'") dw1.Modify("DataWindow.Export.PDF.NativePDF.MasterPassword='456'") |
See also
Export.PDF.NativePDF.CustomOrientation
Export.PDF.NativePDF.CustomSize
Export.PDF.NativePDF.ImageFormat
Export.PDF.NativePDF.MasterPassword
Export.PDF.NativePDF.PDFStandard
Export.PDF.NativePDF.UserPassword