PDF
Create pdf from url
In local install, you should set SCREENSHOT_APIenv var or connect first

Get

1
import naas_drivers
2
​
3
url = "https://google.com"
4
filename = "google.pdf"
5
naas_drivers.pdf.connect().get(url=url, filename=filename)
Copied!

Get from Html

1
import naas_drivers
2
html = '<a src="https://google.com">test</a>'
3
filename = "google.pdf"
4
naas_drivers.pdf.connect().get(html=html, filename=filename)
Copied!

Connect

1
import naas_drivers
2
​
3
pdf = naas_drivers.pdf.connect()
4
​
5
url = "https://google.com"
6
filename = "google.pdf"
7
pdf.get(url=url, filename=filename)
Copied!
Copy link