When using the -meta, struct, struct-text, or -js options of pdfinfo, all the info that is normally printed when no option is specified is printed before the requested data. When using -meta, struct, struct-text, or -js in scripts or when saving to a file it is difficult to filter out the info part. It makes more sense to not print the pdf info for these options.
The attached patch re-arranges pdfinfo.cc to:
- don't print the info when -meta, struct, struct-text, or -js is specified
- factor the print info code out main() into a separate function
- move main() to the end of the file removing the need to declare a bunch of static functions at the top of the file
Created attachment 124893 [details] [review]
Don't print all info when printing meta, struct, or js
don't have a strong opinion, but if we do this, we should update the manpage?
Created attachment 124898 [details] [review]
man page changes
Yes we should update the man page.
As said i don't have a strong opinion, i'd say wait a week and if noone comments just push it.