0 Replies Latest reply on Oct 5, 2011 1:46 PM by Birgit Stolte

    Applescript: export book - a bug?

    Birgit Stolte

      The applescript function "export book" is listed in the library as follows:

       

       

       

      export book
      format any : The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: tagged text/PDF type/EPS type/RTF/text type/XML/JPG/interactive PDF/packaged XFL/SWF/InDesign snip...
      ..

      ..

      ..

      [which documents book content] : Used to specify a list of book content references, from the current book, where the list may contain duplicate entries and if the list is not specified then the entire book contents shall be exported

      I tried this with no success. The red marked statement ("which documents") doesn't seem to work as described.

       

      so a statement like:

       

       

      export active book format PDF type to file ((path to desktop as text) & "Test.pdf") using myPDFPreset with theFiles 

       

      will be accepted, whereas "… which theFiles" will not.

      But the variable "theFiles" (which should be a list) is completely ignored in the code above, you can supply anything, there is no error message and the entire book with all files contained is exported.

       

      Any idea? Is that a bug?

      Btw: the corresponding statement works ok in Javascript: app.activeBook.exportFile( ExportFormat.PDF_TYPE, File(Folder.desktop +"/Test.pdf"), false, myPDFPreset, theFiles);

      so it looks like the function should also work with that parameter in Applescript, doesn't it?

       

      Regards, Birgit