Select to view content in your preferred language

How can I insert a PDF viewer in a pop-up?

549
3
01-28-2025 05:24 AM
Labels (2)
AdriánCapelo_Cruz
New Contributor

Hi all,

We would like to include a PDF viewer in a popup but we do not how to do it, or even if it is possible. Something similar to this PDF viewer that changes pages without any animation: https://galiciarexenera.afg.gal/proyecto/coto-maria-ponteareas/

If embedding a PDF viewer is not possible, an image carousel could do the work. 

We have tried using html and css in the html editor of the popups in the Classic Map Viewer, withouth success so far. 

Can this be achieved withing ArcGIS online?

Thank you so much

 

Tags (5)
0 Kudos
3 Replies
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Hi @AdriánCapelo_Cruz ,

So there a couple of ways in which you can achieve this.

  1. Depending on the type of pdf, if the pdfs are not dynamically created, then you can create a related table, enable attachments on that related record, and attach the pdf to that record. You can then associate all record to that singular record by assigning the unique id to those record.
    1. In the pop-up, create a custom expression that will pull the attachment and show it on the main feature.
  2. You can create an image carousel/viewer in Experience Builder which can be made to look similar to a pdf. It is a bit more work, but it is possible.
  3. The other option is to add the document directly to ArcGIS Online.
    1. Using the add data option on the contents page, add the pdf as an item.
    2. Once it is added, right click on the image and select the option to open the image in a new tab.
    3. Copy the image URL and paste it in the image option in the popup URL for the image URL.

There might be more that I am not thinking about but any of these should at least help lead you in whichever direction works best.

AdriánCapelo_Cruz
New Contributor

Thank you so much. I think the first one is the way to go.

These pdf will not be dinamically created, we will have a different pdf per record and we could include links to these pdf in a new field. 

Our question here is what the custom expression would be to show the pdf within the popup.

Thanks a lot

0 Kudos
RPGIS
by MVP Regular Contributor
MVP Regular Contributor

Have you checked this out.

Show Attachments in Pop-ups with Arcade Expression... - Esri Community

There is also the option, though I have never tested it, is the option to add a field, set the data type to raster, and use that field for the popup.

0 Kudos