2 Replies Latest reply on Apr 7, 2008 6:09 AM by (Helo)

    Noobie Mistake? Export to pdf InDesign Server CS3


      I'm trying to export my open document on InDesign Server CS3 to pdf, but it isn't working.

      I can open, make changes and save, but when it comes to exporting it gives an error:

      "An exception occurred when executing a COM method.

      The cause of this exception was that: AutomationException: 0x0 - The specified object does not support the desired export format. in 'C:\Program Files\Adobe\Adobe InDesign CS3 Server\InDesignServer.exe'."

      Here is my code below. I've tried the export code for pdf with inverted comma's as well, no luck. All the sample scripts do it in this fashion, am I missing something?

      Any help much appreciated.

      myInDesignServer = CreateObject("COM", "InDesignServer.Application.CS3");

      myDocument = myInDesignServer.Open("C:\artwork\my_file.indd");
      myDocument.Export(1952403524, "C:\artwork\my_pdf.pdf");
        • 1. Re: Noobie Mistake? Export to pdf InDesign Server CS3
          Hello Brett,

          I have done some COM programming with IndesignServer CS3 using C#, here is is the way I do a pdf export:

          doc.Export(idExportFormat.idPDFType, @"C:\indesignTestFile.pdf", false, "[High Quality Print]", "Some Comment", true);

          Notice the first argument: the enumeration which specifies the file type and the fourth argument which is the name of an Adobe Pdf Preset. This particular preset should already be installed on your CS3 server. You cant export to a pdf without using an export preset.

          I hope this was helpful, Im no expert myself.
          • 2. Re: Noobie Mistake? Export to pdf InDesign Server CS3
            Level 1
            Ooops, the line of code in my last post is actually for Indesign CS3 not Indesign Server CS3, but the server code should be almost the same. You need the Pdf Preset in any case and you should use the enumerator instead of 1952403524.