Bug 494785
Summary: | itext: *.afm files missing from com.lowagie.text.pdf.fonts? | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Need Real Name <karlcz> | ||||||
Component: | itext | Assignee: | Orcan Ogetbil <oget.fedora> | ||||||
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 10 | CC: | aph, jochen, nelash_jindal14, oget.fedora | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 1.41-15.fc10 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-13 19:36:58 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Need Real Name
2009-04-08 04:29:59 UTC
No, those files are there. [orcan@desitter ~]$ unzip -l /usr/share/java/itext-2.1.5.jar|grep Helvetica 72096 01-01-80 00:00 com/lowagie/text/pdf/fonts/Helvetica-Bold.afm 72192 01-01-80 00:00 com/lowagie/text/pdf/fonts/Helvetica-BoldOblique.afm 77443 01-01-80 00:00 com/lowagie/text/pdf/fonts/Helvetica-Oblique.afm 77343 01-01-80 00:00 com/lowagie/text/pdf/fonts/Helvetica.afm [orcan@desitter ~]$ I could try to reproduce your results if only I knew what an FDF file was. (and where I could find one.) Created attachment 338715 [details] a dummy form data file to test with Downloading http://www.irs.gov/pub/irs-pdf/f1040.pdf and this attachment allows the bug to be repeated by running: pdftk f1040.pdf fill_form data-f1040.fdf output f1040-filled.pdf The expected result would be the form with the dummy values entered into its fields, rather than an exception about fonts. Okay, now I confirmed the bug. Let's see what we can do about it. I made some scratch builds with a fix. Could you test it? For F-10: http://koji.fedoraproject.org/koji/taskinfo?taskID=1285736 For F-11: http://koji.fedoraproject.org/koji/taskinfo?taskID=1285741 I tried pdftk-1.41-15.fc10.x86_64.rpm and it now works for me using the same test that failed previously. Created attachment 338948 [details]
A patch
pdftk-1.41-15.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/pdftk-1.41-15.fc10 karlcz, the above update that I submitted is slightly different than what you downloaded. The scratch build you tested had those font metric files (.afm) hardcoded in the pdftk binary, which was not the best solution. Andrew's patch, however, sets the proper classpath to itext, so that pdftk uses those font metrics from the itext.jar file. In the end both solutions will work equally well. Andrew's solution (which is in the above update) is more elegant, as it doesn't include .afm files that don't belong to pdftk. For your information. pdftk-1.41-15.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. problem: i have tried pdftk with its add command to insert some data into a PDF document. It throws an exception which implies some resources are missing from itext, and my naive googling suggests this is a build error of some kind (but I'm not expert on itext). iText 2.1.5 (by lowagie.com) Helvetica not found as resource. (The *.afm files must exist as resources in the package core.com.lowagie.text.pdf.fonts) Exception in thread "main" ExceptionConverter: java.io.IOException: The document has no pages. at core.com.lowagie.text.pdf.PdfPages.writePageTree(PdfPages.java:117) at core.com.lowagie.text.pdf.PdfWriter.close(PdfWriter.java:1153) at core.com.lowagie.text.pdf.PdfDocument.close(PdfDocument.java:820) at core.com.lowagie.text.Document.close(Document.java:480) at helloworld.main(helloworld.java:25) Expected result:should not throw any exception Nelash, Could you post the output of your rpm -q itext pdftk bouncycastle-mail Thanks! Thanks for replying oran.. here i am forwading you my small program.since i am a beginer so statring with small programs.. Document document = new Document(); try { PdfWriter.getInstance(document, new FileOutputStream("HelloWorld.pdf")); document.open(); document.add( new Paragraph("Hello World")); } catch (Exception e) { // handle exception } document.close(); its output is: Helvetica not found as resource. (The *.afm files must exist as resources in the package core.com.lowagie.text.pdf.fonts) Exception in thread "main" ExceptionConverter: java.io.IOException: The document has no pages. at core.com.lowagie.text.pdf.PdfPages.writePageTree(PdfPages.java:117) at core.com.lowagie.text.pdf.PdfWriter.close(PdfWriter.java:1153) at core.com.lowagie.text.pdf.PdfDocument.close(PdfDocument.java:820) at core.com.lowagie.text.Document.close(Document.java:480) at helloworld.main(helloworld.java:28) please provide me its solution Nelash, I really need the "rpm -q itext pdftk bouncycastle-mail" output that I said in comment #11 to help you. It's always good to report the Fedora and the program versions when you are reporting bugs. ORCAN i have already told u that i am a begineer.. si i don't know wats that.. i mean wat is "rpm -q itext pdftk bouncycastle-mail" You have to open a terminal, and type rpm -q itext pdftk bouncycastle-mail Then push ENTER. It will give you an output. Copy and paste that output here. orcan u are talking for redhat os but i want to work with windows.. so could u tell me abt hw to solve this prob in windows xp and eclipse xml editor. Nelash, this is the Red Hat bug database. It exists for bugs in Red Hat and Fedora systems. I think the problem you are having is probably due to itext or pdftk not having been built correctly, but as I have no idea where you got them from it's very hard to know for certain. andrew can u tell does this itext work with windows xp or not? and can you forward me the link from where i can download itext.. is there any one known to you who could help in solving this prob. in windows..? |