Bug 70374 - No user-control over error messages
Summary: No user-control over error messages
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cpp frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 12:15 UTC by Hans-Peter Deifel
Modified: 2014-12-14 13:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to add API to the cpp wrapper (3.40 KB, patch)
2014-12-12 12:18 UTC, Hans-Peter Deifel
Details | Splinter Review

Description Hans-Peter Deifel 2013-10-11 12:15:31 UTC
poppler-cpp unconditionally prints all error messages from poppler to stderr. A user has no way to prevent this or install her own error handler.

Control over the error output would be very desirable for command line programs.

Since errors are also printed when an encrypted PDF document is opened without a password, there is no way to check if a PDF requires a password without generating an ugly error message.

Qt and GLib frontends both expose an equivalent of setErrorCallback.

I'd gladly volunteer to implement this myself, if I get some pointers about how the API should look.
Comment 1 Albert Astals Cid 2013-10-12 14:52:04 UTC
I'd go for something similar to what the qt4 API does but with a std::string and a void * instead of a QString and a QVariant.
Comment 2 Hans-Peter Deifel 2014-12-12 12:18:42 UTC
Created attachment 110775 [details] [review]
Patch to add API to the cpp wrapper

I finally came around to implement this API, sorry it took so long.
Comment 3 Albert Astals Cid 2014-12-14 13:59:21 UTC
Awesome, commited!


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.