I am working on a simple webpage to allow the printing of a pop up as a pdf. Currently loading an existing webmap as we have many existing projects we would like to add printing to. I am new to javascript so I am sure there is are better ways.
Currently I am using the following to get the pop-up information
var popUpTitle = document.querySelector(".esri-popup__header-container--button").innerHTML
var popUpContents = document.querySelector(".esri-popup__content").innerHTML
And passing that to a new window, it works pretty well only I am losing the colored bands to help keep everything to read. Which is not huge but someone will want it.
To view my code in code pen https://codepen.io/rbohan/pen/mdMZbdp