Form field text shifting after setField?

View: New views
10 Messages — Rating Filter:   Alert me  

Form field text shifting after setField?

by Chris Miller-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone, thanks in advance for your support. I'm experiencing some problems filling form fields on the fly. I have seen a number of other posts regarding this issue to no avail, however, I'm confident it can be resolved. The problem involves the movement or shifting of form field text following the usage of the setField or setFields methods of the class AcroFields. The problem is especially apparent with multi-line text boxes and with text boxes that utilize the "resize text to fit box" feature.

I allow users to fill out a PDF form, submit it back to the server, and then I use the form values they submitted to fill and flatten the same form on my server. However, when I (or the user) opens up the resulting PDF document the text within the form fields has moved drastically, which is not good given the "print ready" file we are trying to output. I have used both the HTML PDF submit and the FDF submit methods of submitting the PDF form, but experienced the same problem, I thought that the form field attributes (e.g. padding) weren't being passed or something so I was surprised that the FDF submit method did not work. Either way, the problem can be very clearly seen by accessing the URL below, you'll have to upload one image to see the first preview, then you can submit the form to the server, add the product to your shopping cart, and then press "view artwork" to see the flattened artwork where the multiline text boxes are clearly messed up (text is shifted up and to the left).

http://www.adsoftdirect.com/index.cfm?page=previewPdf&productid=128&templateid=3&storefrontid=6

The current code that makes this possible is way simple, which is why I think the problem may be with iText, excuse that it's done in cold fusion script, but you get the idea...
fdf = createObject("java", "com.lowagie.text.pdf.FdfReader").init(FDFByteArrayData);
form1 = stamp.getAcroFields();
form1.setFields(fdf);

Also, I've seen it noted before that this problems is related to the different versions of acrobat/reader, however this problem is occurring across the board with all versions of acrobat and reader and a closer inspection of the generated PDF shows that the text has in fact moved before being flattened or it is not being inputted into the field properly in the first place.

I know that it is possible to capture the form field coordinates and use columnText to "recreate" the text on the PDF, but this is hardly a long-term solution and would not take advantage of the "scale font size to fit" functionality which has numerous implications in terms of generating print ready documents. So if we could find a way to make this work, even gulp, if it involves modifying the underlying iText library, then I would be very gracious...I've been developing our technology for over two years and iText has been great, this is the last hurdle I've got to overcome so any help would be much appreciated. Thanks!



-------------------------------------------------------------
Chris Miller - President/CEO
AdSoft Direct, Inc.
1-888-3-ADSOFT (1-888-323-7638)
Office:       925-251-0566
Cell:          510-504-5006
E-mail:      cMiller@...
Web:        http://www.adsoftdirect.com 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Parent Message unknown RE: Form field text shifting after setField?

by Paulo Soares :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The form field text layout is not even the same across Acrobat versions.

