[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Converting HTML to PDF using Python?

Oltmans

3/8/2010 3:36:00 PM

Hi Python superstars,

Guys, any ideas on how to convert HTML files to PDF files? Or as an
alternative, how to convert HTML files to an image file(jpeg/png/etc)?
Ideally, the converted PDF/Image file should like exactly like the way
HTML file looks in the browser.

I really have no idea about this so I will really appreciate all the
help. Thanks in advance and kindly pardon my ignorance.

Thanks,
Oltmans
3 Answers

CM

3/8/2010 5:52:00 PM

0

On Mar 8, 10:36 am, Oltmans <rolf.oltm...@gmail.com> wrote:
> Hi Python superstars,
>
> Guys, any ideas on how to convert HTML files to PDF files? Or as an
> alternative, how to convert HTML files to an image file(jpeg/png/etc)?
> Ideally, the converted PDF/Image file should like exactly like the way
> HTML file looks in the browser.
>
> I really have no idea about this so I will really appreciate all the
> help. Thanks in advance and kindly pardon my ignorance.
>
> Thanks,
> Oltmans

http://lmgtfy.com/?q=python+h...

Terry Reedy

3/8/2010 6:48:00 PM

0

On 3/8/2010 12:51 PM, CM wrote:
> On Mar 8, 10:36 am, Oltmans<rolf.oltm...@gmail.com> wrote:
>> Hi Python superstars,
>>
>> Guys, any ideas on how to convert HTML files to PDF files? Or as an
>> alternative, how to convert HTML files to an image file(jpeg/png/etc)?
>> Ideally, the converted PDF/Image file should like exactly like the way
>> HTML file looks in the browser.

How an HTML file looks in *a* (not *the*) browser depends on the
browser, its settings, and window size. That is both a virtue and a
reason for the invention of pdf format.

>> I really have no idea about this so I will really appreciate all the
>> help. Thanks in advance and kindly pardon my ignorance.
>>
>> Thanks,
>> Oltmans
>
> http://lmgtfy.com/?q=python+h...


Dave \Crash\ Dummy

3/8/2010 11:07:00 PM

0

On 2010-03-08, Oltmans <rolf.oltmans@gmail.com> wrote:

> Guys, any ideas on how to convert HTML files to PDF files?

os.system("w3m -dump %s | a2ps -B --borders=no -o - | ps2pdf - %s" % (infile,outfile))

--
Grant Edwards grant.b.edwards Yow! Am I accompanied by a
at PARENT or GUARDIAN?
gmail.com