Converting .docx files to pdf programatically

The Application Programming Interface and the OASIS Open Document Format

Converting .docx files to pdf programatically

Postby srimovila » Wed Aug 14, 2013 6:53 pm

I would like to use OpenOffice api to convert .docx files to pdf format using Java. I don't want to force the users of my application to install OpenOffice. So, I am looking at embedding OpenOffice components in my application itself. Looking for guidance on how to achieve this.

Thanks in advance for your help.

Best Regards,
Sai
srimovila
 
Posts: 1
Joined: Wed Aug 14, 2013 6:39 pm

Re: Converting .docx files to pdf programatically

Postby Zizi64 » Sat Sep 14, 2013 2:22 pm

So, I am looking at embedding OpenOffice components in my application itself.


Do you mean: you want use the "PDF export" function of the Apache OpenOffice/LibreOffice?
You can use a lot of freeware "virtual PDF printers" or other PDF converter softwares for this task.
But you can not use the built in Open/LibreOffice functions without install one of the open source office suites.

(Otherwise you can download the source codes of the Apache Openoffice, or LibreOffice, and you can get code snippets from them - if you are familiar, and expert to programming...)
Tibor Kovacs, Hungary; LO6.1.6, 6.2.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-6.4.0; AOO4.1.6
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 8771
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Converting .docx files to pdf programatically

Postby Villeroy » Sat Sep 14, 2013 5:35 pm

Open/LibreOffice is not good at reading OOXML files.
Better download the free readers for Word/Excel/PowerPoint from MS and print your documents to a virtual PDF printer.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27745
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 2 guests