[Chennaipy] Convert HTML Presentation to PDF
Rengaraj D
sakthirengaraj at gmail.com
Wed Jan 28 14:55:00 CET 2015
> ------
> 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()
> ------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20150128/e6869a91/attachment.html>
More information about the Chennaipy
mailing list