Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-10 Thread Olivier Berger
Le jeudi 09 juin 2011 à 20:40 +0200, Konstantinos Poulios a écrit : > @Oliver > try replacing: > > >>if line[-1] in "0123456789t": > >>stream.seek(-1, 1) > >>offset, generation = line[:16].split(" ") > > with: > > >>for c in line[-2:]: > >>if c in "0123456789t": > >>stream.seek(

Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-09 Thread Konstantinos Poulios
Hi, I am not familiar with the PDF specification but reading the last comment before line 755 in pdf.py it becomes quite clear what is happening here. pypdf according to the PDF spec, expects at that position a line of fixed size 20. It can additionally tolerate malformed files where the line is

Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-09 Thread Serafeim Zanikolas
Thanks Olivier. Konstantinos, would you please check out the report for #628891 (latest message shown below)? Is this a known issue with pyPdf? I'm sorry but I don't have time to dig into this further. On Sun, Jun 05, 2011 at 10:52:28PM +0200, Olivier Berger wrote: > Le jeudi 02 juin 2011 à 12:58

Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-05 Thread Olivier Berger
Le jeudi 02 juin 2011 à 12:58 +0200, Serafeim Zanikolas a écrit : > - reproduce the problem > - and report back the printed output Here's the output, then : $ pdfshuffler .15 n 00. Traceback (most recent call last): File "/usr/bin/pdfshuffler", line 417, in choose_export_pdf_name

Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-02 Thread Serafeim Zanikolas
Thanks for the report Olivier. The problem originates from pypdf, it seems. Would you please: - temporarily add this print statement to /usr/lib/pymodules/python2.6/pyPdf/pdf.py print '.%s.' % line write before line 754, which currently has: > offset, generation = line[:16].split(" "

Bug#628891: pdfshuffler: Errors when trying to save to a file

2011-06-02 Thread Olivier Berger
Package: pdfshuffler Version: 0.5.1-1 Severity: normal Hi. When trying to save to a file, I get : Traceback (most recent call last): File "/usr/bin/pdfshuffler", line 417, in choose_export_pdf_name self.export_to_file(file_out) File "/usr/bin/pdfshuffler", line 438, in export_to_file