[Chennaipy] Convert HTML Presentation to PDF
Arvind Padmanabhan
arvindpdmn at gmail.com
Wed Jan 28 15:04:09 CET 2015
I assume you are doing this as an exercise in learning Python. Personally,
I use reveal.js where exporting from HTML to PDF is simply a click away.
On Wed, Jan 28, 2015 at 7:25 PM, Rengaraj D <sakthirengaraj at gmail.com>
wrote:
>
> ------
>> from selenium import webdriver
>>
> from time import sleep
>
>
>
>> browser = webdriver.Firefox()
>> browser.set_window_size(1600, 1200)
>> browser.get("file:///path/to/slides.html")
>>
>> for i in range(40):
>> browser.save_screenshot("frame%02d.png" % i)
>> section = browser.find_element_by_tag_name("section")
>> section.send_keys(" ")
>>
> sleep(2)
> Add a 2 second sleep here to avoid collision between slides
>
>> browser.quit()
>> ------
>>
>
>
>
> _______________________________________________
> Chennaipy mailing list
> Chennaipy at python.org
> https://mail.python.org/mailman/listinfo/chennaipy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20150128/6d88bdd3/attachment.html>
More information about the Chennaipy
mailing list