1

I want to add a hyperlink to a pdf file into the attribute table of a vector layer. I already read the documentation about evis and the answered questions about this here. It didn't seem difficult, but I still can't create a hyperlink...can someone give me a short step by step information about this? Unfortunately I have no access to youtube...

I'm using Qgis (2.0.1) and evis is a plugin that should allow to create such hyperlinks via a event browser. I first added a column "Link" to the attribute table and put the link to the document in this column. this is the link to the documentation for evis: http://www.qgis.org/en/docs/user_manual/plugins/plugins_evis.html#figure-evis-2

Thanks a lot! G.H.

simo
  • 8,580
  • 1
  • 28
  • 56
qgs
  • 288
  • 1
  • 8
  • 16
  • 1
    Can you edit the GIS software and version that you are using to create this PDF into your Question, and at the same time correct/explain what you mean by "evis", please? If you list the precise steps that you have tried, you are likely to get a quicker Answer. – PolyGeo Mar 05 '14 at 11:47
  • Have you seen this Q and A : http://gis.stackexchange.com/questions/29464/how-to-add-links-to-pdfs-in-a-shapefile ? – simo Mar 05 '14 at 13:23

1 Answers1

4

You do not need to use evis plugin. The actions menu will allow you to open a link stored as attribute value. Please see the following section of QGIS documentation : http://www.qgis.org/en/docs/user_manual/working_with_vector/vector_properties.html#actions-menu

On the "Layer properties" > click Action.

Method A :

Then enter the type of the action ( I choose Unix), give the action a name and specifiy the command to open the file. I get something link :

/usr/bin/acroread  [% "LINK" %]

where LINK is the dynamic value you already have.

Method B :

Even more simple (available in QGIS 2.2 - not sure for v2.0.1) :

Choose type of action "open", then enter [% "LINK" %] in action field.

This method B was tested with success. See screenshot below :

QGIS screenshot

Edit : After settings actions, you will be able to open the link by selecting the Info tool and click the desired object. Clicking the "Open File" text into the pop-up window will open the file.

simo
  • 8,580
  • 1
  • 28
  • 56
  • Thank you for your answer. I tried both methods and read the documentation and the result is similar: I now have a link in my attribute table but it's not a hyperlink. – qgs Mar 06 '14 at 07:02
  • Please see my edit + screenshot in first post – simo Mar 06 '14 at 08:31
  • I'm sorry, I did everything as you explained, but I still can't klick on the link. I also don't have this little sign like you in front of "Ouvrir fichier". – qgs Mar 06 '14 at 09:11
  • Are you sure, you have selected the desired layer is selected? Be sure your action is defined as follow : http://i.imgur.com/yjFNaoi.png – simo Mar 06 '14 at 09:38
  • Yes I did this and I tried it again, but it still doesn't work. My action looks similar to yours but I have "capture" is checked (I can't deselect it). – qgs Mar 06 '14 at 09:53
  • This should not be a problem. Could you post some screenshots? – simo Mar 06 '14 at 09:57
  • http://i.stack.imgur.com/xhNdl.png – qgs Mar 06 '14 at 10:07
  • http://i.stack.imgur.com/28QlM.png – qgs Mar 06 '14 at 10:08
  • I'm not familiar with Windows UI but I'm not sure you are using the right tool to query the spatial entity. Use the Info tool. Look at the screenshot : http://i.stack.imgur.com/b6NQy.png – simo Mar 06 '14 at 10:16
  • I'm sure I used this tool. http://i.stack.imgur.com/pasYV.jpg – qgs Mar 06 '14 at 10:21
  • Can you post a screenshot of the whole application? – simo Mar 06 '14 at 10:43
  • What do you mean? The whole map window? Or the action-window? – qgs Mar 06 '14 at 10:46
  • I think I understood. It seems, your Info tool displays automatically the attributes form - and you should look for an explanation - maybe becaus you use evis or some specific settings. For my part, when I click it, I get first the pop-up you've already seen, then only clicking on "display forms", I get the form pop-up : http://i.imgur.com/ctstf4n.png. Try to query another layer to see what's happening, maybe on another project. – simo Mar 06 '14 at 11:02
  • I finally made it :) I don't know why it didn't work in the first project, but in the other one..and it's strange that the pop-up window appears only if I click on the border where two polygons come together but never when I click in the middle of a polygon...I will check my settings. But anyway, thank you very much for your help! – qgs Mar 06 '14 at 11:28