> -----Original Message-----
> From: itext-questions-admin@...
> [mailto:itext-questions-admin@...] On
> Behalf Of Chris Miller
> Sent: Wednesday, August 31, 2005 10:50 AM
> To: itext-questions@...
> Subject: [iText-questions] Form field text shifting after setField?
>
> Hi everyone, thanks in advance for your support. I'm
> experiencing some problems filling form fields on the fly. I
> have seen a number of other posts regarding this issue to no
> avail, however, I'm confident it can be resolved. The problem
> involves the movement or shifting of form field text
> following the usage of the setField or setFields methods of
> the class AcroFields. The problem is especially apparent with
> multi-line text boxes and with text boxes that utilize the
> "resize text to fit box" feature.
>
> I allow users to fill out a PDF form, submit it back to the
> server, and then I use the form values they submitted to fill
> and flatten the same form on my server. However, when I (or
> the user) opens up the resulting PDF document the text within
> the form fields has moved drastically, which is not good
> given the "print ready" file we are trying to output. I have
> used both the HTML PDF submit and the FDF submit methods of
> submitting the PDF form, but experienced the same problem, I
> thought that the form field attributes (e.g. padding) weren't
> being passed or something so I was surprised that the FDF
> submit method did not work. Either way, the problem can be
> very clearly seen by accessing the URL below, you'll have to
> upload one image to see the first preview, then you can
> submit the form to the server, add the product to your
> shopping cart, and then press "view artwork" to see the
> flattened artwork where the multiline text boxes are clearly
> messed up (text is shifted up and to the left).
>
> http://www.adsoftdirect.com/index.cfm?page=previewPdf&producti
> d=128&templateid=3&storefrontid=6
>
> The current code that makes this possible is way simple,
> which is why I think the problem may be with iText, excuse
> that it's done in cold fusion script, but you get the idea...
> fdf = createObject("java",
> "com.lowagie.text.pdf.FdfReader").init(FDFByteArrayData);
> form1 = stamp.getAcroFields();
> form1.setFields(fdf);
>
> Also, I've seen it noted before that this problems is related
> to the different versions of acrobat/reader, however this
> problem is occurring across the board with all versions of
> acrobat and reader and a closer inspection of the generated
> PDF shows that the text has in fact moved before being
> flattened or it is not being inputted into the field properly
> in the first place.
>
> I know that it is possible to capture the form field
> coordinates and use columnText to "recreate" the text on the
> PDF, but this is hardly a long-term solution and would not
> take advantage of the "scale font size to fit" functionality
> which has numerous implications in terms of generating print
> ready documents. So if we could find a way to make this work,
> even gulp, if it involves modifying the underlying iText
> library, then I would be very gracious...I've been developing
> our technology for over two years and iText has been great,
> this is the last hurdle I've got to overcome so any help
> would be much appreciated. Thanks!
>
>
>
> -------------------------------------------------------------
> Chris Miller - President/CEO
> AdSoft Direct, Inc.
> 1-888-3-ADSOFT (1-888-323-7638)
> Office:       925-251-0566
> Cell:          510-504-5006
> E-mail:      cMiller@...
> Web:        http://www.adsoftdirect.com 
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development
> Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams *
> Testing & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> iText-questions mailing list
> iText-questions@...
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

RE: Form field text shifting after setField?

by Chris Miller-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Regardless, there is definitely something not right about the way the text is dropped into the field and the problem we are seeing is occurring across versions, did you test the demo? I just need a solution asap so that I can start taking orders :) Please take a second look for me and/or suggest a viable alternative. Thanks Paulo.

At 06:15 AM 8/31/2005, you wrote:

