HTML to RTF string using Python

0 votes
I am trying to find a way to convert HTML text to RTF string. Is there any libraries that does this job? I get html content dynamically in my project and need it to be rendered in RTF format. I am using HTML parser to convert HTML text to normal string and then have trying to use PyRTF for conversion to RTF format.

Can anyone suggest me a better way to do this?
Apr 11, 2019 in Python by ana1504.k
• 7,890 points
600 views

1 answer to this question.

0 votes
RTF seems a dicey format to convert from/to. I've tried cutting and pasting among applications on Mac OS X, for example, where RTF is something of a lingua franca. Some of those apps are Microsoft apps, others are not. Even basic formatting information like font size, font face, line spacing, and list styling is jumbled when copying from one ostensibly RTF-speaking app to another.
answered Apr 11, 2019 by SDeb
• 13,250 points

Related Questions In Python

0 votes
1 answer

HTML to RTF string using Pandoc(pypandoc)

Hey, @There, Actually there is a simple solution: use ...READ MORE

answered May 27 in Python by Gitika
• 31,510 points
56 views
0 votes
1 answer

I'm using Python 2.7 to convert an XML response (from a REST call to Atlassian Fisheye) into an HTML table.

You don't have a template matching tabularQueryResult in your ...READ MORE

answered Oct 4, 2018 in Python by Priyaj
• 57,530 points
142 views
0 votes
1 answer

How to put a variable inside a String using Python?

In the easiest way, you can create ...READ MORE

answered Nov 23, 2018 in Python by Nymeria
• 3,540 points

edited Dec 12, 2018 by Nymeria 96 views
0 votes
1 answer

How to convert an integer to a string using Python?

Here is an easy solution: def numberToBase(n, b): ...READ MORE

answered Nov 23, 2018 in Python by Nymeria
• 3,540 points

edited Dec 12, 2018 by Nymeria 138 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,101 views
0 votes
0 answers
0 votes
1 answer

How to download a file over HTTP using Python?

In Python 2, use urllib2 which comes ...READ MORE

answered Oct 18, 2018 in Python by SDeb
• 13,250 points
151 views
0 votes
1 answer

How do I append one string to another in Python?

If you only have one reference to ...READ MORE

answered Oct 22, 2018 in Python by SDeb
• 13,250 points
92 views