Expand my Community achievements bar.

RenderPDFForm using Invocation API

Avatar

Level 2

I have a short-lived process which renders PDF Form. This process takes two inputs. Form and Form Data. Form data can be PDF/XDP file and Form Data needs to be in XML format. The process works just fine within Workbench with either XDP or PDF file as input Form. When I invoke the process using Java API using a servlet, it says "The File is damaged and could not be repaired." This happens only if the input Form is a PDF file. If the input is in XDP format, I do not see any problem.

Any ideas ?

Thanks,

Jyothi

2 Replies

Avatar

Level 10

You don't need to Render PDF if your input form is in PDF format. Rather you could just import the given data into your supplied PDF. I hope this will solve your problem.

Nith

Avatar

Level 2

The problem was because in my code the space that I had allocated for reading the document object into an inputstream was too less. So some part of the output file was not being written to the browser.

But importing data into PDF seems to be a better approach if the input file is a PDF file.

Thanks,

Jyothi