I need to convert PDF or HTML+CSS into DOC or DOCX under Linux, it can be from the command line or with a scripting language.
Any idea?
I've just stumbled on this question and after a bit more googling, found pandoc: http://johnmacfarlane.net/pandoc/README.html
A simple command will create a docx or pdf (or rtf etc) file from html input like so:
pandoc -o output.docx input.html
It can also write to stdout (with some formats) and read from stdin.
Not sure if it's in the debian / ubuntu repos but it's in the epel 6 repo for Redhat / CentOS 6 ( yum install pandoc
).
Hope this helps someone :)
You might be able to do the latter using OpenOffice from the command line. There are also bridges for Scripting languages - find out more on OpenOffice's website. There is one for PHP called PUNO, however I have no personal experience with it yet.
You can convert HTML into .doc using an OpenOffice macro, see this thread:
http://www.oooforum.org/forum/viewtopic.phtml?p=44367#44367
converting pdf to .doc is much harder, due the multitude of different content that could be inside a PDF - quite often PDFs are used for things such as scanned text.
You can use pdftohtml
to make an html file from a pdf.
Word can open html files directly.
Document Conversion
Current list of past examples.
Convert any document type into PDF
How convert Powerpoint slides to jpeg using openoffice api? (slide splitter)
List of many past conversion examples
List of converters available in OOo 2.0 (1.9.x)? Instructions to produce filter list
Recursive Folder of Html into PDF,Txt,SXW,DOC
Recursive Folder of SXD to SDC (StarCalc 5)
Setting Image size for JPEG export
Xcel to Calc conversion using the API
A very similar one, converting Xcel to Text
VB: converting Excel files to txt files
General Visual Basic document conversion of Text...
Converting Word -> PDF from the command line http://www.oooforum.org/forum/viewtopic.php?t=3772 http://www.oooforum.org/forum/viewtopic.php?t=5513 http://www.oooforum.org/forum/viewtopic.php?t=3768
PyOpenOffice tool to convert SXW to PDF without using OOo
Convert Word --> Writer from the command line
Convert Excel -> PDF from the command line
http://www.oooforum.org/forum/viewtopic.php?t=5596 http://www.oooforum.org/forum/viewtopic.php?p=21050#21050
Convert SXC to CSV from commandline
Convert PPT to HTML from command line...
Convert PPT to HTML short example...
Convert PPT to PDF short example...
Thread about converting document to PDF in Java
Convert SXW to DOC with Java
http://www.oooforum.org/forum/viewtopic.phtml?p=81846#81846I wrote a batch document converter
http://www.oooforum.org/forum/viewtopic.php?t=3525 http://www.oooforum.org/forum/viewtopic.php?t=2810 http://www.oooforum.org/forum/viewtopic.php?p=10311#10311 you can get it here
http://www.ooomacros.org/user.php#95532 more discussion of it here...
http://www.oooforum.org/forum/viewtopic.php?t=5708Macro to save in three formats
http://www.oooforum.org/forum/viewtopic.php?t=3612 Macro to save backups with timestamps
http://www.oooforum.org/forum/viewtopic.php?t=7674Open HTML with Writer not Web in order to export
http://www.oooforum.org/forum/viewtopic.php?t=3973 http://www.oooforum.org/forum/viewtopic.php?p=44367#44367
How to convert HTML into OpenOffice File?
http://www.oooforum.org/forum/viewtopic.php?t=11580
Page size pblm when converting HTML to PDF
http://www.oooforum.org/forum/viewtopic.phtml?p=63682#63682Discussion that ends in DocConverter utility.
http://www.oooforum.org/forum/viewtopic.php?t=2668Convert DBF into XLS, SXC, PDF and HTML
http://www.oooforum.org/forum/viewtopic.php?t=5728Good Visual Basic code example...converting documents
http://www.oooforum.org/forum/viewtopic.php?t=7673Draw exporting and printing
http://www.oooforum.org/forum/viewtopic.php?t=3620Using OOo's source code to read / convert / write documents in the formats supported by its filters. http://www.oooforum.org/forum/viewtopic.php?t=5785