How do I limit how many big a number can be entered into a field?

9 views
Skip to first unread message

Ryan

unread,
Oct 4, 2017, 3:38:27 PM10/4/17
to PDFTron PDFNet SDK
Question:

I want to limit the number that can be entered to something like the following. "1234.56"

That is, 4 digits, plus two decimal places.

In Acrobat I set the "Format Category" to "Number", "Decimal Places" to "2", and "Separator Style" to "1,234.56".

But there is still no limit to number of characters.



Answer:

The PDF standard does not provide this fine grained of control, but it does provide close support.

First, you can use Field.SetMaxLen to limit the number of characters that can be entered. Though any character counts, so "-", "," and "." would also count.

This matches the "Character Limit" value in Acrobat.


Reply all
Reply to author
Forward
0 new messages