Hi there,
I am still struggling with this.
Any pointers?
Thanks in advance.
--Vivek
On Friday 09 December 2011 02:30 AM, vivek wrote:
Hi Gilad,
Yes, I meant to say resizing the text inside a form text field only.
The problem is, I am not able to change font size inside a text field
for the
reason I described earlier.
I need to change font size programmatically.
I am trying to do it by:
COSDictionary dictionary = pdVariableText.getDictionary();
String desiderAppearance = "/" + abbrevFontName + " " +
desiredFontSize + " Tf 0 g";
dictionary.setString(COSName.getPDFName("DA"), desiderAppearance);
But while writing the text on PDF, it uses PDVariableText.da instead,
which is a
private field without any setter method.
Any workaround?
--
Thanks
Vivek Saini
Are you talking about text inside a form text field? If so, just set
the
font size to 0, which means it will automatically fit the size of
the box.
On Wed, Dec 7, 2011 at 8:06 PM, vivek<[email protected]> wrote:
Hi All,
I need to change the text font size dynamically inside a text field -
let's say if text doesn't fit into a text field, I want to reduce
the font
size until it gets fit into given text box.
I think I need to change appearance string of text field. But my
problem
is, da (default appearance) of PDVariableText is a private variable
without
any setter method. And I can't change str (which is actual appearance
string ) of COSString as well.
Can I achieve this without changing source code?
--
Thanks
Vivek Saini