I attempted to save or print the RPubs post as a PDF document, but I was unsuccessful. I also experimented with the provided code, but it didn't work either as required.
library(webshot)
webshot(
url = "https://rpubs.com/Zahidasghar/LDEP"
, file = "Output1.pdf"
, vwidth = 992
, vheight = 744
)
On the other hand, it converts the entire post into a single-page document that is not suitable for printing.
Edited
Also tried wget
without any success.