Expand my Community achievements bar.

generate PDF using Java API,

Avatar

Former Community Member
Hi, we have LiveCycle deployed on Websphere 6, from my windows workstation I am writing a java API to generate a pdf given a form design xdp file and sample xml data, I am calling this function



OutputResult outputDocument = outClient.generatePDFOutput(
TransformationFormat.PDF,

"test.xdp",

"\\sys2home\\wasadm\\Adobe",

outputOptions,

pdfOptions, inXMData);



it complains

Failed to load TemplateStream for FormQuery=test.xdp from location URI =\sys2home\wasadm\Adobe. in com.adobe.livecycle.formsservice.exception.RenderFormException

I don't know what the third parameter should be, the documentation says it should be A string value that specifies the content root where the form design is located.

but is this on my machine or on the server machine? I tried both but always complains can't locate the form

can someone help ??
1 Reply

Avatar

Former Community Member
I had the same trouble before.

The third parameter could be your local path or repository root. In the last case you should use a value "repository://" or something like that, which points to a repository root on the server. I can't say anything about if you can load an xdp file from a computer, other than yours or server.

I had bypassed this problem by setting PDFOutputOptionsSpec parameter to null. Reading result document in this case will look like outputDocument.getGeneratedDoc().copyToFile(resultFile).

I hope this will somehow help you.