LWN.net Logo

Any software to toggle this flag?

Any software to toggle this flag?

Posted Jun 2, 2009 1:34 UTC (Tue) by ncm (subscriber, #165)
In reply to: Any software to toggle this flag? by foom
Parent article: Okular, Debian, and copy restrictions

I think pdftk can do that. It's a Java program, but on Debian compiled with gcj so you needn't install and fire up a JVM just to run it.


(Log in to post comments)

Any software to toggle this flag?

Posted Jun 2, 2009 2:55 UTC (Tue) by foom (subscriber, #14868) [Link]

Unfortunately not. At least the version in Debian requires the owner password to do *anything*,
including even basic things like the "cat" command.

pdftk test.pdf output test.output.pdf allow AllFeatures
Error: Failed to open PDF file:
test.pdf
OWNER PASSWORD REQUIRED, but not given (or incorrect)
Errors encountered. No output created.
Done. Input errors, so no output created.

Any software to toggle this flag?

Posted Jun 2, 2009 3:57 UTC (Tue) by foom (subscriber, #14868) [Link]

Okay, it turns out that pdftk can do it, if you apply a little patch. I found out what to do here:

http://newsgroups.derkeiler.com/Archive/Comp/comp.text.pd...

The source says:
input_pdf_p->m_authorized_b= ( !reader->encrypted || reader->passwordIsOwner );

But of course I want:
input_pdf_p->m_authorized_b= true;

Hooray for DRM.

I submitted http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531529 for this.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds