Forums Register Login

Doc to Pdf conversion using Java Code

+Pie Number of slices to send: Send
Hi All

I need to extract data from Doc to Pdf. How do i approach it? Is there any standard API for this.Please help.
+Pie Number of slices to send: Send
Our Accessing File Formats FAQ has several options.
I've had good results using OpenOffice.
+Pie Number of slices to send: Send
Hi Joe Ess,

I tried using Open Office as Doc to Pdf convertor and its working fine.
But in my application the requirement is to genearate Doc file using VM templating and it is happening. But i want to generate PDF using VM template. Is this possible to approach? Please suggest.
+Pie Number of slices to send: Send
What is a "VM Template"?

If whatever you're doing can be done in OpenOffice, then you might be able to use the OpenOffice Java API to automate it.
+Pie Number of slices to send: Send
Hi Ulf Dittmer,
Thanks for the reply.This is my requirement :
The records coming from the database has to be shown in table along with header and footer in Doc. To approach this, i have used org.apache.velocity.Template;
org.apache.velocity.VelocityContext;
org.apache.velocity.app.VelocityEngine;
Using this template it is successfully generating Doc. But i need to generate Pdf along with this Doc. I tried OpenOffice Api to convert Doc to Pdf, but it is not able to recognize the Doc file that is generated by Velocity Engine.When i take any other Doc other than generated from VM its converting into Pdf without any problem.
Even i tried Apache POI to read the Doc file, its throwing error :java.io.IOException: Invalid header signature; read 7311066695147732796, expected -2226271756974174256
I opened the Doc generated from VM in Editplus and it look like this :



Is there any problem in this doc?
Please help how can i read this from either OpenOffice or Apache POI?

[Edited by Jaikiran to enclose the xml in Code tags]
[ July 08, 2008: Message edited by: Jaikiran Pai ]
+Pie Number of slices to send: Send
 

Praveen Kumar Anekalmath wrote:Hi All

I need to extract data from Doc to Pdf. How do i approach it? Is there any standard API for this.Please help.




Try this page: http://www.dancrintea.ro/doc-to-pdf/
I am mighty! And this is a mighty small ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 10942 times.
Similar Threads
html:file
Convert PDF to RTF using itext
Convert PDF to RTF using itext
automate pdf creation from a html file on the web
pdc viewer software needed
TIFF. DOC, EXCEL to PDF Converter
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:04:31.