Are you using the pdf_* family of functions or the cpd_* family of functions?
If it's the former, you should be able to do something like:
pdf_set_parameter($pdf, 'permissions', 'nomodify');
(See
for more information.)
According to the PDFLib manual, the values which can accompany a key of "permissions" are:
[tt]
noprint Acrobat will prevent printing the file.
nomodify Acrobat will prevent users from adding form fields or making any other changes.
nocopy Acrobat will prevent copying and extracting text or graphics, and will disable the accessibility interface
noannots Acrobat will prevent adding or changing comments or form fields.
noforms Acrobat will prevent form field filling, even if noannots hasn’t been specified.
noaccessible Acrobat will prevent extracting text or graphics for accessibility purposes (such as a screenreader program)
noassemble Acrobat will prevent inserting, deleting, or rotating pages and creating bookmarks and thumbnails, even if nomodify hasn’t been specified.
nohiresprint Acrobat will prevent high-resolution printing. If noprint hasn’t been specified printing is restricted to the »print as image« feature which prints a low-resolution rendition of the page.[/tt]
Keep in mind, however, that even setting 'nomodify' doesn't mean that the document cannot be edited. This quote from the PDBLib manual is actually a quote from the Adobe PDF manual:
There is nothing inherent in PDF encryption that enforces the document permissions specified in the encryption dictionary. It is up to the implementors of PDF viewers to respect the intent of the document creator by restricting user access to an encrypted PDF file according to the permissions contained in the file.
Want the best answers? Ask the best questions: TANSTAAFL!!