Closed adamdyson closed 7 years ago
After further testing I was able to update the metadata with the single command below.
cpdf.exe test.pdf -set-title "The Title" AND -set-author "The Author" AND -set-subject "The Subject" AND -set-keywords "The Key Words" AND -set-creator "The Creator" -set-producer "The Producer" -remove-annotations -o fixed.pdf
It's as if only the producer and creator metadata can be updated in a single action.
Yes, this is the expected behaviour - AND is required to do several operations. However, producer and creator setting are "options" rather than "operations", because it is natural for them to change whenever a file is processed (some PDF processing programs will always change the producer to themselves when processing a file, for example).
The next release will contain an improved manual making clear the distinction between options and operations, since this is a common misunderstanding.
Ok thanks for clarifying.
I believe I've stumbled upon a bug while simply trying to update the metadata of an existing document.
I'm currently testing in a Windows environment using the command below:
This is the file info outputted after running the command above:
When I remove the argument
-remove-annotations
this is the output:As you can see, the keywords get updated however the title, author and subject are not. When I update the metadata one attribute at a time, the file is updated correctly:
I'm guessing this is a bug a not the expected behaviour? As it would be a waste of resources to have to perform multiple operations for something so simple.