Expand my Community achievements bar.

Automatic conversion from XDP file fo PDF file

Avatar

Former Community Member
Hello!



I have an application that creates an XDP file with a certain report.

I can open the XDP file in Designer 7.0 and then save it as PDF, but I would like to know, how can I automatically produce PDF file from XDP file.



Is it possible?



Thanks for your answers,

Bostjan
10 Replies

Avatar

Former Community Member
What software are you using to generate the XDP?

Avatar

Former Community Member
I generate XML code within my application and then save it with XDP extension.

I can then open the file in Designer and save it as PDF, but as I wrote in my first post would like to do it without opening designer manually.



Thanks,

Bostjan

Avatar

Former Community Member
I am trying to do the same thing

When you submit the Designer form with xdp+pdf , it will store the PDF as Base64 encoded in between the elements

I tried to extract the content of the chunk and did the Base64 decoding and saved it as PDF

But I am getting wrong decoding format

Has anyone tried this in java ?

Thank You
Srinivas Surapaneni

Avatar

Former Community Member
Aside from writing an XDP to PDF conversion application yourself, the only way to get a PDF from an XDP is via form server, which is to say the least, expensive. For a temporary solution, you could use some kind of listener on a directory that physically opens designer for you and saves it to another directory.

Avatar

Former Community Member
Is the extracting the binary content from xdp not going to work?<br /><br />XDP specification says the PDF is emebedded as Base64 encoded in the <chunk> field in XDP. But the decoding is failing for me<br /><br />Thank You<br />Srinivas Surapaneni

Avatar

Former Community Member
If you are dynamically generating the XDP, then there wont be a PDF automatically embedded. Thus, you have to open the XDP in designer and save it as a PDF by hand, or with form server.

Avatar

Former Community Member
If the binary is embedded in the XML, then you should just have to do a string to binary, then save the binary as a file.

Avatar

Former Community Member
Hi All:



We have a similar requirement for our product.



We have existing XDP templates (for use with Form server), but we have a need for another Client using an older version of XML Forms - AcroForms (PDF Forms).



So, we need to convert these XML forms in XDP files into PDF Forms (AcroForms). We tried File->SaveAs (PDF Forms) from Adobe designer, but it looks like the hidden fields (in XDP files) get messed-up.



Did you guys find any solution for this? I would appreciate if you can share your experiences and insights in this regard.



Thanks

Shashi Velur

Avatar

Former Community Member
Hi Shashi,



Have you tried the Livecycle SDKs yet?



I believe all you really need to do is..



1) Open the XDP input stream as a PDF document using the PDFFactory.

2) Invoke the save() method on the PDFDocument instance, which returns the document as an AcroForm, if I'm not mistaken.

3) Save the AcroForm input stream into a PDF file.



Hope this helps.



BTW, do you know how to generate a PDF document out of a template? Programmatically?



Karthick

Avatar

Level 6
Hi,



The decode really works. I used ADO for that.