"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "examples/src/main/java/org/apache/pdfbox/examples/lucene/LucenePDFDocument.java" between
pdfbox-2.0.23-src.zip and pdfbox-2.0.24-src.zip

About: Apache PDFBox is a Java PDF library tool that allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents.

LucenePDFDocument.java  (pdfbox-2.0.23-src):LucenePDFDocument.java  (pdfbox-2.0.24-src)
skipping to change at line 418 skipping to change at line 418
addTextField(document, "Trapped", info.getTrapped()); addTextField(document, "Trapped", info.getTrapped());
} }
int summarySize = Math.min(contents.length(), 500); int summarySize = Math.min(contents.length(), 500);
String summary = contents.substring(0, summarySize); String summary = contents.substring(0, summarySize);
// Add the summary as an UnIndexed field, so that it is stored and r eturned // Add the summary as an UnIndexed field, so that it is stored and r eturned
// with hit documents for display. // with hit documents for display.
addUnindexedField(document, "summary", summary); addUnindexedField(document, "summary", summary);
} }
catch (InvalidPasswordException e) catch (InvalidPasswordException e)
{ {
// they didn't suppply a password and the default of "" was wrong. // they didn't supply a password and the default of "" was wrong.
throw new IOException("Error: The document(" + documentLocation + ") is encrypted and will not be indexed.", e); throw new IOException("Error: The document(" + documentLocation + ") is encrypted and will not be indexed.", e);
} }
finally finally
{ {
if (pdfDocument != null) if (pdfDocument != null)
{ {
pdfDocument.close(); pdfDocument.close();
} }
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)