• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

JS - Detect filled or overflown textfield

New Here ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

I try to work with variable font size in multiline textfield. The auto font size property is insufficient because i want to specify a max and min font size (default seems to be 12 and 4 respectively).

Since there appears a marker and scrollbar once a textfield starts to overflow or input is disabled on non scrollable textfields, i had the idea to implement a custom javascript solution. However i was unable to find a property or event which conforms to this described beahviour in the javascript documentation.

Perhaps someone can point me in the right direction or otherwise can confirm that indeed there is no such feature.

Cheers.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

277

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 11, 2019 Apr 11, 2019

There are no min/max font size options, but there is a "fieldFull" property of the event object. Here's the reference entry:

Acrobat DC SDK Documentation

It's tricky to use. But a script can detect when a field overflows, modify the field parameters and try to re-detect if the field is still over. The key concept is that this is tricky stuff.

Votes

Translate

Translate
Community Expert ,
Apr 11, 2019 Apr 11, 2019

Copy link to clipboard

Copied

LATEST

There are no min/max font size options, but there is a "fieldFull" property of the event object. Here's the reference entry:

Acrobat DC SDK Documentation

It's tricky to use. But a script can detect when a field overflows, modify the field parameters and try to re-detect if the field is still over. The key concept is that this is tricky stuff.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines