Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Output
Viewing all articles
Browse latest Browse all 9631

Render Exception In generating pdf using output service client

$
0
0
Hi All,
i am trying to generate pdf using output service client by calling "generatePDFOutput" and passing xdp and data xml parameters as follows,
but i am facing render exception, any body knows why getting such error.
=======================================================
try{

//Set connection properties required to invoke LiveCycle ES

Properties connectionProps = new Properties();

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "t3://localhost:8001");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,"EJB");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebLogic");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "administrator");

connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");



//Create a ServiceClientFactory object

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);



//Create an OutputClient object

OutputClient outClient = new OutputClient(myFactory);



//Reference form data

FileInputStream fileInputStream = new FileInputStream("C:\\Adobe\\data.xml");

Document inXMData = new Document (fileInputStream);



//Set PDF run-time options

PDFOutputOptionsSpec outputOptions = new PDFOutputOptionsSpec();

outputOptions.setFileURI("C:\\Adobe\\output.pdf");



//Set rendering run-time options

RenderOptionsSpec pdfOptions = new RenderOptionsSpec();

pdfOptions.setLinearizedPDF(true);

pdfOptions.setPdfVersion("1.6");



//Create a PDF document

OutputResult outputDocument = outClient.generatePDFOutput(

TransformationFormat.PDF,

"input.xdp",

"C:\\Adobe",

outputOptions,

pdfOptions,

inXMData

);



//Retrieve the results of the operation

Document metaData = outputDocument.getStatusDoc();

File myFile = new File("C:\\Adobe\\Output.xml");

metaData.copyToFile(myFile);

}

catch (Exception ee)

{

ee.printStackTrace();

}

Viewing all articles
Browse latest Browse all 9631

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>