Man page - rewritepdf(1)
Packages contains this manual
- deillustrate(1)
- getpdfpageobject(1)
- listfonts(1)
- extractjpgs(1)
- getpdftext(1)
- fillpdffields(1)
- pdfinfo.cam-pdf(1)
- renderpdf(1)
- readpdf(1)
- setpdfbackground(1)
- crunchjpgs(1)
- listpdffields(1)
- changepagestring(1)
- extractallimages(1)
- appendpdf(1)
- stamppdf(1)
- deletepdfpage(1)
- rewritepdf(1)
- getpdfpage(1)
- revertpdf(1)
- changerefkeys(1)
- listimages(1)
- uninlinepdfimages(1)
- getpdffontobject(1)
- changepdfstring(1)
- setpdfpage(1)
- replacepdfobj(1)
apt-get install libcam-pdf-perl
Manual
REWRITEPDF
NAMESYNOPSIS
DESCRIPTION
SEE ALSO
AUTHOR
NAME
rewritepdf - Rebuild a PDF file
SYNOPSIS
rewritepdf
[options] infile.pdf [outfile.pdf] [password(s)]\n";
Options:
-c --cleanse seek and destroy unreferenced metadata in the
document
-C --clearannots remove all annotations (including forms)
-d --decode uncompress any encoded elements
-f --filter=name compress all elements with this filter (can
use more than once)
-X --decrypt remove encryption from the document
-o --order preserve the internal PDF ordering for output
-v --verbose print diagnostic messages
-h --help verbose help message
-V --version print CAM::PDF version
-p --pass opass upass set a new owner and user password
-P --prefs print modify copy add set boolean permissions for
the document
The optional password arguments are needed to open password-protected PDF files. Hereβs an example of password-protecting and then unprotecting it in sequence:
rewritepdf
--pass SecretPass SecretPass orig.pdf passworded.pdf
rewritepdf --decrypt passworded.pdf unprotected.pdf
SecretPass
If you want to prevent people from being able to perform the latter step, then tighten your permissions:
rewritepdf -p Secret Secret -P 1 0 0 0 orig.pdf passworded.pdf
which means that users can print the passworded PDF, but not change it, copy-and-paste from it, or append to it.
DESCRIPTION
Read and write a PDF document, and possibly modify it along the way.
The "--cleanse" option could possibly break some PDFs which use undocumented or poorly documented PDF features. Namely, some PDFs implicitly store their "FontDescriptor" objects just before their Font objects, without explicitly referring to the former. Cleansing removes the former, causing Acrobat Reader to choke.
We recommend that you avoid the "--decode" and "--filter" options, as weβre not sure they work right any longer.
SEE ALSO
CAM::PDF
AUTHOR
See CAM::PDF