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.
The issue is caused by embedding the content of the article via
iframe
. When you look on the page source(s) of RPubs articles, you will find a part like:where
src
links to original version of the article. Follow up the link and print out/convert to pdf the pages.Using R, something like:
Created on 2023-07-01 with reprex v2.0.2