You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Fabio Salvi <sa...@gmail.com> on 2017/07/03 08:11:39 UTC

Re: Fwd: Problems with flattening

Hi Tilman,

Thank you for your antwort!  Yes, I'm using the version 2.0.6. The link is
https://drive.google.com/drive/folders/0BzbTsB09y4XwM1YzVWJzSzl2NXc

The Test tries to set all the fields texts to 'test' in the static pdf form
Test.pdf. The result is pippo.pdf. The texts were set but there's a shift
of the string to right of a char (see Capture.PNG)...I suppose that is
caused by the flattening..

I wonder whether that has to do  with my Form...but as I try to set the
values by hand, the texts aren't shifted...

Thank you very much!
Regards Fabio





2017-06-30 20:03 GMT+02:00 Tilman Hausherr <TH...@t-online.de>:

> Hi,
>
> Make sure you're using the latest version, 2.0.6. Please upload your files
> (including your PDF file) to a sharehoster.
>
> Tilman
>
> Am 30.06.2017 um 18:42 schrieb Fabio Salvi:
>
>>
>>     Hi all,
>>
>>     I'm using PDFBox to full a PDFForm and it works very well. I have
>>     a Problem as I try to flatten the Document. The field texts are
>>     moved to the right by a char and not aligned with the label.
>>
>>     Have you an idea what can cause such a problem?
>>
>>     Inline-Bild 1
>>
>>     Hier my code:
>>     Inline-Bild 2
>>
>>     Thank you very much in advance!
>>     Regards
>>     Fabio
>>
>>
>

Re: Fwd: Problems with flattening

Posted by Fabio Salvi <sa...@gmail.com>.
Hi Tilman

unfortunately I Need the XFA Form so I cannot remove it. All the same I
found a Workaround: namely to shift the label to right by a char as well :-)

Thank you very much for your help!
Regards
Fabio

2017-07-03 18:31 GMT+02:00 Tilman Hausherr <TH...@t-online.de>:

> Am 03.07.2017 um 10:11 schrieb Fabio Salvi:
>
>> Hi Tilman,
>>
>> Thank you for your antwort!  Yes, I'm using the version 2.0.6. The link is
>> https://drive.google.com/drive/folders/0BzbTsB09y4XwM1YzVWJzSzl2NXc
>>
>> The Test tries to set all the fields texts to 'test' in the static pdf
>> form
>> Test.pdf. The result is pippo.pdf. The texts were set but there's a shift
>> of the string to right of a char (see Capture.PNG)...I suppose that is
>> caused by the flattening..
>>
>> I wonder whether that has to do  with my Form...but as I try to set the
>> values by hand, the texts aren't shifted...
>>
>
> I wasn't able to edit the form without enabling javascript (which I
> didn't) and I noticed it's also an XFA form. So I removed the XFA part
>
> pDAcroForm.setXFA(null);
>
> and then I edited and noticed the texts are also slightly shifted in Adobe
> Reader - please try this yourself.
>
> Maybe the XFA has priority and it has different coordinates than AcroForm.
>
> Tilman
>
>
>
>> Thank you very much!
>> Regards Fabio
>>
>>
>>
>>
>>
>> 2017-06-30 20:03 GMT+02:00 Tilman Hausherr <TH...@t-online.de>:
>>
>> Hi,
>>>
>>> Make sure you're using the latest version, 2.0.6. Please upload your
>>> files
>>> (including your PDF file) to a sharehoster.
>>>
>>> Tilman
>>>
>>> Am 30.06.2017 um 18:42 schrieb Fabio Salvi:
>>>
>>>      Hi all,
>>>>
>>>>      I'm using PDFBox to full a PDFForm and it works very well. I have
>>>>      a Problem as I try to flatten the Document. The field texts are
>>>>      moved to the right by a char and not aligned with the label.
>>>>
>>>>      Have you an idea what can cause such a problem?
>>>>
>>>>      Inline-Bild 1
>>>>
>>>>      Hier my code:
>>>>      Inline-Bild 2
>>>>
>>>>      Thank you very much in advance!
>>>>      Regards
>>>>      Fabio
>>>>
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
>

