{"id":101,"date":"2009-11-04T19:07:33","date_gmt":"2009-11-05T01:07:33","guid":{"rendered":"http:\/\/www.trancefussion.com\/blog\/?p=101"},"modified":"2010-05-28T11:57:48","modified_gmt":"2010-05-28T17:57:48","slug":"pdftk-not-working-on-ubuntu-9-10-fix","status":"publish","type":"post","link":"https:\/\/www.trancefussion.com\/blog\/?p=101","title":{"rendered":"Pdftk not working on Ubuntu 9.10 – Fix"},"content":{"rendered":"
NOTE: This patch is no longer required for Ubuntu 10.04, as this problem seems to have been fixed. If you notice any errors, and you’d like to contribute, please leave a comment.<\/strong><\/p>\n I maintain several websites where this utility is used to produce PDFs. I took the bold decision to upgrade one of my production servers to 9.10, regardless of the risks. Reason being that I rather learn to operate a new operative system, for whenever it happens that a client decides to commit the same So anyway, after the update to 9.10, Pdftk stopped working. I wasn’t really sure what the problem was after looking at the logs, so I googled around for an answer. The error I was getting was this message, whenever I tried to make a PDF with Pdftk:<\/p>\n glyphlist.txt loading error: glyphlist.txt not found as resource. (It must exist as resource in the package com.lowagie.text.pdf.fonts) Basically, what this error is saying is that the itext-2.1.5 library cannot be found, even though it’s already installed. It took me quite a while to understand this exactly, apparently this error is due to a hardcoded line that wasn’t changed in the newer builds, or something to that effect. So the solution is to tell Pdftk where to find it.<\/p>\nmistake<\/del> bold decisions like me.<\/p>\n
\nHelvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
\nUnhandled Java Exception:
\nExceptionConverter: com.lowagie.text.DocumentException: Helvetica not found as resource. (The *.afm files must exist as resources in the package com.lowagie.text.pdf.fonts)
\nat com.lowagie.text.pdf.Type1Font.(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.BaseFont.createFont(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.DocumentFont.doType1TT(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.DocumentFont.(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.AcroFields.decodeGenericDictionary(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.AcroFields.getAppearance(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.AcroFields.setField(itext-2.1.5.jar.so)
\nat com.lowagie.text.pdf.AcroFields.setFields(itext-2.1.5.jar.so)<\/em><\/p>\n