You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Andrew Bogdanov <ab...@accusoft.com> on 2016/09/02 17:18:35 UTC

PDFBox Bug: Incorrect position for the Acroform Fields for specific PDF

Hello! I've been writing to you before, it's my original message:

Hello. My name is Andrew. I'm a developer from Accusoft corp. We are
using PDFBox as a base for extracting Acroforms Fields information
from PDF that was created using Adobe Acrobat Reader DC Pro. We are
using next properties to position fields on top of the document after
conversion: http://take.ms/Qn5a8  *rect.getLowerLeftX();*
*rect.getLowerLeftY();*  *rect.getUpperRightX();*
*rect.getUpperRightY();*  I'm attaching 2 documents that are quite
similar and both have acroform fields inside of them. Positions of
fields in both documents are identical when viewed inside Acrobat DC,
though when processed through PDFBox we receive different position
values. *f1040--2011.pdf *document field positions are correct, though
*f1040--2008.pdf* document positions are shifted to some amount, that
shift is the same for all fields in the document as if some kind of
margin was applied to the fields. http://take.ms/YnFJc  Could you
provide us with the information about whether it's an issue of PDFBox
and how it might be fixed?  Thanks for help.

You replied:

You didn't tell which field (name) is different. However I noticed that the
two files have different cropboxes / mediaboxes.
Tilman

Answering your question:
1. All fields in the document are shifted to some defined amount from their
original positions when viewed in the Adobe Acrobat DC
2. So, you are saying that those boxes position should also be taken into
account when positioning Acroform Fields? Could you send me a method name
that can provide those values for the boxes?
Thanks.

Re: PDFBox Bug: Incorrect position for the Acroform Fields for specific PDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 02.09.2016 um 19:18 schrieb Andrew Bogdanov:
> Hello! I've been writing to you before, it's my original message:
> Hello. My name is Andrew. I'm a developer from Accusoft corp. We are using PDFBox as a base for extracting Acroforms Fields information from PDF that was created using Adobe Acrobat Reader DC Pro. We are using next properties to position fields on top of the document after conversion:http://take.ms/Qn5a8   *rect.getLowerLeftX();*  *rect.getLowerLeftY();*  *rect.getUpperRightX();* *rect.getUpperRightY();*  I'm attaching 2 documents that are quite similar and both have acroform fields inside of them. Positions of fields in both documents are identical when viewed inside Acrobat DC, though when processed through PDFBox we receive different position values. *f1040--2011.pdf *document field positions are correct, though *f1040--2008.pdf* document positions are shifted to some amount, that shift is the same for all fields in the document as if some kind of margin was applied to the fields.http://take.ms/YnFJc   Could you provide us with the information about whether it's an issue of PDFBox and how it might be fixed?  Thanks for help.
> You replied:
>
> You didn't tell which field (name) is different. However I noticed 
> that the two files have different cropboxes / mediaboxes.
> Tilman
>
> Answering your question:
> 1. All fields in the document are shifted to some defined amount from 
> their original positions when viewed in the Adobe Acrobat DC
> 2. So, you are saying that those boxes position should also be taken 
> into account when positioning Acroform Fields? Could you send me a 
> method name that can provide those values for the boxes?
> Thanks.



PDPage.getCropBox()
PDPage.getMediaBox()