Bad PDF from new versions of Simple Scan

Bug #644734 reported by Damien Bally
102
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
High
Unassigned
simple-scan (Ubuntu)
Fix Released
High
Unassigned
Maverick
Fix Released
Medium
Unassigned

Bug Description

Impact: PDF files generated in locales that do not use '.' as the decimal point are invalid
Resolution: Code change in upstream project (patch in package branch and comments below)
To reproduce:
1. Run simple-scan in a locale that doesn't use '.' as a decimal point, e.g.
   $ LANG=de_DE.UTF-8 simple-scan test
2. Scan one page
3. Save as PDF
4. Try and open PDF in evince
Expected result: PDF is shown with same data as shown in simple-scan
Observed result: PDF is blank and errors shown in evince terminal output

Patch has been tested in English and German locales and the PDF output is correct in these cases. Bug is well defined, no regression problems expected.

Revision history for this message
bojo42 (bojo42) wrote :

need to confirm this on version 2.31.91 backport on lucid. the saved PDFs are just blank.

Changed in simple-scan:
status: New → Confirmed
Revision history for this message
bojo42 (bojo42) wrote :

this is still true in 2.32.0-0ubuntu1 backported to lucid. although i doubt it, but can someone please confirm that it isn't present in maverick.

Changed in simple-scan (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Berg (xeniac) wrote :

I use simple-scan 2.32.0 under Maverik 64bit.
The PDF Output creates empty PDF Files with a file-size of 50.4 kb.

There is nothing in the .xsession-errors log, and no console output. This makes it hard for me to provide you with useful data to solve this Bug.

In the meanwhile i print the scanned documents as PDF. <- A convenient work around.

Revision history for this message
Knedlyk (yupadmin) wrote :

Confirmed it in 2.31.91 compiled from sources (I'm using archlinux). Just blank pages in the saved pdf documents.

Revision history for this message
Mario (diraimondo) wrote :

I can confirm such bug in 2.32.0-0ubuntu1 version on Maverick.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

What application are you using to view the output PDFs? Could you please attach a PDF which is showing as white, and provide a screenshot of simple-scan showing what it should contain.

Changed in simple-scan:
status: Confirmed → Incomplete
Changed in simple-scan (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

I can confirm this bug. When using text mode, simple-scan shows the scanned page correctly, but when saving as PDF, evince renders it completely empty.

I attach a test scan, with my Canon LiDE 30. This worked fine in lucid and early maverick, it might be correlated to the switching to 4 gray levels?

$ evince /tmp/test.pdf
Error (12878): Unknown operator ',760010'
Error (12893): Unknown operator ',200012'
Error (12904): Too few (2) args to 'cm' operator
Error (12878): Unknown operator ',760010'
Error (12893): Unknown operator ',200012'
Error (12904): Too few (2) args to 'cm' operator
Error (12878): Unknown operator ',760010'
Error (12893): Unknown operator ',200012'
Error (12904): Too few (2) args to 'cm' operator
Error (12878): Unknown operator ',760010'
Error (12893): Unknown operator ',200012'
Error (12904): Too few (2) args to 'cm' operator
Error (12878): Unknown operator ',760010'
Error (12893): Unknown operator ',200012'
Error (12904): Too few (2) args to 'cm' operator

(not sure whether the error messages are related)

The top part is really blank, I scanned a post card from a magazine.

tags: added: regression-update
Revision history for this message
Martin Pitt (pitti) wrote :

This is a screenshot of simple-scan after scanning the page.

It doesn't depend on the page contents, I tried that with several different pages.

Changed in simple-scan:
status: Incomplete → Confirmed
Changed in simple-scan (Ubuntu Maverick):
status: Incomplete → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirmed, it's a locale problem when writing the floating point transform:

5 0 obj
<<
/Length 45
>>
stream
q
617,760010 0 0 847,200012 0 0 cm
/Im0 Do
Q
endstream
endobj

(i.e. the 617,760010). Workaround would be to use LANG=C simple-scan to run.

Changed in simple-scan:
importance: Undecided → High
Changed in simple-scan (Ubuntu):
importance: Undecided → High
Changed in simple-scan:
status: Confirmed → Fix Committed
Changed in simple-scan (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Patch that fixes the problem

description: updated
description: updated
Changed in simple-scan (Ubuntu Maverick):
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

SRU ack, please upload. Thanks a lot for the fix!

tags: added: regression-release
removed: regression-update
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted simple-scan into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in simple-scan (Ubuntu Maverick):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :

This bug is okay, it seems, but when I scan, it save me a file which, for an A4 paper for example, isn't entire : (see the attachmant...).

Revision history for this message
bojo42 (bojo42) wrote :

works for even backported to lucid, but i am "only" on de_DE.UTF-8.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

@Kévin, does the version 2.32.0-0ubuntu1 currently in maverick already exhibit the same problem or is it introduced by 2.32.0-0ubuntu2 in -proposed ?

Revision history for this message
Damien Bally (dbally) wrote :

Same problem as Kévin. Simple-scan is compiled from source with the applied patch on opensuse 12.2 (x86_64)

Revision history for this message
zmoog (zmoog) wrote :

Hi, I can confirm the @Kévin's problem.

Saving a scanned document as a PDF file result in a missing top part of the page.

Revision history for this message
zmoog (zmoog) wrote :

And this is the scanned document saved as a TIFF file (and this is works as expected).

Revision history for this message
Damien Bally (dbally) wrote :

It appears that the bug reported by Kévin comes from the patch itself. The pdf output is OK when simple-scan is compiled from the original source and executed with C locale.

Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :

I tried to reproduce the bug with 2.32.0-0ubuntu1 version of simple scan ( actual maverick version, I never had it (neither in photo or text mode). It seems to come from the patch I agree.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed patch - it was reusing the same buffer for the width and height so it would always make the output size square. I happened to test it with a square scan!

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Uploaded with fixed patch as simple-scan 2.32.0-0ubuntu3, please accept into proposed.

Changed in simple-scan (Ubuntu):
status: Fix Committed → In Progress
Changed in simple-scan (Ubuntu Maverick):
status: Fix Committed → In Progress
Changed in simple-scan (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

2.32.0-0ubuntu3 accepted into maverick-proposed, please test.

Revision history for this message
Hanky (hankschwie) wrote :

Works fine now - thanks!

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Kévin, Damien, zmoog, can you try the latest version and confirm it fixes the problem for you too with no regression ? Thanks in advance.

Revision history for this message
PEIGNOT Kévin (kpeignot) wrote :

That's good, it works fine!!

Revision history for this message
bojo42 (bojo42) wrote :

backported 2.32.0-0ubuntu3 still works fine. thumbs up for moving to -updates.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

That's great! Thank you for testing and confirming.
marking as verification-done.

Changed in simple-scan (Ubuntu Maverick):
status: In Progress → Fix Committed
tags: added: verification-done
removed: verification-needed
Revision history for this message
zmoog (zmoog) wrote : Re: [Bug 644734] Re: Bad PDF from new versions of Simple Scan

Yep! It works.. thanks..

zmoog
 Il giorno 14/ott/2010 16.21, "Jean-Baptiste Lallement" <
<email address hidden>> ha scritto:
> Kévin, Damien, zmoog, can you try the latest version and confirm it
> fixes the problem for you too with no regression ? Thanks in advance.
>
> --
> Bad PDF from new versions of Simple Scan
> https://bugs.launchpad.net/bugs/644734
> You received this bug notification because you are a direct subscriber
> of the bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simple-scan - 2.32.0-0ubuntu3

---------------
simple-scan (2.32.0-0ubuntu3) maverick-proposed; urgency=low

  * debian/patches/03-blank_pdf.patch:
    - Fix error that caused the output PDF to be square

simple-scan (2.32.0-0ubuntu2) maverick-proposed; urgency=low

  * debian/patches/03_render_bug.patch:
    - Fix crash in page rendering (LP: #645901)
  * debian/patches/04_blank_pdf.patch
    - Fix invalid PDF files generate in locales that use ',' for a decimal point
      (LP: #644734)
 -- Robert Ancell <email address hidden> Wed, 13 Oct 2010 09:27:05 +1100

Changed in simple-scan (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to natty as well.

Changed in simple-scan (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Nuno José (nzalmeida) wrote :

Confirming resolution OK

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Fixed in simple-scan 2.32.0.1

Changed in simple-scan:
status: Fix Committed → Fix Released
Revision history for this message
Thomas Novin (thomasn80) wrote :

I have 2.32.0-0ubuntu4 in Maverick but I still cannot get a working PDF.

After I have scanned as text and saved as PDF this is what I get:

thonov@thonov-ubuntu:~/Documents$ file Scanned\ Document.pdf
Scanned Document.pdf: PDF document, version 1.3
thonov@thonov-ubuntu:~/Documents$ ls -la Scanned\ Document.pdf
-rw-r--r-- 1 thonov thonov 118 2011-01-05 13:47 Scanned Document.pdf

Only 118 bytes..?

Revision history for this message
Thomas Novin (thomasn80) wrote :

One more thing, If I do save as then Scanned Document.pdf is pre-filled as filename. However, if I change it to .jpg I get a working JPEG-file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.