Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 72351 invoked from network); 30 Apr 2003 19:11:11 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 30 Apr 2003 19:11:11 -0000 Received: (qmail 7907 invoked by uid 97); 30 Apr 2003 19:13:14 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 7900 invoked from network); 30 Apr 2003 19:13:14 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 30 Apr 2003 19:13:14 -0000 Received: (qmail 72063 invoked by uid 500); 30 Apr 2003 19:11:07 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 72036 invoked from network); 30 Apr 2003 19:11:06 -0000 Received: from blacksheep.csh.rit.edu (129.21.60.6) by daedalus.apache.org with SMTP; 30 Apr 2003 19:11:06 -0000 Received: from fury.csh.rit.edu (fury.csh.rit.edu [2001:470:1f00:135:a00:20ff:fe8d:5399]) by blacksheep.csh.rit.edu (Postfix) with ESMTP id E4E973F7 for ; Wed, 30 Apr 2003 15:11:10 -0400 (EDT) Received: by fury.csh.rit.edu (Postfix, from userid 38448) id 8B7A7124C; Wed, 30 Apr 2003 15:11:10 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fury.csh.rit.edu (Postfix) with ESMTP id 5F4C211C2 for ; Wed, 30 Apr 2003 15:11:10 -0400 (EDT) Date: Wed, 30 Apr 2003 15:11:10 -0400 (EDT) From: Ben Litchfield To: Lucene Users List Subject: Re: PdfBox 0.6.1 In-Reply-To: <200304301905.0588@th00.opsion.fr> Message-ID: References: <200304301905.0588@th00.opsion.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Version 0.6.2 is available here http://sourceforge.net/project/showfiles.php?group_id=78314 Can you please tell us what the exception is and if it is pdfbox specific to post it to the pdfbox mailing list( also available on the sourceforge site ). Ben Litchfield http://www.pdfbox.org http://www.sourceforge.net/projects/pdfbox On Wed, 30 Apr 2003 cfrancoys@ibelgique.com wrote: > Hi everybody, > > I'm new to pdfbox that I recently downloaded (latest > version: 0.6.1). It seems easy to use but I'm > experiencing troubles using it : > > The following sample code I wrote compiles but raises > an exception when reaching the > LucenePDFDocument.getDocument method ... > > > File f = new File("test.pdf"); > if ( f != null && f.exists() && f.isFile() > && ( f.getName().endsWith(".pdf") > || f.getName().endsWith(".PDF") ) ){ > try { > // try to get a pdf document > Document pdfDoc = org.pdfbox.searchengine. > lucene.LucenePDFDocument.getDocument(f); > Field lucField = pdfDoc.getField("contents"); > if ( lucField != null ) > System.out.println( "document : " + > lucField.readerValue() ); > BufferedReader contentsReader = > new BufferedReader( lucField.readerValue() ); > > String line = null; > while( (line = contentsReader.readLine() ) != > null ){ > System.out.println( line ); > } > } catch ( Throwable t ){ > System.out.println("Error parsing the pdf file > : "+"Exception : " + t.getMessage()); > } > > > Any idea of what I'm doing wrong ? > > > Cedric Francoys > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org