Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Way to render HTML string to PDF? #12

Open
elyngved opened this issue Nov 26, 2013 · 2 comments
Open

Way to render HTML string to PDF? #12

elyngved opened this issue Nov 26, 2013 · 2 comments

Comments

@elyngved
Copy link

In addition to passing in a URL, it would be great if I could pass in a string of HTML, as is supported by the Ruby wkhtmltopdf gems out there. I know this is possible in PhantomJS by using the following code:

var page = require('webpage').create();
page.content = '<html><body><p>Hello world</p></body></html>';
@ediogodias
Copy link

Would like to have this possibility too, any one worked around this?
Thanks

@waghanza
Copy link

Perhaps, you could use a specific

rasterize.js

It could be a security issue to pass a html sting (malicious code could be injected)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants