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

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

for example:
if i rewrite the method handleLineSeparation() of Class 
org.apache.pdfbox.util.PDFTextStripper:

protected PositionWrapper handleLineSeparation(PositionWrapper current, 
PositionWrapper lastPosition, PositionWrapper lastLineStartPosition, float 
maxHeightForLine) throws IOException{
......
}
I need to use the parameter passed by, such as (PositionWrapper current), but 
the PositionWrapper's method getTextPosition() is protected, not visible in 
other package;

such situation is in common when I try to rewrite several other method in class 
 org.apache.pdfbox.util.PDFTextStripper.
                
> 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

Reply via email to