How to open up a PDF via a link from Flexviewer

3720
8
04-19-2011 01:03 PM
ZlatkoGrebenar1
New Contributor II
I am using the sample flex viewer the create an application that links subphases to plats which are PDF's. I don't have Adobe Flex Builder in order to really customize the viewer. I have populated a field that links the subphases to specific plats.

Is there a way to have the link open up a PDF in a new window?

Thanks,

Zlatko
Tags (2)
0 Kudos
8 Replies
BjornSvensson
Esri Regular Contributor
Are you using the old "Sample" Flex Viewer, or the ArcGIS Viewer for Flex 2.x?

What format is your data in? Are you publishing it in a map service using ArcGIS Server?

If you are using ArcGIS Viewer for Flex 2.3 and ArcGIS Server, then if your field value is a full URL (starting with http:// or https://) the popup renderer (new at 2.3) will automatically make it linkable, and thus open up in a new window.
0 Kudos
ZlatkoGrebenar1
New Contributor II
I am using ArcGIS Viewer for Flex 2.2. I am publishing an mxd as a map service to the ArcGIS Server. As of right now I am just using a shapefile as a trial to get it working.

This is an internal application and the hyperlink is an UNC path to the PDF files.

Thanks,

Zlatko
0 Kudos
EricVenden
Occasional Contributor II
Bjorn,
I am using the 2.3.1 Viewer and have configured a popup to display 2 fields - a "title" field and a field that is a link to a PDF document.  The URL is not clickable in the popup.

Here is a sample URL that displays in the popup:
http://maps.gurnee.il.us/pdfmaps/Survey_Monuments/Primary Benchmarks/BM 2596.pdf

The URL is not publicly accessible (not sure if this matters)...

Do I have to configure a different tag?
Thanks
Eric V
0 Kudos
EricVenden
Occasional Contributor II
It appears that if there is an embedded space in the URL, the popup renderer will not make the URL linkable.....I have links working with space embedded URL's in other widgets, but it appears it makes a difference with the popup feature.

Can anyone confirm this?
Thank you
0 Kudos
BrianOevermann
Occasional Contributor III
Zlatko,

I believe your stumbling block is the UNC path to your pdf.  Because this is a web application, the path to your pdf should be a valid URL.  Hopefully all of these documents are in an organized location on your network and not spread all over the network.  For our City's plats (and the links to them), a folder was created on the network and the plat pdf's are in subfolders within.  In IIS, I created a virtual directory to this plat folder.  As an example, let's call it 'plats'.  The 'root' portion of the URL that all of the pdf's are at would be:  http://my.domain.com/plats/ and you would add your pdf filename (including .pdf) (and also including any subfolder as well) to this 'root'.

As Eric has found out, spaces in your URL can create problems.  We went through our plat folder and added underscores wherever spaces existed, both in the folder names and the filenames.  Extra work, but big dividends in that everything works like we want it to with no "works with this but not with that" hassles.

UNC paths are a nice solution within ArcGIS ArcMap, but I haven't found a way to utilize them through the flex viewer.  If anyone knows how, I would love the info!
0 Kudos
RashidMalik1
New Contributor
I have just upgraded to 2.3.1 and I am using the ThematicQueryWidget.  Upon clicking a polygon of a thematic layer, I am getting list of field and a bar chart as I want.  However, I have added another field that has a URL (i.e. http://www.google.com), which I want to be listed but should be clickable.  How can I do this?  See the attached image for clarification.  Thanks
0 Kudos
BjornSvensson
Esri Regular Contributor
Rashid, if your question is not related to this thead (how to open a PDF via a link), you might want to post a new thread. This will increase your chances of getting an answer as well as better organize threads in general and therefor help other people looking for answers 🙂

Go to http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex (if it's related to the Flex Viewer), or http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex (if it's more of an API question), click the "Post New Thread" link at the top right of the page.
0 Kudos
RashidMalik1
New Contributor
Rashid, if your question is not related to this thead (how to open a PDF via a link), you might want to post a new thread. This will increase your chances of getting an answer as well as better organize threads in general and therefor help other people looking for answers 🙂

Go to http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex (if it's related to the Flex Viewer), or http://forums.arcgis.com/forums/18-ArcGIS-API-for-Flex (if it's more of an API question), click the "Post New Thread" link at the top right of the page.


Bjorn,

My apologies.  I thought my question was sort of in line with what was being discussed here.  I would do as you suggested.  Thanks for the information.
0 Kudos