Generally, there aren't any good utilities to edit PDFs in Perl. Create, yes. Read, yes. Edit ... not so much.
Additionally, you are aware that password protection is an advisory thing in the PDF format. Adobe respects it, but there are literally dozens of utilities that you can google for that will read the PDF document and ignore the password.
If the publisher is demanding this, then ask them to provide a password-protected version. That way, if anyone cracks it, it's their problem, not yours. There is a legal liability issue. If you password-protect it and it's cracked, they can claim you screwed up. If, however, you're just the delivery vehicle, you are immune to liability for that issue.
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |
Is it still true that passwords are merely advisory? I have difficulty finding information for this after Acrobat 5. . .
| [reply] |
All versions of Acrobat honor all passwords contained in a PDF. But, the PDF format itself treats passwords as advisory. So, it's a format issue, which means that any given client may choose to honor the passwords ... or not.
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |
Would it be feasible for you to create a small site that requires the user to log in before you render/deliver the pdf to them?
This would be a more complex way of doing it than what dragonchild suggested, but thought I would offer an alternate idea.
=)
| [reply] |
I frankly don't know much about PDF, but one thing that comes to my mind is that if you run under Win32 and you have some program doing the password protection, you can usually script it from Perl using either OLE capabilities (for big, well written programs) or the canonical system() call. | [reply] |