Skip to main content
Participant
November 28, 2022
Question

How to programmatically set the font size to "auto"?

  • November 28, 2022
  • 3 replies
  • 2613 views

Hello,

 

I'd like to implement a PDF form filler that supports text auto-sizing/shrinking. Is there a syntax for natively setting the font size to auto? I've tried:  '/Helv 0 Tf'' but get quirky behaviors - the inputted text is there but it doesn't show up in screen. I'm only able to see the text after clicking into the text box in my PDF viewer.

 

Any advice? Attached is an animated GIF of the behaviors.


Thank you.

This topic has been closed for replies.

3 replies

Legend
November 29, 2022

What is "raw ISO language"? Do you mean you are hand coding the PDF?

If so, just use Acrobat to make an Auto field and see what it does.

Participant
November 29, 2022

Yes hand-coded. The field is set to auto. What should the DA be set to so it honors the auto-sizing? I've tried font size 0 - the text is there but it does not display on screen.

Legend
November 30, 2022

As I suggested, just use Acrobat to make a form with auto sizing, then investigate what it put in the file.

Bernd Alheit
Community Expert
Community Expert
November 29, 2022

What API does you use?

Participant
November 29, 2022

I don't have API, i'm encoding in raw ISO language. Do you have any suggestions for API?

Participant
November 28, 2022

Oh, and here is the PDF.