Html or Pdf to Rtf (Linux) with Python

  • Thread starter Alexander Straschil
  • Start date
A

Alexander Straschil

Hello!

I have to convert an HTML document to rtf with python, was just googling
for an hour and did find nothing ;-(
Has anybody an Idea how to convert (under Linux) an HTML or Pdf Document
to Rtf?

Thanks, AXEL
 
C

Cameron Laird

Hello!

I have to convert an HTML document to rtf with python, was just googling
for an hour and did find nothing ;-(
Has anybody an Idea how to convert (under Linux) an HTML or Pdf Document
to Rtf?

Thanks, AXEL

Are you trying to convert one document in particular, or automate the
process of conveting arbitrary HTML documents? What computing host is
available to you--Win*? Linux? MacOS? Solaris!? Is Word installed?
OpenOffice? Why have you specified Python?
 
A

Axel Straschil

Hello!

Sorry Cameron, I was replying, now my folloup ;-):
Are you trying to convert one document in particular, or automate the
process of conveting arbitrary HTML documents?

I have an small CMS System where the customer has the posibility to view
certain Html-Pages as Pdf, the CMS ist Python based. I also thought
about
passing the Url to an external converter Script, but found nothing ;-(

What computing host is available to you--Win*? Linux? MacOS?
Solaris!?
Linux

Is Word installed?
No.


Yes.

Why have you specified Python?

Becouse I like Python ;-)
The System behind generating the HTML-Code is written in Python.

Thanks,
AXEL.
 
C

Cameron Laird

Hello!

Sorry Cameron, I was replying, now my folloup ;-):


I have an small CMS System where the customer has the posibility to view
certain Html-Pages as Pdf, the CMS ist Python based. I also thought
about
passing the Url to an external converter Script, but found nothing ;-(



Becouse I like Python ;-)
The System behind generating the HTML-Code is written in Python.
.
.
.
That's a fine reason to use Python. It helps me to know, though.

I do a lot of this sort of thing--automation of conversion between
different Web display-formats. I don't have a one-line answer for
the particular one you describe, but it's certainly feasible.

I'm willing to bet there's an HTML-to-RTF converter available for
Linux, but I've never needed (more accurately: I have written my
own for special purposes--for my situations, it hasn't been diffi-
cult) one, so I can't say for sure. My first step would be to
look for such an application. Failing that, I'd script OpenOffice
(with Python!) to read the HTML, and SaveAs RTF.

I list a few PDF-to-RTF converters in <URL:
http://phaseit.net/claird/comp.text.pdf/PDF_converters.html#RTF >.
Again, I think there are more, but haven't yet made the time to
hunt them all down.
 
Joined
Nov 5, 2010
Messages
1
Reaction score
0
Just a big thank you to Cameron Laird for recommending wkhtmltopdf on his site. Looks like the perfect answer (especially since it does headers and footers). Nice 1!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top