>The form field text layout is not even the same across Acrobat versions.
>
>> -----Original Message-----
>> From: itext-questions-admin@...
>> [mailto:itext-questions-admin@...] On
>> Behalf Of Chris Miller
>> Sent: Wednesday, August 31, 2005 10:50 AM
>> To: itext-questions@...
>> Subject: [iText-questions] Form field text shifting after setField?
>>
>> Hi everyone, thanks in advance for your support. I'm
>> experiencing some problems filling form fields on the fly. I
>> have seen a number of other posts regarding this issue to no
>> avail, however, I'm confident it can be resolved. The problem
>> involves the movement or shifting of form field text
>> following the usage of the setField or setFields methods of
>> the class AcroFields. The problem is especially apparent with
>> multi-line text boxes and with text boxes that utilize the
>> "resize text to fit box" feature.
>>
>> I allow users to fill out a PDF form, submit it back to the
>> server, and then I use the form values they submitted to fill
>> and flatten the same form on my server. However, when I (or
>> the user) opens up the resulting PDF document the text within
>> the form fields has moved drastically, which is not good
>> given the "print ready" file we are trying to output. I have
>> used both the HTML PDF submit and the FDF submit methods of
>> submitting the PDF form, but experienced the same problem, I
>> thought that the form field attributes (e.g. padding) weren't
>> being passed or something so I was surprised that the FDF
>> submit method did not work. Either way, the problem can be
>> very clearly seen by accessing the URL below, you'll have to
>> upload one image to see the first preview, then you can
>> submit the form to the server, add the product to your
>> shopping cart, and then press "view artwork" to see the
>> flattened artwork where the multiline text boxes are clearly
>> messed up (text is shifted up and to the left).
>>
>> http://www.adsoftdirect.com/index.cfm?page=previewPdf&producti
>> d=128&templateid=3&storefrontid=6
>>
>> The current code that makes this possible is way simple,
>> which is why I think the problem may be with iText, excuse
>> that it's done in cold fusion script, but you get the idea...
>> fdf = createObject("java",
>> "com.lowagie.text.pdf.FdfReader").init(FDFByteArrayData);
>> form1 = stamp.getAcroFields();
>> form1.setFields(fdf);
>>
>> Also, I've seen it noted before that this problems is related
>> to the different versions of acrobat/reader, however this
>> problem is occurring across the board with all versions of
>> acrobat and reader and a closer inspection of the generated
>> PDF shows that the text has in fact moved before being
>> flattened or it is not being inputted into the field properly
>> in the first place.
>>
>> I know that it is possible to capture the form field
>> coordinates and use columnText to "recreate" the text on the
>> PDF, but this is hardly a long-term solution and would not
>> take advantage of the "scale font size to fit" functionality
>> which has numerous implications in terms of generating print
>> ready documents. So if we could find a way to make this work,
>> even gulp, if it involves modifying the underlying iText
>> library, then I would be very gracious...I've been developing
>> our technology for over two years and iText has been great,
>> this is the last hurdle I've got to overcome so any help
>> would be much appreciated. Thanks!
>>
>>
>>
>> -------------------------------------------------------------
>> Chris Miller - President/CEO
>> AdSoft Direct, Inc.
>> 1-888-3-ADSOFT (1-888-323-7638)
>> Office:       925-251-0566
>> Cell:          510-504-5006
>> E-mail:      cMiller@...
>> Web:        http://www.adsoftdirect.com 
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is Sponsored by the Better Software Conference & EXPO
>> September 19-22, 2005 * San Francisco, CA * Development
>> Lifecycle Practices
>> Agile & Plan-Driven Development * Managing Projects & Teams *
>> Testing & QA
>> Security * Process Improvement & Measurement *
>> http://www.sqe.com/bsce5sf
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@...
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Form field text shifting after setField?

by Paulo Soares :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Text layout in form fields is not documented. iText tries to approximate
Acrobat 5 layout but it's not exact and if you go to newer Acrobat versions
it's even worse. You can change or duplicate TextField to suit your needs
or, better yet, as you are flattening just get the coordinates of the field
and write the text directly on it.

----- Original Message -----
From: "Chris Miller" <cMiller@...>
To: <itext-questions@...>
Sent: Wednesday, August 31, 2005 7:26 PM
Subject: RE: [iText-questions] Form field text shifting after setField?


> Regardless, there is definitely something not right about the way the text
is dropped into the field and the problem we are seeing is occurring across
versions, did you test the demo? I just need a solution asap so that I can
start taking orders :) Please take a second look for me and/or suggest a
viable alternative. Thanks Paulo.

