Menu

#161 Text moves when using SetField and then selecting field

closed-out-of-date
PDModel (75)
9
2014-08-25
2005-02-07
No

Look at pdf_with_lots_of_fields.pdf

Ran

java org.pdfbox.examples.fdf.SetField
tmp\pdf_with_lots_of_fields.pdf "Feld.2" "Test"

When you select the field with the "Test" text in it, the
text shifts slightly to the left. It should not do that.

While looking at this PDF, there are a lot of fields on it,
should test setting each field to test all the various field
types. Then add it as a junit test.

Ben

Discussion

  • Ben Litchfield

    Ben Litchfield - 2005-02-07
    • priority: 5 --> 9
     
  • Ben Litchfield

    Ben Litchfield - 2005-02-07

    Logged In: YES
    user_id=601708

    Also verify pdf_with_fields2.pdf!

    Ben

     
  • bastian kaempfe

    bastian kaempfe - 2005-06-06

    Logged In: YES
    user_id=305823

    I have the same problem when using PDField.setComb(true) -
    currently posted to the help-forum, added two links to the
    example-files. forum thread is ->
    http://sourceforge.net/forum/forum.php?thread_id=1294072&forum_id=267205

    cya.
    bastian kaempfe

     
  • bastian kaempfe

    bastian kaempfe - 2005-06-24

    Logged In: YES
    user_id=305823

    I think that my problem posted 3 weeks ago is the same as
    this bug.

    when selecting the field the style changes to "as it should
    be", when leaving the style changes back to "how it not
    should be". I added two example-pdf files. the first one is
    the original (template-pdf) with some fields having the
    "comb of x characters" option enabled (did it with adobe,
    not with pdfbox). the second file is the filled pdf, read it
    with pdfbox, filled some fields with "setText()" and then
    saved it back to disk.

    I didn't add the two files to the bug, because they are
    quite big (420k each).

    original text form my forum post:

    One defines, how many letters should be placed inside the
    text field and the letters will all have the same distance
    between each other. I need this option because i have
    several fixed-length input fields and need to place the
    letters on the correct positions.
    an examlpe of the template-pdf placed at
    http://kaempfe.net/pdf/pdfboxexample_before.pdf
    when filling the form fields with pdfbox everyting works
    fine, but the comb-option gets almost lost. the output pdf
    does not display the form fields correctly, the comb-option
    seems to be activated when focussing one form field and
    deactivated on leaving that field. the fields are not
    read-only, so one can edit them in the output-pdf also. when
    doing that, the comp-options comes back and the letters stay
    in place when leaving the form field.
    an example of the output-pdf is placed at
    http://kaempfe.net/pdf/pdfboxexample_after.pdf

     
  • Ben Litchfield

    Ben Litchfield - 2005-06-24

    Logged In: YES
    user_id=601708

    The problem is that PDFBox is not correctly generating the
    appearance stream for the field. When you click in the field
    Acrobat will regenerate it, which is why it switches back and
    forth between correct and incorrect.

    Thanks for the example docs, I will let you know when I get a
    chance to look at it.

    Ben

     
  • daniel_

    daniel_ - 2005-08-04

    Logged In: YES
    user_id=1323827

    I have the same problem with my PDFs. The PDF contains a
    text field that is supposed to display a bar code roated by 90
    degrees. The bar code will be displayed by using a special
    font (i.e. Code-39-30). After creating the PDF with PDFBox,
    the bar code is displayed, however not rotated. Only after
    clicking into the text field, the bar code is rotated. Similar
    behaviour as descibed below.
    As we plan to use this in a customer portal and the printed
    documents have to be scanned automatically with the rotated
    bar code, you can imagine that a bugfix for this problem is
    very important and urgent for us.

    Thanks in advance for your help
    Daniel

     
  • Ben Litchfield

    Ben Litchfield - 2005-08-04

    Logged In: YES
    user_id=601708

    Daniel,

    Can you upload a sample PDF. The PDFBox FTP site
    ftp.pdfbox.org is write only, so you can upload a sample and
    only I will be able to access it.

    Ben Litchfield

     
  • daniel_

    daniel_ - 2005-08-04

    Logged In: YES
    user_id=1323827

    I put a sample on the ftp site. The filename is: pdfbox-Bugs-
    1118054_Daniel_testoutput.pdf.

    Daniel

     
  • Piotr Puchalski

    Piotr Puchalski - 2006-04-11

    Logged In: YES
    user_id=1463773

    I have similar problem, usually my text is bigger then
    field's "bounding box" so I can see only the lower part of
    chars. As I have researched the sources, I think the problem
    is with org.pdfbox.pdmodel.interactive.form.PDAppearance.
    calculateFontSize(...) method. If it will be implemented
    correct for Type0Fonts(and probably others) text won't
    "move" and (in my case) I will see the whole chars(font size
    will be set properly).

     
  • Ben Litchfield

    Ben Litchfield - 2010-04-07

    PDFBox has moved to Apache. Bugs have been moved over to the Apache bug tracking system. If you don't see the bug and it's still not fixed in the current release then please create a new bug on the Apache site.

    http://pdfbox.apache.org

     
  • Ben Litchfield

    Ben Litchfield - 2010-04-07
    • status: open --> closed-out-of-date
     

Log in to post a comment.