Package: gscan2pdf
Version: 2.11.0-1

When opening pdf files with multiple images per page or no images, gscan2pdf 
loads the pages as multiple mangle fragments or gives an error that the file 
cannot be opened because it contains more than one image per page. This occurs 
with both a drag & drop to the left panel and also the open file from the menu.

This is generally understandable because as a scanning software, there should 
only be one image per page. However, pdf scans from other software do not 
always follow this, nor do most other pdf files.

Although I really prefer using gscan2pdf, I am often stuck using other software 
to make them compatible with gscan2pdf.
Okular > Print to File > Force rasterization
GIMP > import > export as pdf

Since both of these alternatives are open source, hopefully this functionality 
could be eventually included in gscan2pdf.

To reproduce:
1) Download a pdf file from Wikipedia 
https://en.wikipedia.org/api/rest_v1/page/pdf/Main_Page
2) Open with (or drag & drop to) gscan2pdf
3) File opens as a bunch of mangled fragments. The it gives this error: Open 
File Error "Warning: gscan2pdf expects one image per page, but this was not 
satisfied. It is probable that the PDF has not been correctly imported. If you 
wish to add scans to an existing PDF, use the prepend/append to PDF options in 
the Save dialogue."
4) Open the file pdf file with GIMP, export as pdf, check "Layers as pages...", 
uncheck "Convert bitmaps to vector...".
5) Open new file with gscan2pdf, works perfectly
6) Open the original file pdf file with Okular, print to file, Force 
rasterization
7) Open new file with gscan2pdf, works perfectly

Version info:
apt search gscan2pdf
gscan2pdf/stable,now 2.11.0-1 all [installed]

apt search gimp
gimp/stable,now 2.10.22-4 amd64 [installed]

apt search okular
okular/stable,now 4:20.12.3-2 amd64 [installed]

uname -vr
5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)

Reply via email to