You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "PanQuanyi (JIRA)" <ji...@apache.org> on 2012/10/11 08:47:03 UTC

[jira] [Commented] (PDFBOX-1425) Make PositionWrapper.getTextPosition public

    [ https://issues.apache.org/jira/browse/PDFBOX-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473900#comment-13473900 ] 

PanQuanyi commented on PDFBOX-1425:
-----------------------------------

I also meet the problem, I write a Class BookStripper extends PDFTextStripper
the BookStripper must be put in package "org.apache.pdfbox.util" in order to override the following method
the startPage(...),endPage(...),handleLineSeparation(...),isParagraphSeparation(...),processOperator(...),writePage(...). 
very uncomfortable.
                
> Make PositionWrapper.getTextPosition public
> -------------------------------------------
>
>                 Key: PDFBOX-1425
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1425
>             Project: PDFBox
>          Issue Type: Improvement
>            Reporter: Daniel Bonniot de Ruisselet
>             Fix For: 1.8.0
>
>
> Method PositionWrapper.getTextPosition() is currently protected. The problem is that this limits the ability to extend/customize pdfbox.
> For instance, suppose someone wants to override PDFTextStripper.isParagraphSeparation(PositionWrapper position,  PositionWrapper lastPosition, PositionWrapper lastLineStartPosition, float maxHeightForLine):
> This is intended, since isParagraphSeparation is 'protected'. However, in the subclass (which will be in a different package), it is forbidden to call position.getTextPosition(), which severly limits what can be done.
> Could you please make PositionWrapper.getTextPosition() public?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira