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.
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: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.
Thank you for your email. I am out of the office and will return on Monday, September 5. If your message requires a reply, I will respond when I return.
For immediate needs, please contact Mr. Robert Motzke email@example.com
Senior Software Developer
It would appear you can avoid this issue by checking IDocuments IsConverted() method to see if the document has been converted from CS5 to CS5.5 and if so using the SaveAs() equivalent of the Save() method.