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

Roman commented on PDFBOX-3616:
-------------------------------

Thanks anyway, 
the issue on our side was fixed by updating the code to become as shown below. 
I'm closing this.

{code}
PDRectangle viewerBox = useCropBox ? pdPage.findCropBox() : 
pdPage.findMediaBox();
//<.....CUT....>
                        if (!useCropBox) {
                                PDRectangle cropBox = pdPage.findCropBox();
                                float dx0 = cropBox.getLowerLeftX() - 
viewerBox.getLowerLeftX();
                                float dy0 = cropBox.getLowerLeftY() - 
viewerBox.getLowerLeftY()
                                                +  viewerBox.getUpperRightY() - 
cropBox.getUpperRightY() - cropBox.getLowerLeftY();
                        }
{code}

> Characters shifted up
> ---------------------
>
>                 Key: PDFBOX-3616
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3616
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Roman
>              Labels: how-to
>         Attachments: 00051-2a7-00052-2a7.pdf, 
> 00051-2a7-00052-2a7.pdf_page0.pdf, CropBoxMode_viewer.png, 
> PDFBOX-3616-marked-1-nocrop.png, PDFBOX-3616-marked-1.png, screenshot-1.png
>
>
> We have tried this on both 1.8.12 and 2.0.3 versions and got the same result 
> - character positions are shifted up. 
> We are assuming X and Y positions are relative to CropBox. 
> See [^screenshot-1.png], yellow highlights are upper than the texts.
> PDF doc is attached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to