Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Problem with renderpdfform

Avatar

Level 8
Level 8
Hi all,<br /><br />I have a problem with using the renderPDFForm service.<br /><br />I have some xml files that I need to merge with an xdp form template. So I have set up a watched folder where I drop of the XML and then the renderPDFForm process I have created must merge the XML into the xdp form.<br /><br />I have two variables an inXML and an outPDF, both of type document. Furthermore I have imported my "template xdp" to the resources and point to it in the "Form to render" property. My Form data is my inXML variable and Rendered Form is set to my outPDF.<br /><br />When I execute this simple process I however get the following error in the failure directory:<br /><br />Failure Time----Thu Nov 22 22:45:22 CET 2007<br />source location ---- Reason of failure is-----Invocation error.<br />Invocation error.<br />Stream does not represent a PDF document.<br />ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.<br /> at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:210)<br /> at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:134)<br /> at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)<br /> at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)<br /> at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:336)<br /> at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doRequired(EjbTransactionCMTAdapterBean.java:259)<br /> at sun.reflect.GeneratedMethodAccessor393.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:585)<br /><br />Caused by:<br />com.adobe.livecycle.formsservice.exception.RenderFormException: Stream does not represent a PDF document.<br /> at com.adobe.internal.pdftoolkit.core.cos.CosDocument.init(CosDocument.java:381)<br /> at com.adobe.internal.pdftoolkit.core.cos.CosDocument.<init>(CosDocument.java:135)<br /> at com.adobe.internal.pdftoolkit.core.cos.CosDocument.newDocument(CosDocument.java:189)<br /> at com.adobe.internal.pdftoolkit.pdf.document.PDFDocument.<init>(PDFDocument.java:308)<br /> at com.adobe.internal.pdftoolkit.pdf.document.PDFDocument.newInstance(PDFDocument.java:240)<br /> at com.adobe.pdfdocumentmanager.client.SharedPdfDocumentContext.toPDFDocument(SharedPdfDocumentContext.java:657)<br /> at com.adobe.formServer.utils.CommonGibsonUtils.PDFDocumentFromDocument(CommonGibsonUtils.java:94)<br /> at com.adobe.formServer.SnapIn.PDFForm.PDFFormCache.mergeDataWithCache(PDFFormCache.java:65)<br /> at com.adobe.formServer.SnapIn.PDFForm.PDFForm.renderFromCache(PDFForm.java:351)<br /> at com.adobe.formServer.Controller.doXFARender(Controller.java:598)<br /> at com.adobe.formServer.Controller.doRender(Controller.java:494)<br /> at com.adobe.formServer.Controller.render(Controller.java:131)<br /> at com.adobe.formServer.FormServer.renderForm(FormServer.java:191)<br /> at com.adobe.formServer.FormServer.renderForm(FormServer.java:256)<br /> at com.adobe.formServer.docservice.FormsDocService.renderForm(FormsDocService.java:446)<br /> at com.adobe.formServer.docservice.FormsDocService.renderForm(FormsDocService.java:405)<br /> at com.adobe.formServer.docservice.FormsDocService.renderPDFForm(FormsDocService.java:109)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /><br />I hope you can help me<br /><br />Sincerely<br />Kim Christensen
7 Replies

Avatar

Level 10
Are you using the render service from the Sample - Forms/RenderPDFForm under Advanced Settings. The default render service (when you create an xfaForm variable) only works with PDFs.



Also make sure you put your XML data into a "document" variable because that's how renderPDFForm expects the data.



Jasmin

Avatar

Level 8
Level 8
Hi Jasmin,



I have used the renderPDFForm service directly under Forms, not Samples-Forms as I need the service as part of my process (actually it is the only activity in my process). I don't know how to use the Samples-Forms-RenderPDFForm as a part of the process.



My process is a shortlived process which just needs to take in a number of xmlfiles and add the data to a pdf form.



Hope you can understand the scenario I am trying to create (from my earlier post).



Sincerely

Kim Christensen

Avatar

Level 10
Ok, I understand your use case. I though you were going to use the PDF in WorkSpace. This is not the case so you are using the right service.



Now, there's really only three settings you need to set with the renderPDFForm operation.



Form to Render. Usually something like /Folder/MyXDP.xdp

Form Data: a "document" variable that contains the xml data to merge

Content Root URI: should be set to repository:/// when the forms are in the repository.



Is this how you've set your?



Jasmin

Avatar

Level 8
Level 8
Hi again,



I have figured it out now, thanks for the help - it works perfectly.



Sincerely

Kim Christensen

Avatar

Former Community Member
Hi i need to render a pdf form using a xdp and xml files. Could you please explain how to create a process for render a form and the values we need to apply in the properties pallette and the type of services we need to use.

Avatar

Level 10
This has been answer many times in the forum.



Try to do a search on renderPDFForm. If you still don't find anything then we'll help out.



Jasmin