You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a file that is broken or not a PDF at all, the following error gets printed to command line:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/pdfarranger/pdfarranger.py", line 928, in sw_dnd_received_data
msg = pageadder.addpages(filename)
File "/usr/lib/python3.7/site-packages/pdfarranger/pdfarranger.py", line 1210, in addpages
pdfdoc = PDFDoc(filename, self.app.tmp_dir)
File "/usr/lib/python3.7/site-packages/pdfarranger/pdfarranger.py", line 1177, in __init__
self.document = Poppler.Document.new_from_file(uri, None)
gi.repository.GLib.Error: poppler-quark: PDF document is damaged (4)
This is confusing to users (if they see it at all) and additionally this triggers Fedora's automatic bug reporting tool (ABRT).
Note that this can be triggered via drag & drop, by command line argument and by the "add file" button. (In the last case, a warning dialog is shown.)
When opening a file that is broken or not a PDF at all, the following error gets printed to command line:
This is confusing to users (if they see it at all) and additionally this triggers Fedora's automatic bug reporting tool (ABRT).
Note that this can be triggered via drag & drop, by command line argument and by the "add file" button. (In the last case, a warning dialog is shown.)
Originally reported by Fedora user sukhamay ganguly (bug not publicly visible) who tried to open a picture in pdfarranger (which is a fair thing to do imo, see #45)
Solution
Show a proper warning dialog and print a user and abrt friendly message to the console in all three possible ways to add a file:
Related: #101 / 53cc05f
The text was updated successfully, but these errors were encountered: