Skip to main content
Inspiring
March 30, 2021
Question

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

  • March 30, 2021
  • 2 replies
  • 1370 views

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 has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
March 31, 2021

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

Inspiring
March 31, 2021

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

Thom Parker
Community Expert
Community Expert
March 31, 2021

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

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
Community Expert
March 30, 2021

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

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
March 31, 2021

Thank you. I understood.