<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Print a pop-up as PDF in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1119754#M75389</link>
    <description>&lt;P&gt;I am working on a simple webpage to allow the printing of a pop up as a pdf.&amp;nbsp; Currently loading an existing webmap as we have many existing projects we would like to add printing to.&amp;nbsp; I am new to javascript so I am sure there is are better ways.&lt;/P&gt;&lt;P&gt;Currently I am using the following to get the pop-up information&lt;BR /&gt;var popUpTitle = document.querySelector(".esri-popup__header-container--button").innerHTML&lt;BR /&gt;var popUpContents = document.querySelector(".esri-popup__content").innerHTML&lt;/P&gt;&lt;P&gt;And passing that to a new window, it works pretty well only I am losing the colored bands to help keep everything to read.&amp;nbsp; Which is not huge but someone will want it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1637712240124.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28137i5FA58415B8D2746A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1637712240124.png" alt="RyanBohan_0-1637712240124.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_1-1637712274486.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28138iF9DC2CED5295D8E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_1-1637712274486.png" alt="RyanBohan_1-1637712274486.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To view my code in code pen&amp;nbsp;&lt;A href="https://codepen.io/rbohan/pen/mdMZbdp" target="_blank"&gt;https://codepen.io/rbohan/pen/mdMZbdp&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Nov 2021 00:18:46 GMT</pubDate>
    <dc:creator>RyanBohan</dc:creator>
    <dc:date>2021-11-24T00:18:46Z</dc:date>
    <item>
      <title>Print a pop-up as PDF</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1119754#M75389</link>
      <description>&lt;P&gt;I am working on a simple webpage to allow the printing of a pop up as a pdf.&amp;nbsp; Currently loading an existing webmap as we have many existing projects we would like to add printing to.&amp;nbsp; I am new to javascript so I am sure there is are better ways.&lt;/P&gt;&lt;P&gt;Currently I am using the following to get the pop-up information&lt;BR /&gt;var popUpTitle = document.querySelector(".esri-popup__header-container--button").innerHTML&lt;BR /&gt;var popUpContents = document.querySelector(".esri-popup__content").innerHTML&lt;/P&gt;&lt;P&gt;And passing that to a new window, it works pretty well only I am losing the colored bands to help keep everything to read.&amp;nbsp; Which is not huge but someone will want it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1637712240124.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28137i5FA58415B8D2746A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1637712240124.png" alt="RyanBohan_0-1637712240124.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_1-1637712274486.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28138iF9DC2CED5295D8E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_1-1637712274486.png" alt="RyanBohan_1-1637712274486.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To view my code in code pen&amp;nbsp;&lt;A href="https://codepen.io/rbohan/pen/mdMZbdp" target="_blank"&gt;https://codepen.io/rbohan/pen/mdMZbdp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 00:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1119754#M75389</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2021-11-24T00:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Print a pop-up as PDF</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1119781#M75391</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/190819"&gt;@RyanBohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you will need to inject the required styling to the constructed HTML code. I would suggest not to use ESRI css file, because it will be huge for just a print page for the popup.&lt;/P&gt;&lt;P&gt;sample code to inject the css file link:&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;document.getElementById("of head/body tag")&lt;BR /&gt;.innerHTML += '&amp;lt;link rel="stylesheet" type="text/css" href="style.css"&amp;gt;';&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 04:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1119781#M75391</guid>
      <dc:creator>IhabHassan</dc:creator>
      <dc:date>2021-11-24T04:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Print a pop-up as PDF</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1120047#M75397</link>
      <description>&lt;P&gt;Always great to be able to click the accept as solutions button.&amp;nbsp; Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/329425"&gt;@IhabHassan&lt;/a&gt;&amp;nbsp;I think this is what I needed.&amp;nbsp; I am sure your correct that is likely overkill to use esri css file, we are still exploring how this will be used.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//doc.write(divText);&lt;BR /&gt;doc.write(divText + '&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/4.21/esri/themes/light/main.css" target="_blank"&gt;https://js.arcgis.com/4.21/esri/themes/light/main.css&lt;/A&gt;" /&amp;gt;');&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RyanBohan_0-1637780924789.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28201i0CFD37280A2009A7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RyanBohan_0-1637780924789.png" alt="RyanBohan_0-1637780924789.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 19:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-a-pop-up-as-pdf/m-p/1120047#M75397</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2021-11-24T19:09:43Z</dc:date>
    </item>
  </channel>
</rss>

