Bug 96801 - pdfinfo: Don't print all info when printing javascript, struct, or meta
Summary: pdfinfo: Don't print all info when printing javascript, struct, or meta
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium minor
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-04 12:34 UTC by Adrian Johnson
Modified: 2016-07-13 21:48 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Don't print all info when printing meta, struct, or js (18.20 KB, patch)
2016-07-04 12:35 UTC, Adrian Johnson
Details | Splinter Review
man page changes (768 bytes, patch)
2016-07-04 21:26 UTC, Adrian Johnson
Details | Splinter Review

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.