-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow access to PDDocument #19
Comments
The reason I didn't allow that was that if you change the state of the PdDocument directly, you could mess things up. What functions/fields do you need to access? Also, what version of PdfLayoutManager are you using? I've been making changes in a branch that may never see production. |
I fully understand the need to protect the document so that layout manager can do its job. For encryption I need to call: PDDocument.protect(StandardProtectionPolicy) I am currently using the master branch that I cloned 8 days ago. I suspect 0.5.1. Thank you for all the great work you have done here! It makes PDFs much easier to create and keep looking nice. |
This is a good idea. Sorry I haven't done it yet. The class PdfLayoutMgr is what currently wraps the PDDocument doc. If you add methods like setStandardProtectionPolicy() and setDocNameDictionary() (or other names you like better) that just call through to the underlying doc, and make minimal changes I'd be willing to merge that into the main branch so it's in future releases. It would be really nice if you made a unit test (in the root of the test package where TestManuallyPdfLayoutMgr sits now) that even prints a one page PDF using the two features you require. If the pdf has to be checked manually, just add some notes on what to look for. Once again, when you change PdfLayoutMgr, try to make absolute minimal changes, make it look like my code, etc. so I can merge it without much fuss. In any case, if you just add those two methods and you know that they work for you, I can merge them to be in future releases. |
I will make it happen. Thanks again. |
The pull request is ready. Please let me know if it doesn't make the grade. |
In order to encrypt or attach files, I believe I need access to the PDDocument.
Would it be possible to add a
The text was updated successfully, but these errors were encountered: