Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Workbench
Viewing all articles
Browse latest Browse all 69588

How to render PDF from Local File System

$
0
0
Hi,
Our code to render PDF form is as follows
__________________________________________________________________________________________ __________________________________________
Properties connectionProps = new Properties();
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_SOAP_ENDPOINT, "http:\\end point url");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceC lientFactoryProperties.DSC_SOAP_PROTOCOL);
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE, "WebSphere");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "admin");
connectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");

ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
FormsServiceClient formsClient = new FormsServiceClient(myFactory);

String formName = "/ManualGEAC.pdf";
byte[] cData = "".getBytes();

Document oInputData = new Document(cData);
PDFFormRenderSpec pdfFormRenderSpec = new PDFFormRenderSpec();
pdfFormRenderSpec.setCacheEnabled(new Boolean(true));
URLSpec uriValues = new URLSpec();

uriValues.setContentRootURI("http://10.145.86.201:9080/PANBaseApp/forms");

FormsResult formOut = formsClient.renderPDFForm(
formName, //formQuery
oInputData, //inDataDoc
pdfFormRenderSpec, //PDFFormRenderSpec
uriValues, //urlSpec
null //attachments

Document myData = formOut.getOutputContent();
__________________________________________________________________________________________ ___

In the above snippet the setting of ContentRootUrl is not working. At the given line :
__________________________________________________________________________________________ ___
uriValues.setContentRootURI("http://10.145.86.201:9080/PANBaseApp/forms");
__________________________________________________________________________________________ ___

Can anybody help me to set the content root url as the local file path of the Pdf form.

Thanks,
Saravanan

Viewing all articles
Browse latest Browse all 69588

Trending Articles



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