Re: Problems with flattening

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
> Am 03.07.2017 um 18:31 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 03.07.2017 um 10:11 schrieb Fabio Salvi:
>> Hi Tilman,
>> 
>> Thank you for your antwort!  Yes, I'm using the version 2.0.6. The link is
>> https://drive.google.com/drive/folders/0BzbTsB09y4XwM1YzVWJzSzl2NXc
>> 
>> The Test tries to set all the fields texts to 'test' in the static pdf form
>> Test.pdf. The result is pippo.pdf. The texts were set but there's a shift
>> of the string to right of a char (see Capture.PNG)...I suppose that is
>> caused by the flattening..
>> 
>> I wonder whether that has to do  with my Form...but as I try to set the
>> values by hand, the texts aren't shifted...
> 
> I wasn't able to edit the form without enabling javascript (which I didn't) and I noticed it's also an XFA form. So I removed the XFA part
> 
> pDAcroForm.setXFA(null);
> 
> and then I edited and noticed the texts are also slightly shifted in Adobe Reader - please try this yourself.
> 
> Maybe the XFA has priority and it has different coordinates than AcroForm.

if there is a XFA content that is what's used by Adobe Reader/Acrobat to handle the form. 

BR
Maruan

> 
> Tilman
> 
> 
>> 
>> Thank you very much!
>> Regards Fabio
>> 
>> 
>> 
>> 
>> 
>> 2017-06-30 20:03 GMT+02:00 Tilman Hausherr <TH...@t-online.de>:
>> 
>>> Hi,
>>> 
>>> Make sure you're using the latest version, 2.0.6. Please upload your files
>>> (including your PDF file) to a sharehoster.
>>> 
>>> Tilman
>>> 
>>> Am 30.06.2017 um 18:42 schrieb Fabio Salvi:
>>> 
>>>>     Hi all,
>>>> 
>>>>     I'm using PDFBox to full a PDFForm and it works very well. I have
>>>>     a Problem as I try to flatten the Document. The field texts are
>>>>     moved to the right by a char and not aligned with the label.
>>>> 
>>>>     Have you an idea what can cause such a problem?
>>>> 
>>>>     Inline-Bild 1
>>>> 
>>>>     Hier my code:
>>>>     Inline-Bild 2
>>>> 
>>>>     Thank you very much in advance!
>>>>     Regards
>>>>     Fabio
>>>> 
>>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 


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


Re: Fwd: Problems with flattening

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.07.2017 um 10:11 schrieb Fabio Salvi:
> Hi Tilman,
>
> Thank you for your antwort!  Yes, I'm using the version 2.0.6. The link is
> https://drive.google.com/drive/folders/0BzbTsB09y4XwM1YzVWJzSzl2NXc
>
> The Test tries to set all the fields texts to 'test' in the static pdf form
> Test.pdf. The result is pippo.pdf. The texts were set but there's a shift
> of the string to right of a char (see Capture.PNG)...I suppose that is
> caused by the flattening..
>
> I wonder whether that has to do  with my Form...but as I try to set the
> values by hand, the texts aren't shifted...

I wasn't able to edit the form without enabling javascript (which I 
didn't) and I noticed it's also an XFA form. So I removed the XFA part

pDAcroForm.setXFA(null);

and then I edited and noticed the texts are also slightly shifted in 
Adobe Reader - please try this yourself.

Maybe the XFA has priority and it has different coordinates than AcroForm.

Tilman


>
> Thank you very much!
> Regards Fabio
>
>
>
>
>
> 2017-06-30 20:03 GMT+02:00 Tilman Hausherr <TH...@t-online.de>:
>
>> Hi,
>>
>> Make sure you're using the latest version, 2.0.6. Please upload your files
>> (including your PDF file) to a sharehoster.
>>
>> Tilman
>>
>> Am 30.06.2017 um 18:42 schrieb Fabio Salvi:
>>
>>>      Hi all,
>>>
>>>      I'm using PDFBox to full a PDFForm and it works very well. I have
>>>      a Problem as I try to flatten the Document. The field texts are
>>>      moved to the right by a char and not aligned with the label.
>>>
>>>      Have you an idea what can cause such a problem?
>>>
>>>      Inline-Bild 1
>>>
>>>      Hier my code:
>>>      Inline-Bild 2
>>>
>>>      Thank you very much in advance!
>>>      Regards
>>>      Fabio
>>>
>>>


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