itext: *.afm files missing from com.lowagie.text.pdf.fonts

Bug #450544 reported by Lars Volker
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
pdftk (Ubuntu)
Fix Released
Undecided
Johann Felix Soden

Bug Description

Binary package hint: pdftk

Running latest pdftk causes an error to happen:

pdftk Vorlage.pdf fill_form gen.fdf output filled.pdfHelvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
Unhandled Java Exception:
ExceptionConverter: com.lowagie.text.DocumentException: Helvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
   at com.lowagie.text.pdf.Type1Font.<init>(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.DocumentFont.doType1TT(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.DocumentFont.<init>(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.AcroFields.decodeGenericDictionary(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.AcroFields.getAppearance(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
   at com.lowagie.text.pdf.AcroFields.setFields(itext-2.1.5.jar.so)

The fdf-file was created with generate_fdf.

I found the same bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=494785

Can this issue exist in karmic as well?

ProblemType: Bug
Architecture: amd64
Date: Tue Oct 13 19:37:18 2009
DistroRelease: Ubuntu 9.10
Package: pdftk 1.41+dfsg-1
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-13.43-generic
SourcePackage: pdftk
Uname: Linux 2.6.31-13-generic x86_64

Revision history for this message
Lars Volker (lv) wrote :
Revision history for this message
Johann Felix Soden (johfel) wrote :

Adding /usr/share/java/itext.jar to my_classpath in patch debian/patches/set_classpath solves the problem.

Revision history for this message
Samuel Cantrell (samcan) wrote :

I confirm Johann Felix Soden's experience; bug affected me, I rebuilt package and modified patch, and installed. Tested filling the form, and it works.

Thank you!

Revision history for this message
Alan Orth (aorth) wrote :

I also confirm that Johann Soden's tip fixes this bug. Get the source and Ubuntu patches from http://packages.ubuntu.com/karmic/pdftk, then recompile (the "Debian way" using dpkg-buildpackage, for any curious readers who don't know). Working great!

Revision history for this message
fptmark (markm-visionsw) wrote :

I can also confirm that the tip allows pdftk to build, however I am getting a run time error when doing a fill_form operation on a specific pdf using an xfdf as input (it works fine for my other pdf's). The error message is:

GC Warning: Repeated allocation of very large block (appr. size 4198400):
 May lead to memory leak and poor performance.
GC Warning: Repeated allocation of very large block (appr. size 1646592):
 May lead to memory leak and poor performance.

Note the size and number of warnings (sometimes 2 and others 3) varies for the same pdf file. It is not the file size as the one that fails is about 0.5MB while I have larger files that work fine.

Revision history for this message
andersvinther (anders-vinther) wrote :

For people like me who are a bit challenged adding patches there is a detailed guide on how to do this here: http://www.trancefussion.com/blog/?p=101

Revision history for this message
Johann Felix Soden (johfel) wrote :

This bug was fixed in pdftk 1.41+dfsg-4. Lucid includes pdftk 1.41+dfsg-7.

Changed in pdftk (Ubuntu):
assignee: nobody → Johann Felix Soden (johfel)
status: New → Fix Released
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.