[reportlab-users] can i genrate pdf with html content

knmurthy reportlab-users@reportlab.com
Thu, 29 Jul 2004 10:32:31 +0530


This is a multi-part message in MIME format.
--------------040008060608020504040206
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello,
I am getting content from database as html string. I want to genrate pdf 
by writing this html content.
I hope there will be way to write direct html whithout using any 
Pargraph styles methods.

Example:
html content: 
"<p><strong>fsdfsdfsdfsd</strong></p><ul><li>fsdfds</li></ul><ol><li>fds</li></ol><p><font 
color=#336633>fdsfds</font></p>"

Pdf output:

fsdfsdfsdfsd

    * fsdfds

   1. fds

fdsfds


Can any one poient me any method or example.

Thanks for any help.

Thanks,
Murthy

--------------040008060608020504040206
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
<strong></strong><strong></strong>Hello,<br>
I am getting content from database as html string. I want to genrate
pdf by writing this html content.<br>
I hope there will be way to write direct html whithout using any
Pargraph styles methods. <br>
<br>
<u>Example:</u><br>
<b>html content:</b> "<span class="start-tag">&lt;p</span>&gt;&lt;<span
 class="start-tag">strong</span>&gt;fsdfsdfsdfsd&lt;/<span
 class="end-tag">strong</span>&gt;&lt;/<span class="end-tag">p</span>&gt;&lt;<span
 class="start-tag">ul</span>&gt;&lt;<span class="start-tag">li</span>&gt;fsdfds&lt;/<span
 class="end-tag">li</span>&gt;&lt;/<span class="end-tag">ul</span>&gt;&lt;<span
 class="start-tag">ol</span>&gt;&lt;<span class="start-tag">li</span>&gt;fds&lt;/<span
 class="end-tag">li</span>&gt;&lt;/<span class="end-tag">ol</span>&gt;&lt;<span
 class="start-tag">p</span>&gt;&lt;<span class="start-tag">font</span><span
 class="attribute-name"> color</span>=<span class="attribute-value">#336633</span>&gt;fdsfds&lt;/<span
 class="end-tag">font</span>&gt;&lt;/<span class="end-tag">p</span>&gt;"<br>
<br>
<b>Pdf output:</b><br>
<p><strong>fsdfsdfsdfsd</strong></p>
<ul>
  <li>fsdfds</li>
</ul>
<ol>
  <li>fds</li>
</ol>
<p><font color="#336633">fdsfds<br>
</font></p>
<p><font color="#336633"><br>
<font color="#000000">Can any one poient me any method or example.<br>
</font></font></p>
<p><font color="#000000">Thanks for any help.<br>
</font></p>
Thanks,<br>
Murthy<br>
</body>
</html>

--------------040008060608020504040206--