>
> At 06:15 AM 8/31/2005, you wrote:
>
> >The form field text layout is not even the same across Acrobat versions.
> >
> >> -----Original Message-----
> >> From: itext-questions-admin@...
> >> [mailto:itext-questions-admin@...] On
> >> Behalf Of Chris Miller
> >> Sent: Wednesday, August 31, 2005 10:50 AM
> >> To: itext-questions@...
> >> Subject: [iText-questions] Form field text shifting after setField?
> >>
> >> Hi everyone, thanks in advance for your support. I'm
> >> experiencing some problems filling form fields on the fly. I
> >> have seen a number of other posts regarding this issue to no
> >> avail, however, I'm confident it can be resolved. The problem
> >> involves the movement or shifting of form field text
> >> following the usage of the setField or setFields methods of
> >> the class AcroFields. The problem is especially apparent with
> >> multi-line text boxes and with text boxes that utilize the
> >> "resize text to fit box" feature.
> >>
> >> I allow users to fill out a PDF form, submit it back to the
> >> server, and then I use the form values they submitted to fill
> >> and flatten the same form on my server. However, when I (or
> >> the user) opens up the resulting PDF document the text within
> >> the form fields has moved drastically, which is not good
> >> given the "print ready" file we are trying to output. I have
> >> used both the HTML PDF submit and the FDF submit methods of
> >> submitting the PDF form, but experienced the same problem, I
> >> thought that the form field attributes (e.g. padding) weren't
> >> being passed or something so I was surprised that the FDF
> >> submit method did not work. Either way, the problem can be
> >> very clearly seen by accessing the URL below, you'll have to
> >> upload one image to see the first preview, then you can
> >> submit the form to the server, add the product to your
> >> shopping cart, and then press "view artwork" to see the
> >> flattened artwork where the multiline text boxes are clearly
> >> messed up (text is shifted up and to the left).
> >>
> >> http://www.adsoftdirect.com/index.cfm?page=previewPdf&producti
> >> d=128&templateid=3&storefrontid=6
> >>
> >> The current code that makes this possible is way simple,
> >> which is why I think the problem may be with iText, excuse
> >> that it's done in cold fusion script, but you get the idea...
> >> fdf = createObject("java",
> >> "com.lowagie.text.pdf.FdfReader").init(FDFByteArrayData);
> >> form1 = stamp.getAcroFields();
> >> form1.setFields(fdf);
> >>
> >> Also, I've seen it noted before that this problems is related
> >> to the different versions of acrobat/reader, however this
> >> problem is occurring across the board with all versions of
> >> acrobat and reader and a closer inspection of the generated
> >> PDF shows that the text has in fact moved before being
> >> flattened or it is not being inputted into the field properly
> >> in the first place.
> >>
> >> I know that it is possible to capture the form field
> >> coordinates and use columnText to "recreate" the text on the
> >> PDF, but this is hardly a long-term solution and would not
> >> take advantage of the "scale font size to fit" functionality
> >> which has numerous implications in terms of generating print
> >> ready documents. So if we could find a way to make this work,
> >> even gulp, if it involves modifying the underlying iText
> >> library, then I would be very gracious...I've been developing
> >> our technology for over two years and iText has been great,
> >> this is the last hurdle I've got to overcome so any help
> >> would be much appreciated. Thanks!
> >>
> >>
> >>
> >> -------------------------------------------------------------
> >> Chris Miller - President/CEO
> >> AdSoft Direct, Inc.
> >> 1-888-3-ADSOFT (1-888-323-7638)
> >> Office:       925-251-0566
> >> Cell:          510-504-5006
> >> E-mail:      cMiller@...
> >> Web:        http://www.adsoftdirect.com
> >>
> >>
> >>
> >> -------------------------------------------------------
> >> SF.Net email is Sponsored by the Better Software Conference & EXPO
> >> September 19-22, 2005 * San Francisco, CA * Development
> >> Lifecycle Practices
> >> Agile & Plan-Driven Development * Managing Projects & Teams *
> >> Testing & QA
> >> Security * Process Improvement & Measurement *
> >> http://www.sqe.com/bsce5sf
> >> _______________________________________________
> >> iText-questions mailing list
> >> iText-questions@...
> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
> >>
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> iText-questions mailing list
> iText-questions@...
> https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Form field text shifting after setField?

by Chris Miller-24 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay, I spent half the day trying to figure out how to capture the existing text field appearance attributes and then copy them back to the text field when I insert the text, but I've had no luck. An example would be great. I've been trying to use GetAppearance method, but am having problems invoking it and I don't know anything about these pdfdictionaries, or if this is even the way I should be trying to accomplish my goal? Can appearances have something to do with the weird shifting that is taking place? Alternatively, I tried but failed to find an example of using the form field coordinates and columntext to create a flattened field. I searched the mailinglist and checked the docume ntation and tried using the API too, but couldn't quite get it working. Lastly, if I used the TextField approach to build the appearance, I would still need to capture the appearance values from the original form because I can't hardcode all of my form fields properties. Examples would be most helpful, thank you!

At 03:17 PM 8/31/2005, you wrote:

