Expand my Community achievements bar.

DDXM_S14017 (A <PDF> source document is required, but no documents were found for ... )

Avatar

Former Community Member
I'm trying to invoke the Assembler Web Service from a .NET 1.1 application and I'm seeing the following error message:<br /><br />Caused by: com.adobe.internal.ddxm.io.InputNotFoundException: DDXM_S14017: A <PDF> source document is required, but no documents were found for {PDF source="file0" baseDocument="true" required="false"}.<br /><br />My DDX: <br /><br /><LC:DDX xmlns:LC="http://ns.adobe.com/DDX/1.0/"><LC:PDF result="out.pdf"><LC:PDF source="file0" /></LC:PDF></LC:DDX><br /><br />And then I'm passing in a mapItem[] array (where that location is a valid PDF file)<br /><br />mapItem[0] = { "file0", "c:\adobe\source\file0" }<br /><br />What am I doing wrong?
4 Replies

Avatar

Former Community Member
I just set it to log all warnings and info as well and noticed this in the log as well.



2007-09-04 09:55:35,885 WARN [com.adobe.livecycle.assembler.AssemblerServiceImpl] ALC-ASM-W00-006: The input map key file0 of type java.lang.String is an unknown type and could not be converted to a document. This entry will not be included in the input map.



Looking through some of the Java samples, there is a "Document" class that is used. This isn't generated when I create the proxies in .NET - the method takes in a "mapItem[]" as the second parameter, and a mapItem is just an object with key/value properties.



Has anyone had luck invoking this from .NET?

Avatar

Level 10
I got that code from the documentation under API Quick Start/Assembler Service API Quick Start/Quick Start: Assembling a PDF document using the web service API.



As you'll see, you need to pass the document as part of the map and not just the name of the document. That's why you where getting a casting error from String to document.



Jasmin



...



// Create BLOBs that represents the input DDX file and PDF sources

BLOB ddxDoc = new BLOB();

BLOB mapDoc = new BLOB();

BLOB optionsDoc = new BLOB();



// Get the input DDX document and input PDF sources

string ddxFileName = "C:\\shell.xml";

FileStream ddxFs = new FileStream(ddxFileName, FileMode.Open);

string pdfFileNameMap = "C:\\map.pdf";

FileStream mapFs = new FileStream(pdfFileNameMap, FileMode.Open);

string pdfFileNameOptions = "C:\\directions.pdf";

FileStream optionsFs = new FileStream(pdfFileNameOptions, FileMode.Open);



// Get the lengths of the file streams and create byte arrays

int ddxLen = (int)ddxFs.Length;

byte[] ddxByteArray = new byte[ddxLen];

int mapLen = (int)mapFs.Length;

byte[] mapByteArray = new byte[mapLen];

int optionsLen = (int)optionsFs.Length;

byte[] optionsByteArray = new byte[optionsLen];



// Populate the byte arrays with the contents of the file streams

ddxFs.Read(ddxByteArray, 0, ddxLen);

mapFs.Read(mapByteArray, 0, mapLen);

optionsFs.Read(optionsByteArray, 0, optionsLen);



// Populate the BLOB objects

ddxDoc.binaryData = ddxByteArray;

mapDoc.binaryData = mapByteArray;

optionsDoc.binaryData = optionsByteArray;



// Create the map containing the PDF source documents

mapItem[] inputMap = new mapItem[2];

inputMap[0] = new mapItem();

inputMap[1] = new mapItem();

inputMap[0].key = "map.pdf";

inputMap[0].value = mapDoc;

inputMap[1].key = "optionsLink.pdf";

inputMap[1].value = optionsDoc;



// Create an AssemblerOptionsSpec object

AssemblerOptionSpec assemblerSpec = new AssemblerOptionSpec();

assemblerSpec.failOnError = true;



// Send the request to the Assembler Service

AssemblerResult result = asOb.invoke(ddxDoc,inputMap,assemblerSpec);

Avatar

Former Community Member

Hi Jasmin,

I am developing on ES2 and I need to use a folder on server as source. But I don't know how to.. In my application, I merge xmls with a template and create flat PDFs and write them in a folder on server. Then I want to assemble them.

I created a simple DDX through assembly descriptor. It's working when I test it by preview result but I got error when I use in "Invoke DDX on One Document" service. (Common\AssemblerService\Invoke DDX on One Document)

DDX:

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="Result.pdf">
    <PDF includeInTOC="false" source="C:\OUTPUTS" baseDocument="false" required="false"/>
  </PDF>
  <?ddx-source-hint name="C:\OUTPUTS"?>
</DDX>

Error:

DDXM_S14017: A <PDF> source document is required, but no documents were found for {PDF source="C:\OUTPUTS\.*" baseDocument="true"}.

Thank in advance

Murat

Avatar

Former Community Member
Where can I get this shell.xml for joining of 2 PDFs

Please give me as soon as possible, as it is urgent..



my e-mail : yogesh249@gmail.com, yogesh249@yahoo.co.in