"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripperByArea.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.

PDFTextStripperByArea.java  (pdfbox-2.0.23-src):PDFTextStripperByArea.java  (pdfbox-2.0.24-src)
skipping to change at line 115 skipping to change at line 115
} }
/** /**
* Process the page to extract the region text. * Process the page to extract the region text.
* *
* @param page The page to extract the regions from. * @param page The page to extract the regions from.
* @throws IOException If there is an error while extracting text. * @throws IOException If there is an error while extracting text.
*/ */
public void extractRegions( PDPage page ) throws IOException public void extractRegions( PDPage page ) throws IOException
{ {
for (String region : regions) for (String regionName : regions)
{ {
setStartPage(getCurrentPageNo()); setStartPage(getCurrentPageNo());
setEndPage(getCurrentPageNo()); setEndPage(getCurrentPageNo());
//reset the stored text for the region so this class // reset the stored text for the region so this class can be reused.
//can be reused.
String regionName = region;
ArrayList<List<TextPosition>> regionCharactersByArticle = new ArrayL ist<List<TextPosition>>(); ArrayList<List<TextPosition>> regionCharactersByArticle = new ArrayL ist<List<TextPosition>>();
regionCharactersByArticle.add( new ArrayList<TextPosition>() ); regionCharactersByArticle.add( new ArrayList<TextPosition>() );
regionCharacterList.put( regionName, regionCharactersByArticle ); regionCharacterList.put( regionName, regionCharactersByArticle );
regionText.put( regionName, new StringWriter() ); regionText.put( regionName, new StringWriter() );
} }
if( page.hasContents() ) if( page.hasContents() )
{ {
processPage( page ); processPage( page );
} }
 End of changes. 2 change blocks. 
4 lines changed or deleted 2 lines changed or added

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