Hi, I am trying to use the XML RPC server in fireworks to export pages of a PNG.
And the pdf version: http://help.adobe.com/en_US/fireworks/cs/extend/fireworks_cs5_extending.pdf (chapter 7)
All I want to do is open a file, call exportPages(), and close it. So far this has been a very painful experience. I have CS5 Design Premium on a mac (os 10.5) if it matters. But I have the same problem 1 with my copy of CS3.
Fireworks never ever returns a document id. It also does not return an error number. The value attribute of the returned obj element and any error attributes are empty. Here are some example calls and responses:
request: <func name="createDocument" obj="fw"></func>
response: <return><obj value="" class="DocumentClass"></obj></return>'
request: <func name="closeDocument" obj="fw"><string order="0" value="0" /><bool order="1" value="false" /></func>
response: <return error=""></return>
Note the value of the response is empty. This is always the case, unless I get something back that is not an integer. For instance. I am able to get the path url of the open doc:
request: <func name="getDocumentPath" obj="fw"></func>
response: <return><string value="file:///Macintosh%20HD/Users/me/work/somefile.png"></string></return>
Is anyone else using this with any success? Will a FW dev some here and set me straight? I am opening a socket with python like this:
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
It seems like anything that is an int on FW end doesn't come through the response?
When I open a file that was created in CS3 with the API, a blocking dialog pops up asking about converting the fonts. FW will not return my request until this dialog is dismissed. Is there any way around this? This pretty much nullifies any automation with fireworks on files create by an older version.
Any help or insight into either of these would be extraordinarily helpful. Or if you have a way to export pages from a FW PNG without running fireworks, I would love love love to hear it. Judging by the RPC documentation, the availability of info online (virtually none!) and my experience with it, it seems adobe doesn't care about it all that much.