>Text layout in form fields is not documented. iText tries to approximate
>Acrobat 5 layout but it's not exact and if you go to newer Acrobat versions
>it's even worse. You can change or duplicate TextField to suit your needs
>or, better yet, as you are flattening just get the coordinates of the field
>and write the text directly on it.
>
>----- Original Message -----
>From: "Chris Miller" <cMiller@...>
>To: <itext-questions@...>
>Sent: Wednesday, August 31, 2005 7:26 PM
>Subject: RE: [iText-questions] Form field text shifting after setField?
>
>
>> Regardless, there is definitely something not right about the way the text
>is dropped into the field and the problem we are seeing is occurring across
>versions, did you test the demo? I just need a solution asap so that I can
>start taking orders :) Please take a second look for me and/or suggest a
>viable alternative. Thanks Paulo.
>>
>> At 06:15 AM 8/31/2005, you wrote:
>>
>> >The form field text layout is not even the same across Acrobat versions.
>> >
>> >> -----Original Message-----
>> >> From: itext-questions-admin@...
>> >> [mailto:itext-questions-admin@...] On
>> >> Behalf Of Chris Miller
>> >> Sent: Wednesday, August 31, 2005 10:50 AM
>> >> To: itext-questions@...
>> >> Subject: [iText-questions] Form field text shifting after setField?
>> >>
>> >> Hi everyone, thanks in advance for your support. I'm
>> >> experiencing some problems filling form fields on the fly. I
>> >> have seen a number of other posts regarding this issue to no
>> >> avail, however, I'm confident it can be resolved. The problem
>> >> involves the movement or shifting of form field text
>> >> following the usage of the setField or setFields methods of
>> >> the class AcroFields. The problem is especially apparent with
>> >> multi-line text boxes and with text boxes that utilize the
>> >> "resize text to fit box" feature.
>> >>
>> >> I allow users to fill out a PDF form, submit it back to the
>> >> server, and then I use the form values they submitted to fill
>> >> and flatten the same form on my server. However, when I (or
>> >> the user) opens up the resulting PDF document the text within
>> >> the form fields has moved drastically, which is not good
>> >> given the "print ready" file we are trying to output. I have
>> >> used both the HTML PDF submit and the FDF submit methods of
>> >> submitting the PDF form, but experienced the same problem, I
>> >> thought that the form field attributes (e.g. padding) weren't
>> >> being passed or something so I was surprised that the FDF
>> >> submit method did not work. Either way, the problem can be
>> >> very clearly seen by accessing the URL below, you'll have to
>> >> upload one image to see the first preview, then you can
>> >> submit the form to the server, add the product to your
>> >> shopping cart, and then press "view artwork" to see the
>> >> flattened artwork where the multiline text boxes are clearly
>> >> messed up (text is shifted up and to the left).
>> >>
>> >> http://www.adsoftdirect.com/index.cfm?page=previewPdf&producti
>> >> d=128&templateid=3&storefrontid=6
>> >>
>> >> The current code that makes this possible is way simple,
>> >> which is why I think the problem may be with iText, excuse
>> >> that it's done in cold fusion script, but you get the idea...
>> >> fdf = createObject("java",
>> >> "com.lowagie.text.pdf.FdfReader").init(FDFByteArrayData);
>> >> form1 = stamp.getAcroFields();
>> >> form1.setFields(fdf);
>> >>
>> >> Also, I've seen it noted before that this problems is related
>> >> to the different versions of acrobat/reader, however this
>> >> problem is occurring across the board with all versions of
>> >> acrobat and reader and a closer inspection of the generated
>> >> PDF shows that the text has in fact moved before being
>> >> flattened or it is not being inputted into the field properly
>> >> in the first place.
>> >>
>> >> I know that it is possible to capture the form field
>> >> coordinates and use columnText to "recreate" the text on the
>> >> PDF, but this is hardly a long-term solution and would not
>> >> take advantage of the "scale font size to fit" functionality
>> >> which has numerous implications in terms of generating print
>> >> ready documents. So if we could find a way to make this work,
>> >> even gulp, if it involves modifying the underlying iText
>> >> library, then I would be very gracious...I've been developing
>> >> our technology for over two years and iText has been great,
>> >> this is the last hurdle I've got to overcome so any help
>> >> would be much appreciated. Thanks!
>> >>
>> >>
>> >>
>> >> -------------------------------------------------------------
>> >> Chris Miller - President/CEO
>> >> AdSoft Direct, Inc.
>> >> 1-888-3-ADSOFT (1-888-323-7638)
>> >> Office:       925-251-0566
>> >> Cell:          510-504-5006
>> >> E-mail:      cMiller@...
>> >> Web:        http://www.adsoftdirect.com
>> >>
>> >>
>> >>
>> >> -------------------------------------------------------
>> >> SF.Net email is Sponsored by the Better Software Conference & EXPO
>> >> September 19-22, 2005 * San Francisco, CA * Development
>> >> Lifecycle Practices
>> >> Agile & Plan-Driven Development * Managing Projects & Teams *
>> >> Testing & QA
>> >> Security * Process Improvement & Measurement *
>> >> http://www.sqe.com/bsce5sf
>> >> _______________________________________________
>> >> iText-questions mailing list
>> >> iText-questions@...
>> >> https://lists.sourceforge.net/lists/listinfo/itext-questions
>> >>
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is Sponsored by the Better Software Conference & EXPO
>> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
>Practices
>> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
>> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@...
>> https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Form field text shifting after setField?

