0

I am having an issue with webshot not printing the map located on the right of this webpage.

https://www.polkpa.org/LegalDesc.aspx?strap=272735000000032000

here is the code I am using:

library(webshot)
webshot::install_phantomjs()

webshot("https://www.polkpa.org/LegalDesc.aspx?strap=272735000000032000",
"test_legaldesc.pdf", 
delay = 180,       
zoom = .6)

I set the delay to 180 thinking it wasn't loading but that is not the case.

Phil
  • 7,287
  • 3
  • 36
  • 66
Tj Laroue
  • 23
  • 7

2 Answers2

0

The solution I came up with is to use a different function:

chrome_print(input = "https://www.polkpa.org/LegalDesc.aspx?strap=272735000000032000", wait = 30, format = "png", timeout = 60, output = paste("272735000000032000","_LegalDesc.png", sep = ""))
Tj Laroue
  • 23
  • 7
0

You actually need delay but that huge like 180. Anyway, this is not the main issue in your problem. You should consider webshot2 instead of webshot. See my detailed answer to the similar case.

Note: I just changed the extension from .pdf to png in order to upload the result here. So, feel free to change it to the pdf which is also tried and there was no issue at all.

The code

library(webshot2)

webshot("https://www.polkpa.org/LegalDesc.aspx?strap=272735000000032000",
        "test_legaldesc.png", 
        delay = 20,       
        zoom = .6)

The output without any issue enter image description here

ozturkib
  • 1,493
  • 16
  • 28