pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luis Herrero <ruisunos...@gmail.com>
Subject Re: Comb textbox not formatted correctly
Date Tue, 09 Sep 2014 10:31:14 GMT
Hello.

Thanks for your reply.

I've also found this related thread about the issue:
http://www.coderanch.com/t/637067/open-source/PDFBox-save

Do you know where I can find any example about the stream appearance
modification?

For my project, I have to use released software.
It's not extremely urgent because those comb fields are only a small part
of the application, but it would be nice to have at least a provisional
solution in a short term.


Regards,


2014-09-09 11:42 GMT+02:00 Maruan Sahyoun <sahyoun@fileaffairs.de>:

> Hi,
>
> for a form field there are two representations, the value and how the
> field appears on screen/printed (the appearance). At that point in time
> PDFBox doesn’t use the setting when it’s calculating the appearance. As a
> workaround you could change the appearance stream after the value has been
> set.
>
> There is already an issue for that
> https://issues.apache.org/jira/browse/PDFBOX-91.
>
> For your project do you have to use released software or could you use a
> trunk version of PDFBox? How urgent would a fix be to you?
>
> BR
> Maruan
>
> Am 09.09.2014 um 11:30 schrieb Luis Herrero <ruisunosuke@gmail.com>:
>
> > Hello,
> >
> >
> >
> > There’s a similar question on the thread “field comb” on 28 may 2014 with
> > no answer.
> >
> >
> >
> > I have a pdf generated with LibreOffice to be prefilled by an
> application.
> >
> >
> >
> > There are several comb text boxes (for example to insert a telephone
> number
> > or a postal code)
> >
> >
> >
> > I set the value of the AcroForm field -> setValue(‘’12345’’)
> >
> > The function shouldComb() returns true.
> >
> > MaxLengh returns 5.
> >
> > I need to set the property doNotScroll to false in order to the text to
> be
> > displayed, if not the text is not printed in the resulting pdf ->
> > setDoNotScroll(false)
> >
> > With this property set, the string is printed in the text box, but the
> > numbers are not placed in their respective boxes, as you can see here :
> >
> >
> >
> > pdfbox output: http://i.imgur.com/yjjhE51.png
> >
> > desired output: http://i.imgur.com/s5BnXK6.png
> >
> >
> >
> >
> >
> > I haven’t found much information about the behaviour of comb fields in
> > pdfbox.
> >
> > Is this behaviour of automatically placing numbers in their boxes
> available
> > in pdfbox ?
> >
> > Is it necessary any additional implementation ?
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message