From: [redacted]
To: dst@cs.cmu.edu
Subject: Xpdf patch for Copy/Print protection
Date: Wed, 7 Aug 2002
English is not my native language so...
Based on xpdf 0.93 patch found on http://www-2.cs.cmu.edu/~dst/Adobe/Gallery/
it seems that can be a similar solution for Printing protection of PDF
documents.
Just comment the folowing lines in source - pdftops.cc :
// check for print permission
if (!doc->okToPrint()) {
error(-1, "Printing this document is not allowed.");
goto err1;
}
In xdf.cc eliminate the test for printing:
if (doc->okToPrint() ) {
psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
doc->getCatalog(), psFirstPage, psLastPage,
psModePS);
in this or any other mode:
if ((doc->okToPrint()) or (!doc->okToPrint()) ) {
psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
doc->getCatalog(), psFirstPage, psLastPage,
psModePS);