-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add document ID to trailer for PDF/X #16
Conversation
I'm not comfortable by default including random information in a document. That means if we run the same PDF generation code twice we would get different PDFs out the other side. I think I am ok requiring someone to set the trailer on document initialization to set an ID if they plan on kicking out a PDF/X document. We could also after the merge discuss possibly creating a Prawn::PDFX class that does the PDF/X initialization for you and can do other things like try to ensure CMYK only images and what-not. |
Ok, I think that's a good point. I've removed the |
Some minor tweaks and I think this will be ready to merge.
Once this gets merged we can add a changelog file to the repo so we can start to track changes in pdf-core as opposed to prawn. Thanks! |
I have adjusted the tests and removed the securerandom call. Good catch. |
Add document ID to trailer for PDF/X
I'm good with this update. thanks for the pull request! Once @practicingruby gives me access to the contributors group you will get commit access to the repositories because you had a pull request merged. here are the details. Thanks again! Hopefully we can wrap up and give you easy access to all the PDF/X features your heart desires ❤️ |
You have been added to the contributors group, thanks again! |
Adds a default trailer that includes a document ID consisting of two random hex values. This is used for PDF-X compatibility but does not negatively affect other PDF formats. A
:trailer
option can also be passed in during initialization which can override the default.Also added basic specs or the PDF::Core::DocumentState class which had none.