Return-Path: Delivered-To: apmail-incubator-pdfbox-dev-archive@locus.apache.org Received: (qmail 97122 invoked from network); 6 Jan 2009 19:43:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 19:43:13 -0000 Received: (qmail 68278 invoked by uid 500); 6 Jan 2009 19:43:13 -0000 Delivered-To: apmail-incubator-pdfbox-dev-archive@incubator.apache.org Received: (qmail 68238 invoked by uid 500); 6 Jan 2009 19:43:13 -0000 Mailing-List: contact pdfbox-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pdfbox-dev@incubator.apache.org Delivered-To: mailing list pdfbox-dev@incubator.apache.org Received: (qmail 68227 invoked by uid 99); 6 Jan 2009 19:43:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 11:43:13 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 19:43:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 52079234C485 for ; Tue, 6 Jan 2009 11:42:44 -0800 (PST) Message-ID: <997870378.1231270964334.JavaMail.jira@brutus> Date: Tue, 6 Jan 2009 11:42:44 -0800 (PST) From: =?utf-8?Q?Andreas_Lehmk=C3=BChler_=28JIRA=29?= To: pdfbox-dev@incubator.apache.org Subject: [jira] Resolved: (PDFBOX-348) java.lang.NoClassDefFoundError: org/fontbox/afm/AFMParser In-Reply-To: <1192514900.1217872244266.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PDFBOX-348?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmk=C3=BChler resolved PDFBOX-348. --------------------------------------- Resolution: Invalid Fix Version/s: 0.8.0-incubator I guess the solution is to add the missing jar(s) and not a problem with pd= fbox. > java.lang.NoClassDefFoundError: org/fontbox/afm/AFMParser > --------------------------------------------------------- > > Key: PDFBOX-348 > URL: https://issues.apache.org/jira/browse/PDFBOX-348 > Project: PDFBox > Issue Type: Bug > Components: Text extraction > Reporter: Jukka Zitting > Fix For: 0.8.0-incubator > > > [Issue from SourceForge] > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1915332&grou= p_id=3D78314&atid=3D552832 > Hi all. > Been trying to get the PDFTextStripper to work with simple PDF files but = I > usually get two results with my code: > 1.) I get nothing at all. > 2.) I get an error. Part of which says "java.lang.NoClassDefFoundError: > org/fontbox/afm/AFMParser". > Here is a sample of my code: > public String getPDF(String strDirectory, String strFilename) { > String strContents =3D ""; > File PDFDoc =3D new File(strDirectory + "\\" + strFilename); > try { > FileInputStream fis =3D new FileInputStream(PDFDoc); > strContents =3D strFilename + " was found.

"; > try { > PDDocument pdDoc =3D null; > PDFParser parseDoc =3D new PDFParser(fis); > parseDoc.parse(); > pdDoc =3D parseDoc.getPDDocument(); > pdDoc.getNumberOfPages(); > try { > PDFTextStripper stripper =3D new PDFTextStripper(); > strContents =3D stripper.getText(pdDoc); > } catch(IOException e) { > return "Error encountered while stripping text: " + > e.getMessage(); > } > return "strContents: " + strContents; > } catch(IOException e) { > return "Error encountered while trying to parse PDF document: " > + e.getMessage(); > } > } catch(FileNotFoundException e) { > return "Error encountered while trying to do a FileInputStream: " > + e.getMessage(); > } > } > Can anybody here please tell me what I am doing wrong? > Thanks! > [Comment on SourceForge] > Date: 2008-04-06 15:56 > Sender: david_keller > Logged In: YES=20 > user_id=3D2056038 > Originator: NO > I had the same pb, and I put in my lib directory this 2 jar > FontBox-0.1.0.jar and checkstyle-all-4.2.jar. > And know it's work > [Comment on SourceForge] > Date: 2008-04-10 10:31 > Sender: ocm-zeeman > Logged In: YES=20 > user_id=3D684413 > Originator: NO > Downloading fontbox from http://www.fontbox.org ?! --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.