These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

app.alert Limit?

phasegirl
Registered: Sep 3 2008
Posts: 7

Is there a limit to the characters you can pass in cMsg?

I need to display a terms and conditions dialog, which could be as much as 3,000 characters. The app.alert seems to have a limit, because it is truncating cMsg in the dialog window, but I cannot find documentation on it.

I've played around briefly with a custom dialog (execDialog), but I can't figure out how to get the text to wrap.

Any help/suggestions are greatly appreciated. Thanks!

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, app.alert is limited in this way.

A custom dialog is the way to go. The static text elements should wrap the text automatically. What kind of element are you placing the text into and what are the element properties?

Have you looked at AcroDialogs, it's the easy way to build custom dialogs

http://www.windjack.com/products/acrodialogs.php


Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

phasegirl
Registered: Sep 3 2008
Posts: 7
It's static_text. I've tried with and without multiline. Do I need to set char_width instead of width?

message is the variable with the terms & conditions text.Also, the dialog box title does not show Terms and Conditions, just Javascript Window (I think, can't remember exactly)

// Dialog Definition
var oDlg =
{
description:
{
name: "Terms and Conditions",
elements:
[
{
name: message,
type: "static_text",
width: 300,
height: 200,
multiline: true,
},
{
type: "ok_cancel",
},
]
}
};