#22 Can't export a PDF page that contains only an image

v1.0 (example)
closed-fixed
nobody
None
5
2015-10-18
2011-04-20
No

I can successfully import the attached pdf (I get a thumbnail) but exporting it just produces an empty page.

System Archlinux x64

Thanks

Discussion

  • Arthur Țițeică

    The source document. A PDF that contains only an image.

     
  • logari81

    logari81 - 2011-05-23
    • status: open --> open-accepted
     
  • alister.hood

    alister.hood - 2011-05-24

    I think this will be a problem with the pypdf library, not pdfshuffler itself.

    FYI if you open the exported pdf in Adobe Reader instead of a poppler based program you get an error message "insufficient data for an image". I remember bugs in pdfedit that produced the same result, but I doubt that they would be directly related.

     
  • rpr

    rpr - 2011-08-04

    I have encountered a very similar problem on Ubuntu 11.04.

    When I import a PDF file produced by scanning, pdfshuffler is not able to export a PDF file -- when the Save button is clicked in the Export window the specified PDF file is not created and the following error is printed:

    Traceback (most recent call last):
    File "/usr/bin/pdfshuffler", line 411, in choose_export_pdf_name
    self.export_to_file(file_out)
    File "/usr/bin/pdfshuffler", line 432, in export_to_file
    pdfdoc_inp = PdfFileReader(file(pdfdoc.copyname, 'rb'))
    File "/usr/lib/pymodules/python2.7/pyPdf/pdf.py", line 277, in __init__
    self.read(stream)
    File "/usr/lib/pymodules/python2.7/pyPdf/pdf.py", line 651, in read
    offset, generation = line[:16].split(" ")
    ValueError: too many values to unpack

    versions:
    Linux 2.6.38-11-generic #47-Ubuntu SMP Fri Jul 15 19:27:09 UTC 2011 x86_64 GNU/Linux
    pdfshuffler ver. 0.5-2
    python-pypdf ver. 1.12-3

    A test PDF file produced by Simple Scan 2.32.0.1 can be downloaded at
    http://www.tempfiles.net/download/201108/206185/test4.html

    -- rpr.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-03

    This issue still exists in pdfshuffler 0.6.0 with python-pypdf 1.13-1 (tested on Ubuntu 12.04 64-bit).

    -- rpr.

     
  • logari81

    logari81 - 2014-11-05

    this bug is fixed in pypdf2
    https://github.com/mstamy2/PyPDF2

    now pdfshuffler supports pypdf2 as an alternative to pypdf, so I am closing this.

     
  • logari81

    logari81 - 2014-11-05
    • status: open-accepted --> closed-fixed
    • Group: --> v1.0 (example)
     
  • rpr

    rpr - 2015-10-18

    How to make pdfshuffler work with pypdf2? Latest Debian and Ubuntu do not have the pdfshuffler package that depends on python-pypdf2.

     
    Last edit: rpr 2015-10-18

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks