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

using metadata #50

Open
benniedejong opened this issue Sep 24, 2024 · 0 comments
Open

using metadata #50

benniedejong opened this issue Sep 24, 2024 · 0 comments

Comments

@benniedejong
Copy link

Hello,

I'm trying add metadata (to set the author of my pdf document). Unfortunately I cannot find the correct way to add the pdf metadata. Could you please advise me how I would be able to add metadata to my request? I have tried to use .SetConversionBehaviors(x => x.AddAdditionalHeaders("metadata", meatadataValue);) but unfortunately this didn't work for me (this gave me json issues). I have also tried to add it as an JObject to prevent json serialization issues, but in that case I got the message "Invalid form data: form field 'extraHttpHeaders' is invalid" I did this with .SetConversionBehaviors(x => x.AddAdditionalHeaders(JObject.FromObject(new { metadata = JObject.FromObject(new { Author = "test" }).ToString(Formatting.None) })))

The documentation of Goterberg gives the following example for adding metadata:
curl
--request POST http://localhost:3000/forms/chromium/convert/url
--form url=https://my.url
--form 'metadata={"Author":"Julien Neuhart","Copyright":"Julien Neuhart","CreationDate":"2006-09-18T16:27:50-04:00","Creator":"Gotenberg","Keywords":["first","second"],"Marked":true,"ModDate":"2006-09-18T16:27:50-04:00","PDFVersion":1.7,"Producer":"Gotenberg","Subject":"Sample","Title":"Sample","Trapped":"Unknown"}'
-o my.pdf

@ChangemakerStudios ChangemakerStudios deleted a comment Oct 24, 2024
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

1 participant