If you are the proud owner of a proprietary PDF-Creator like "Adobe Acrobat" you probably have noticed that it gives you the option to make the resulting PDF protected in a way that you cannot copy any text from it or that you cannot extract the pictures within. What a nice little feature.
Now what this technically does is to set a flag in the PDF telling the reader program "Please don't let the mean user copy any content from me!". However, the whole process relies on the reader progam (like "Adobe Acrobat Reader" or "xpdf", in our case) to obey the request of the PDF creator.
Now at this point, I got really annoyed by xpdf. Because it really does obey the completely non-sensical request of the PDF creator. Probably because of some legal trouble which Adobe might give them if they did not obey it. But logically there is absolutely no reason to restrict the extraction of text of graphical images from a PDF file. Text I could read and type it in again. Pictures I could photograph off my PC screen. It's completely moronic. It's Adobe.
Plus some people at my college think it's protecting their documents well. They seem to believe that content which is made for education should under no circumstances leak to the outside - somebody could maybe learn something! It would be a disaster! That this is a stupid idea is obvious. This patch just proves my point.
Therefore, I decided to remove the document protection from xpdf's sourcecode. And as xpdf (and it's patches) are licensed under the GNU GPL, the General Public License, I have the right to distribute all patches on this very page. So I will.
Just one more thing to all my little friends out there using that "Don't-Copy-Text"-flag: Please don't.
Here's how you apply the patch: First, download xpdf from the xpdf Homepage and download the appropriate patch from this page. Then, after you have them both, do the following:
acer joe [~]: tar xfz xpdf-3.02.tar.gz acer joe [~]: patch -p0 < xpdf-3.02-protection.patch acer joe [~]: cd xpdf-3.02 acer joe [~/xpdf-3.02]: ./configure [...Some lines appear...] acer joe [~/xpdf-3.02]: make [...Some more lines appear...] acer joe [~/xpdf-3.02]: make install [...And then again some more lines...]
You may need to supply some options to the "./configure" script, like where your include files can be found. Additionaly, you might need to install "Development" versions for packages like freetype so these very include files are present at your system. Also you might want to change the prefix which xpdf is installed to.
| Patch applies to version |
Description | Download |
| xpdf 3.02 | Will remove the document protection. | Here |
| xpdf 3.00pl3 | Will remove the document protection. | Here |
| xpdf 3.00 | Will cumulatively upgrade to xpdf 3.00pl3 and remove the document protection. | Here |
