<< Click to Display Table of Contents >> Navigation: Commands > Security - Disable Save ... |
Please also see Load&Save section in this manual.
The following commands are used to DISABLE functionality.
Once used, the setting cannot be changed anymore!
COMPDF_DisablePrint = 123;
Disable print - it is not possible to enable again!
COMPDF_DisableHQPrint = 124
Disable high quality print - if print, only low quality!
COMPDF_DisableSelectPrinter=125
Disable Select Printer or PrintDialog (print at once!)
COMPDF_DisablePrintHDC = 126
Disable print to HDC - it is not possible to enable again!
COMPDF_DisableSave = 127
Disable saving of the PDF file - it is not possible to enable again!
COMPDF_DisableCopy = 128
Disable copy to clipboard - it is not possible to enable again!
COMPDF_DisableForms = 129 - reserved in WPViewPDF V3, not yet used.
Disable form editing - it is not possible to enable again!
COMPDF_DisableEdit = 130 - reserved in WPViewPDF V3, not yet used.
Disable editing - it is not possible to enable again!
COMPDF_DisableSecurityOverride = 131
By standard the viewer respects the P protection flag.
With COMPDF_DisableSecurityOverride you can change this standard behavior at your own responsibility
Bit 1: Ignore the save PDF restriction
Bit 2: Ignore the low quality only printing restriction
Bit 3: Ignore the no printing at all restriction
(Note: PDF which use 256 bits AES encryption may never be saved unless the owner password was specified)
Example: The property SecurityOptions is interpreted by this code:
FSecurityOptions := x;
if wpDisablePrint in FSecurityOptions then
command(COMPDF_DisablePrint);
if wpDisableHQPrint in FSecurityOptions then
command(COMPDF_DisableHQPrint);
if wpDisableSelectPrinter in FSecurityOptions then
command(COMPDF_DisableSelectPrinter);
if wpDisablePrintHDC in FSecurityOptions then
command(COMPDF_DisablePrintHDC);
if wpDisableSave in FSecurityOptions then
command(COMPDF_DisableSave);
if wpDisableCopy in FSecurityOptions then
command(COMPDF_DisableCopy);
if wpDisableForms in FSecurityOptions then
command(COMPDF_DisableForms);
if wpDisableEdit in FSecurityOptions then
command(COMPDF_DisableEdit);
if wpDisablePDFSecurityOverride in FSecurityOptions then i := 1 else i := 0;
if wpDisablePDFSecurityLowQualityPrint in FSecurityOptions then i := i or 2;
if wpDisablePDFSecurityPrint in FSecurityOptions then i := i or 4;
command(COMPDF_DisableSecurityOverride, i);