2 Replies Latest reply on Sep 23, 2011 6:29 AM by APMABC

    Problems saving CS5 documents with InDesign Server CS5.5

    APMABC

      I've come across a problem which appears to be related to saving converted CS5 documents as CS5.5 using InDesign Server.

       

      In my C++ server code I have a method to open documents. Here's part of it...

       

      ============

      // Open the document.

      IDFile DocumentFile(DocumentPath);

      UIDRef TemporaryRef(UIDRef::gNull);

       

      if (Utils<IDocumentCommands>()->Open( &TemporaryRef, DocumentFile ) == kSuccess)

      {

          InterfacePtr<IDocument> ptrDocument( TemporaryRef, UseDefaultIID() );

       

          if (ptrDocument != nil)

          {

              m_ReferenceID = TemporaryRef;

              HaveSucceeded = true;

               }

      }

      ============

       

      In my server console, InDesign reports the following...

       

      09/01/11 13:33:17 INFO  [javascript] Executing File: C:\Program Files\My Service\DoAction.jsx
      09/01/11 13:33:31 WARN  [server] The document "Test.indd" was converted

       

      At this point, I can do pretty much what I want with the document with no problems. That is apart from save it. My code to save the document is as follows...

       

      ============

      // Save the document.

      if ((m_ReferenceID != UIDRef::gNull) && m_ReferenceID.ExistsInDB())

      {

          if (Utils<IDocumentCommands>()->Save( m_ReferenceID, kMinimalUI ) == kSuccess)

          {

              HaveSucceeded = true;

          }

      }

      ============

       

      No change occurs to the document on the file system. In my Visual Studio 2008 Output window, I see the following...

       

      First-chance exception at 0x01e62c5e in InDesignServer.exe: 0xC0000005: Access violation reading location 0x00000004.

      Windows has triggered a breakpoint in InDesignServer.exe.

      This may be due to a corruption of the heap, which indicates a bug in InDesignServer.exe or any of the DLLs it has loaded.

       

      My code hasn't given me any problems until now. I can save CS5 documents on IDS CS5, CS5.5 documents on IDS CS5.5. I can also save the same test document in the desktop version of CS5.5 with no problems. I can only assume that something more needs to be done before the document can be saved back in CS5.5 format.

       

      Has anyone seen anything similar? Any ideas are most appreciated.

       

      Cheers,

      Andrew