Skip to content
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

Enable setting all document information dictionary entries #194

Open
conorom opened this issue Apr 30, 2021 · 1 comment
Open

Enable setting all document information dictionary entries #194

conorom opened this issue Apr 30, 2021 · 1 comment

Comments

@conorom
Copy link

conorom commented Apr 30, 2021

In one of my projects we've been using CombinePDF for some time to add watermarks to PDFs prior to download.
Thanks for maintaining this very useful gem!

Recently we decided to edit the Keywords info dict entry at the same time, but CombinePDF doesn't allow this out of the box.
I found it was easy to add a line to this area in a class_eval to set the Keywords value.

Is there a reason why all of the information dictionary entries shouldn't be added there?

Thanks again for your time.

@FriscoTony
Copy link

+1
I might try to take a stab at a pull request for this as I'm facing a similar issue.
Super grateful for all the work that's gone into this library.
My specific case is that I'm merging some PDFs and want to preserve the CreationDate of the original PDF.

But right now, this field gets explicitly deleted after parsing, and then it's also set explicitly to match the modification date when saving.

I'd like to:

  • remove the line that deletes the creation date if it exists when parsing a PDF
  • remove the line that sets the creation data to Time.now if a creation date already exists
  • as @conorom suggests above, allow the caller to override any of these metadata fields (Title, Subject, Keywords, Author, CreationDate, ModDate, Creator, Producer) via the options hash.

If I manage to get a pull request created for this, I'll update.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants