Skip navigation
Currently Being Moderated

Export to PDF with modal dialogsHi, Iam

Feb 26, 2010 2:58 PM

Hi,

I am trying to export Indesign document into PDF using Javascript. When the document has a missing font or link, a warning pops up and the export command fails saying there is a modal dialog that is open. How do I disable all the warnings or close all the warning dialogs before executing my export command?

 

thanks for your help.

 
Replies
  • Currently Being Moderated
    Feb 26, 2010 4:07 PM   in reply to Rums

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

     

    This will completely and utterly hide all dialogs. Be kind to your users (and to yourself!) and disable it just before a command that may pop up unwanted dialogs; then, right after that command, enable them again! Or else you will never see a Javascript error pop up, or, for that matter, any other ID dialog. It does what it says on the label!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 17, 2012 7:43 AM   in reply to Rums

    Hi Rums,

     

    I have an Applescript to do a PDF export with warnings for missing/modified links or fonts that works nicely from the script panel in InDesign.

    But I wanted to make it run form a panel. Unfortunatly teh Adobe Configurator only works with javascript.

    I have no expertise at all with javascript.

    Could I make use of your script?

    Would be very grateful.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 22, 2012 7:38 AM   in reply to Rums

    var myFolder = Folder.selectDialog("Select an in folder.");

    var files = myFolder.getFiles ("*.indd");

    var outFolder = Folder.selectDialog("Select an out folder.");

    app.scriptPreferences.userInteractionLevel=UserInteractionLevels.NEVER _INTERACT;

    for(i = 0, l = files.length; i <l; i++)

    {

        myFile = app.open(files[i], true)    

    }

    myFile.exportFile(ExportFormat.PDF_TYPE, File(outFolder + "/" + myFile.name.replace(/\.indd$/,"") +".pdf"), false);

    myFile.close(SaveOptions.NO);

    }

    alert("PDFs have been generated.")

    app.scriptPreferences.userInteractionLevel=UserInteractionLevels.inter actWithAll

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points