Select to view content in your preferred language

To get a pdf file stored in d drive of the server related to the selected feature.

846
2
Jump to solution
05-03-2013 10:33 PM
VishakhaDubey
Deactivated User
Hi Everyone

I want to know if I can show a pdf file that is stored in the d drive of the server on click of the grid cell that is containing data related to a feature selected from the map. If possible how should be the link given for the required pdf file.

Please help.
0 Kudos
1 Solution

Accepted Solutions
JeffJacobson
Frequent Contributor
I think the PDF files would need to be served out via HTTP. You can set up the directory on the server that contains the PDF files to be a web site. (E.g., in IIS you would create a "Virtual Directory" pointing to the folder with the PDFs.)

View solution in original post

0 Kudos
2 Replies
JeffJacobson
Frequent Contributor
I think the PDF files would need to be served out via HTTP. You can set up the directory on the server that contains the PDF files to be a web site. (E.g., in IIS you would create a "Virtual Directory" pointing to the folder with the PDFs.)
0 Kudos
VinayBansal
Frequent Contributor
You can keep the PDF on the server location and create a Virtual Directory for the same. And you can create handler that fetches the pdf URL from server and returns URL to server.

Suppose you need to fetch PDF based on object id of feature and your handler is WebHandler.ashx.
1. Use dojo.xhrPost to make a call to Handler.
2. If PDF is stored with object id then just append the ObjectId to URL of PDF folder or write your logic in handler to fetch the PDF based on objectId/ or some other field.
3. Return the url from handler and catch the result in xhrPOST.

With the use of handle you can also end the response and prompt the user with download dialog by setting the Response header and ending the response.

Vinay Bansal
0 Kudos