pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: processPages bug?
Date Fri, 04 Dec 2015 19:57:26 GMT
Am 04.12.2015 um 20:31 schrieb britt fitch:
> 2.
> The first line in processPages has a document object that is null 
> unless you call getText() first.
> Is the correct behavior to call getText before being able to call 
> processPages?
> 3.
> processPage(…) doesn’t appear to do anything unless its called from 
> processPages(…) because currentPageNo is not set if you just call 
> processPage(…) directly.
> This method probably can’t be made private because its an override but 
> should it either remove the check for currentPageNo or otherwise throw 
> an exception / log a warning?

I don't know much about these, I fixed several issues in text extraction 
but I don't use it much. The normal way to do it is to call writeText or 
getText (which calls writeText) and maybe to override certain  methods 
for additional fun. (e.g. in DrawPrintTextLocations).

But you're probably right, there should be an IllegalStateException if 
processPages is called directly without initialization first. But I 
won''t do this myself, for the reason above :-)


To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message