You are not logged in.

#1 2012-03-23 20:34:15

rugantino
Member
Registered: 2011-07-02
Posts: 13

pdftk throws exceptions and produces bad output after upgrade

PDFTK BUG

I have errors from pdftk, and the pdf files that come out are unusable.

I just installed the pdftk 1.44-5 (AUR package) in a freshly installed Arch Linux 64-bit system. I installed this package first manually, directly from AUR, and a second time using Yaourt, with exactly the same results.
[I had used pdftk on the previous install (a couple of months ago) of Arch Linux on the same machine, and that worked without any problems. Also, the latter installed instantly, while the new one had to go through half an hour of an enormous gcc-gcj installation.]

        Nature of the problem

When I run pdftk I get the following messages:

tt@pks:~/beazwork$ pdftk body.pdf cat 645   output page.pdf
Unhandled Java Exception:
Unhandled Java Exception:
java.lang.NullPointerException
   at gnu.gcj.runtime.NameFinder.lookup(libgcj.so.12)
   at java.lang.Throwable.getStackTrace(libgcj.so.12)
   at java.lang.Throwable.stackTraceString(libgcj.so.12)
   at java.lang.Throwable.printStackTrace(libgcj.so.12)
   at java.lang.Throwable.printStackTrace(libgcj.so.12)

When I play back the resulting file, I get the following messages:

tt@pks:~/beazwork$ xpdf page.pdf
Warning: Cannot convert string "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1" to type FontStruct
Warning: Cannot convert string "-*-courier-medium-r-normal--12-*-*-*-*-*-iso8859-1" to type FontStruct
Warning: Cannot convert string "-*-times-bold-i-normal--20-*-*-*-*-*-iso8859-1" to type FontStruct
Warning: Cannot convert string "-*-times-medium-r-normal--14-*-*-*-*-*-iso8859-1" to type FontStruct
Syntax Error: Couldn't read xref table
Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table

        Questions

1. The gcc version currently supplied by Arch Linux is gcc 4.6.3.
Mine is a 64-bit system; could it be an issue of 32 vs 64 bits?
2. Is there a simpler, perhaps older, monolithic binary that I can use in the
interim?
3. Any way or hope I could be running pdftk again any time soon?

-------------------------------- 120323 updates
        First answers

stefan-husmann from aur-dev replied to the above questions as follows:
1. No
2. There is pdftk-bin in AUR.
3. Works fine here

I replaced pdftk (1.44-5) with pdftk-bin (1.44-4), and got exactly the same behavior. Where do I bang my head?
problems.

-------------------------------- 120324 updates
I decided to seek an alternative to pdftk. While looking for it I found the
pyPdf module, which provides Python objects for most of the operations
performed by pdftk.  Note that many web sites mention in this context that
pdftk has not been maintained for long and has creeping "bit-rot;" apparently,
its java code no longer matches the gss-gcj compiler, and patches for one or the
other are not being developed.
After installing the pyPdf and starting playing with, I discovered that there
is command-line level Python program, stapler, based on pyPdf, which offer much
of the functionality of pdftk. Stapler has been improved over the very modest
original description (for instance, now it doe ranges besides single pages),
and actually fits my bill well. So this is my solution.

Unless somebody shows me how to make pdftk viable (THAT WOULD BE LOVELY OF COURSE), with much regret I must
consider the pdftk closed for the moment.

Last edited by rugantino (2012-03-25 05:10:32)

Offline

#2 2012-05-27 21:34:34

Layus
Member
Registered: 2012-04-30
Posts: 12

Re: pdftk throws exceptions and produces bad output after upgrade

Got the same bug with evince and xpdf.

Reverting to poppler to poppler-0.18.4-2-x86_64 solved the problem.

poppler-0.20.0-1-x86_64 (latest update) seems to be broken somehow ?

Offline

Board footer

Powered by FluxBB