Highlighted

coerce object error out of assembler

scf22

26-02-2009

I have a livecycle process that uses Assembler to create a PDF package. I then want to reader extend that package. I believe that I have to use "AssemblerResult" as the output type for the Assembler service but when it is passed to ReaderExtension, I get a "cannot coerce object from AssemblerResult to document type. Any thoughts on how to get around this??

Replies

Highlighted

Jasmin_Charbonn

27-02-2009

Your are correct that the Assembler service returns an AssemblerResult object. <br /><br />However the ReaderExtension service doesn't take an AssemblerResult as in input, it takes a document object.<br /><br />You need to extract the document from the AssemblerResult using the following xPath:<br /><br />/process_data/@myDoc = /process_data/assresult/object/documents[@id='out.pdf']<br /><br />out.pdf is the name you would give to the resulted document in your result tag in the DDX.<br /><br /><PDF result="pdf2image_res.pdf"><br /><br />Jasmin