Bug 96801

Summary: pdfinfo: Don't print all info when printing javascript, struct, or meta
Product: poppler Reporter: Adrian Johnson <ajohnson>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Don't print all info when printing meta, struct, or js
man page changes

Description Adrian Johnson 2016-07-04 12:34:46 UTC
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
Comment 1 Adrian Johnson 2016-07-04 12:35:59 UTC
Created attachment 124893 [details] [review]
Don't print all info when printing meta, struct, or js
Comment 2 Albert Astals Cid 2016-07-04 20:07:46 UTC
don't have a strong opinion, but if we do this, we should update the manpage?
Comment 3 Adrian Johnson 2016-07-04 21:26:42 UTC
Created attachment 124898 [details] [review]
man page changes

Yes we should update the man page.
Comment 4 Albert Astals Cid 2016-07-05 21:39:34 UTC
As said i don't have a strong opinion, i'd say wait a week and if noone comments just push it.
Comment 5 Adrian Johnson 2016-07-13 21:48:03 UTC
pushed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.