Skip to main content
Inspiring
Mar 30, 2021 9:55 PM UTC
Question

Is it possible to change the width of the alert box display on the JavaScript side?

Is it possible to change the width of the alert box display on the JavaScript side?

 

app.alert ("(1) aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ n (2) bbbbbbbbbbbbbbbbbbbb \ n (3) cccccccccccccccccccccc", 3);

 

For example, if I write as above, the sentence (1) will be displayed in two lines.

 

This is difficult to read and looks ugly, so I want to display it in one line.

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

Bernd Alheit
Community Expert
Community Expert
Mar 31, 2021 7:04 AM UTC

May be possible when you replace the app.alert by a dialog.

Translate
Inspiring
Mar 31, 2021 2:37 PM UTC

Thank you. I haven't tried the dialog box yet, so I'll look it up.

Translate
Thom Parker
Community Expert
Community Expert
Mar 31, 2021 4:33 PM UTC

Look up the "app.execDialog" function in the Acrobat JavaScript Reference.

Here's some info on Custom Dialogs, and a link to an online tool for designing Custom Dialogs:

https://www.pdfscripting.com/public/Alerts-Popups-and-Other-UI.cfm#JSCustomDlg

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
Community Expert
Mar 30, 2021 10:00 PM UTC

NO, Acrobat does whatever it want with the text you give it.

 

Translate
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
Mar 31, 2021 2:35 PM UTC

Thank you. I understood.

Translate