LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-23-2003, 05:17 PM   #1
Paulo Góes
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Rep: Reputation: 15
Converting *.doc or *.rtf to PDF files


I' d like to know if there is any resource that allows me to convert *.doc or *.rtf documents to PDF files
 
Old 05-23-2003, 06:20 PM   #2
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
Openoffice can do that:
- File->Print
- Select "Print to file"
- choose name and "PDF" as the "File type"
- Save
 
Old 05-26-2003, 11:04 AM   #3
Paulo Góes
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Original Poster
Rep: Reputation: 15
Converting *.doc or *.rtf to PDF files

Hi

Sorry but I think I didn't explain the whole question. In fact I need convert DOC and RTF files automatcly. I suposed I should use the OpenOffice's API. I've already visited www.openoffice.org, but I haven't found any information about it. The real question is how can I use that API in order to apply your sugestion.

Thans
 
Old 09-09-2003, 10:25 PM   #4
Chris_Cory
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
RTF...No Problem.

Use Mark de Does' Ted (http://www.nllgg.nl/Ted/), an rpm is available.

I do this on a FreeBSD/Apache production web server. Several users responsible for document creation use Word then save as RTF. They use predetermined strings to identify dynamic text.

This is then parsed in a custom parsing class to basically str_replace each of the variables. From there the finished RTF is passed through rtf2pdf.sh (I use exec() from within my PHP script). I then either pass a link back to the user or fopen and stream the PDF to the user. It works well.

I recommend users use Wordpad since the RTF is simpler and well supported by Ted. As for .doc...I haven't researched that since rtf solved my problem.
 
Old 12-06-2006, 10:37 AM   #5
jobermark
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
The first reply is not an error. Open office can be automated with various scripting languages by using the UNO interface.

The level of automation possible is very general: We have python scripts that load a document, find some tables by searching for given formatting, create blank rows in those tables, fetch contents for the new rows from a database and save the result as PDF with a formatted schedule of values matching an industry standard form.


That said, OOo is a big, heavy server component, and I would like to play with something that runs nicely from the command line. I have a Linux environment in mind for final deployment, but my current test data is on Windows box. Is there a version of Ted compiled for Windows anywhere?
 
Old 12-06-2006, 11:37 AM   #6
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
If I recall TED uses a script for conversion before loading the file. You could probably run it under windows using a bash.exe program like that in msys.
 
Old 12-08-2006, 07:12 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
you can do nearly anything using cygwin on a windows machine on windows data.
then of course you can transfer directly over to real *nix.
I do this quite a lot myself.
 
Old 12-08-2006, 09:07 AM   #8
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 735

Rep: Reputation: 76
Hi, Paulo Góes.

There are a few articles that may help isolate utilities to read doc and rtf files. If the ones listed below do not serve, Googling for "linux convert microsoft word pdf" produces above 1M hits.

The first one is a thread that discusses a problem similar to the one you posted, and has some specifics.

The second includes wvWare, which I have not used ... best wishes ... cheers, makyo

http://www.linuxforums.org/forum/lin...ghlight=catdoc

http://www.linux.com/article.pl?sid=06/02/22/201247
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
a .doc , .rtf converter debdas Programming 15 01-27-2011 12:09 AM
Converting PDF to text, rtf doc format saurya_s Linux - Software 2 06-16-2005 01:48 PM
trouble finding policy doc as pdf in doc mirrors stardotstar Debian 2 05-12-2005 10:56 PM
Converting html files to pdf saurya_s Linux - Software 1 01-12-2004 06:49 AM
converting files to pdf format? vendemmian Linux - General 2 05-23-2001 07:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration