lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Litchfield <...@csh.rit.edu>
Subject Re: PdfBox 0.6.1
Date Wed, 30 Apr 2003 19:11:10 GMT
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


Mime
View raw message