Skip to main content
Known Participant
January 26, 2011
Answered

[JS CS5] Trouble with user interaction when exporting to Interactive PDF

  • January 26, 2011
  • 1 reply
  • 509 views

I'm exporting to PDF with:

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;

app.activeDocument.exportFile(ExportFormat.INTERACTIVE_PDF, new File(myDocBaseName+".pdf"));

If I export to Interactive PDF manually, but choosing File > Export and selecting Adobe PDF (Interactive), I get an overset text warning dialog, and then a missing font warning dialog, and then a transparency blend space warning dialog, and then a progress dialog. But when I run the script, it just quietly exports the PDF with no dialogs at all.

What am I missing? I'm not getting any interaction!

This topic has been closed for replies.
Correct answer Harbs.

I'm not sure, but it could be that suppressing showing the export dialog also suppresses the related alerts.

You might need to show the dialog:

app.activeDocument.exportFile(ExportFormat.INTERACTIVE_PDF, new File(myDocBaseName+".pdf"),true);

Harbs

1 reply

Harbs.
Harbs.Correct answer
Legend
January 26, 2011

I'm not sure, but it could be that suppressing showing the export dialog also suppresses the related alerts.

You might need to show the dialog:

app.activeDocument.exportFile(ExportFormat.INTERACTIVE_PDF, new File(myDocBaseName+".pdf"),true);

Harbs

Known Participant
January 26, 2011

Thank you Harbs. That did it. Displaying the export dialog with the "true" parameter makes the userInteraction work. Strange. Now I can stop banging my head against the wall!