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

How to auto expand text fields/text box in pdf form with using java-script

New Here ,
Apr 20, 2019 Apr 20, 2019

How to auto expand text fields/text box in pdf form with using java-script

TOPICS
PDF forms
7.9K
Translate
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
Community Expert ,
Apr 21, 2019 Apr 21, 2019

You can change the size of fields using a script, but not based on the amount of text they contain, if that's what you mean.

Translate
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
Community Expert ,
Apr 21, 2019 Apr 21, 2019
LATEST

Here's an article that explains PDF page coordinates and how to apply them to annotations and form fields

PDF Page Coordinates (page size, field placement, etc.)

Auto-sizing is a much more complicated topic and fraught with issues, such as how does the expanding/contracting field interact with everything else on the page? Do you just have a big blank area that represents the maximum expansion? Not to mention the issue raised by Try67, which is about know how exactly how big the field needs to be to fit the text. You can in fact measure text, but this is an advanced topic.

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

Translate
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