Ferrum::Browser load inline page or from local file #261
davidwessman
started this conversation in
General
Replies: 2 comments 5 replies
-
You can workaround it with https://github.com/rubycdp/ferrum#interceptoptions and |
Beta Was this translation helpful? Give feedback.
1 reply
-
In fact there's a better approach https://github.com/rubycdp/ferrum#content--html I forgot about browser = Ferrum::Browser.new
page = browser.create_page
page.content = "<html><head></head><body><p>lol</p></body></html>"
page.body # => <html><head></head><body><p>lol</p></body></html> |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I read through the documentation and the options for
Ferrum::Browser.new
but could not find any way to load a browser from a local file or string instead of an url.The use-case I have is to render PDFs where there is no URL to load the HTML from.
I am sorry if I missed some option for this, thankful for any help 🙂
Beta Was this translation helpful? Give feedback.
All reactions