save web page image in pdf format - How To?

Hi;
Is it possible to save a snapshot of any web page in pdf format? or extract the entire html code for viewing

an exemplary workflow will be both instructive and educational.

Hi Umut Can,

  1. I reckon you can use Selenium nodes to take a snapshot from a website (As I do not have Selenium nodes installed, I can’t provide an example).
  2. To extract the HTML source from a site you can use the Http Retriever and Http Result Data Extractor nodes that you’ll find in the Palladian package (see example attached).

Hope this helps :slightly_smiling_face:

HttpRetriever_2020-04-12_11h26_34

2 Likes

Hi; @Veys

Thanks for the solution suggestions. I use selenium and I know the way you mentioned the solution. I was actually researching if I could find a different solution.

Thanks for the answer

Hoi Umut,

with the upcoming Selenium Nodes 4.3 there’s indeed a further option (admittedly, we had this almost ready since a while, but your post motivated me to do some final polish and get it ready for release). You’ll find a new “Create PDF” node which does exactly the same what the “Print to PDF” functionality of your browser does.

There’s some caveats:

  1. It only works with Chromium-based browsers (currently Chrome, Opera, Chromium),
  2. It only works when the headless mode is enabled.

I think that this is quite a cool new feature, as it also allows to bulk create PDF from HTML templates (records, invoices, etc.). I’ll likely provide some usage examples once it’s officially out.

As you’re a loyal supporter, I can send you a download link to the latest nightly build, if you already want to give it a try today. Let me know!

– Philipp

PS:

Link to the sample workflow on my public NodePit Space:

https://nodepit.com/workflow/com.nodepit.space%2Fqqilihq%2Fpublic%2Fforum%2FSelenium_Create_PDF_22500.knwf

4 Likes

Hi; Philipp @qqilihq
This is awesome! Thank you
My favorite front of Selenium is that it is constantly developing with innovation and constant updates. :kırpmak: :+1: :+1:

2 Likes

Philipp @qqilihq
Yes I definitely want to try please send me a link to download

How can I load the node.

Hey Umut, I’ll send the download link for the latest build via email.

– Philipp

1 Like

:wink: :+1: ok…

Hi; Philipp
I tried and it is very good. In particular, it was super in every respect to save the pdf format not only as a picture, but also in its copyable text content with all its links. :+1:

Update: This node is now available in the official 4.3 release

More details:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.