pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akshay Rawat <proje...@akshay.cc>
Subject Re: PDFBox: How to detect the max length of a PDTextBox
Date Tue, 19 Nov 2013 13:03:18 GMT
Thank you. Now I know how this works.


Akshay Rawat  |  Mobile/Whatsapp: +91 9538780000  |  Skype: akshayrawat

On 19 November 2013 at 4:39:53 PM, Gilad Denneboom (gilad.denneboom@gmail.com) wrote:

When a property is not directly accessible through the object's getters, it  
can usually still be found by going to the "guts" of the object and  
checking the COS Dictionary associated with it. A quick research revealed  
that this property is found by accessing the "MaxLen" property (which maybe  
should be added as one of the constants of the COSName object).  
So you can use it like so (field1 is a PDTextbox object):  

field1.getDictionary().getInt("MaxLen");  

This will return -1 if the Maximum Length property is not set.  


On Tue, Nov 19, 2013 at 9:56 AM, Akshay Rawat <projects@akshay.cc> wrote:  

> I'm working with an AcroForm which has a text field (PDTextBox) with a max  
> length. How do I use PDFBox to detect the max length of this field.  
>  
> Thanks for any help.  

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