by kylealger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chris,

I am having the same issue as you describe. I've trying to figure out what exactly the underlying issue is and have had no luck. I am using the setFields method, the same as you, and see that the text does seem to shift up or down with no consistency that I can see for direction.  Have you been able to figure a way around this?

Thanks,

Kyle

Re: Form field text shifting after setField?

by Bruno Lowagie (iText) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

kylealger wrote:

>Chris,
>
>I am having the same issue as you describe. I've trying to figure out what
>exactly the underlying issue is and have had no luck. I am using the
>setFields method, the same as you, and see that the text does seem to shift
>up or down with no consistency that I can see for direction.  Have you been
>able to figure a way around this?
>  
>
iText generates a default appearance for a textfield.
When you edit the text field, Adobe Reader creates an appearance.
The main problem is that Adobe Reader wasn't very consistent in
the way such an appearance is visualized: it differs from version to
version.
iText can't predict what version of Adobe Reader the end-user will be using,
so the default appearance offered by iText is an 'educated guess'.
For some versions of Adobe Reader ther will be little or no difference;
for others you will experience that 'shifting behavior'.
br,
Bruno


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Form field text shifting after setField?

by Paulo Soares :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


----- Original Message -----
From: "Bruno Lowagie" <bruno@...>
To: "kylealger" <kyle.alger@...>
Cc: <itext-questions@...>
Sent: Sunday, February 12, 2006 7:28 AM
Subject: Re: [iText-questions] Form field text shifting after setField?


> kylealger wrote:
>
>>Chris,
>>
>>I am having the same issue as you describe. I've trying to figure out what
>>exactly the underlying issue is and have had no luck. I am using the
>>setFields method, the same as you, and see that the text does seem to
>>shift
>>up or down with no consistency that I can see for direction.  Have you
>>been
>>able to figure a way around this?
>>
> iText generates a default appearance for a textfield.
> When you edit the text field, Adobe Reader creates an appearance.
> The main problem is that Adobe Reader wasn't very consistent in
> the way such an appearance is visualized: it differs from version to
> version.
> iText can't predict what version of Adobe Reader the end-user will be
> using,
> so the default appearance offered by iText is an 'educated guess'.
> For some versions of Adobe Reader ther will be little or no difference;
> for others you will experience that 'shifting behavior'.

And that's why there's AcroFields.setExtraMargin().

Paulo



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@...
https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Form field text shifting after setField?

by kylealger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Bruno. It's good just to know what is causing the issue so I can do my best to resolve it.

Re: Form field text shifting after setField?

by kylealger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will try that out Paulo. It is definitely better to try this out than re-tagging ~3000 acrobat forms.