
Some time ago, a collegue of mine wanted to copy a few sentences from an pdf document he found on the web. Unfortunately the document was protected
, so acrobat reader disabled copy&paste.
When he asked for some help, I replied that if he had used some open source viewer like xpdf he wouldn't have had that problem.
Well. As I quickly found out, this was untrue. The author(s) of xpdf had somehow gotten convinced to honor the "protection"-flags of pdf documents.
I spent some time (much more than it would have taken to retype these three sentences) understanding the source, and finally came up with a single-line patch to restore full functionality of xpdf.
Simply apply the following patch and feel unrestricted again.
--- xpdf/XRef.cc.org Thu Jan 22 02:26:45 2004
+++ xpdf/XRef.cc Fri Apr 29 12:15:57 2005
@@ -803,6 +803,7 @@
// this flag has to be set *after* we read the O/U/P strings
encrypted = encrypted1;
+ permFlags = defPermFlags;
return ret;
}
#else
– Sec