domb Posted October 8, 2003 Posted October 8, 2003 Hello. Trying to make a database of pdfs. I would like to assign one button (representing the first page of the pdf) to each pdf. When I click the button it would open the desired pdf in Acrobat. I managed to make it work with the "open URL" script. I made lots of small fields in which I inserted the pdfs (so that the first page would be visible). Then I assigned a button for each field performing the script "open URL" with the path file:///computer/users/myuser/folderpdf/file1.pdf ...file2.pdf ...file 3.pdf etc.. The problems I have are: 1) Is it possible to add the path to each pdf automatically ? The problem is that I had to manually enter all the paths to each pdfs It would be better if the paths would automatically be inserted in the open URL script after I inserted the picture in the field. Is it possible and if yes how to do this ? 2) How to make relative paths ? I mean by that, if I move my database to another computer and/or user with the folder "folderpdf" containing my pdfs, will the links be preserved ? Thanks in advance for your help.
falkaholic Posted October 8, 2003 Posted October 8, 2003 What you need to use is the 'Specify Field' function in OpenURL. For example, have a calculation field that puts the base path and the file name in one string and use that.
domb Posted October 8, 2003 Author Posted October 8, 2003 Thanks, gonna try this...and what about relative paths ? Will I be able to move my database around without any problems ?
domb Posted October 9, 2003 Author Posted October 9, 2003 I am not able to make it work :-( Picture 1 is a field type container containing my pdf. I assigned a button over this field to perform the Open URL script: Open URL [No dialog, "Picture 1"] but nothing happens when I click on this button. I tried to make a "calculation" field instead of a container field but then I was not able to insert my pdf anymore. ??
-Queue- Posted October 13, 2003 Posted October 13, 2003 You cannot use a container to provide the string for a URL. It is undefined, I should think. You need a text calculation that concatenates the constant and variable piecies of the URL. I assume you're tracking the name of the pdf in another field. Use that for your calculation.
domb Posted October 14, 2003 Author Posted October 14, 2003 Thanks for your answer but uh ? ....Sorry I am new to this... How do you actually do this ?
stuj1026 Posted October 14, 2003 Posted October 14, 2003 Lets back up for a minute. Why bother using a container field at all.. Each record in you DB will represent a PDF file. create a text field called "Name_of_pdf" . Create another text field called "Description of PDF" One more field called "path to PDF" this last field "path to pdf is a calculation = "c:computerusersmyusers" & Name_of_pdf & ".pdf" Now create a button using the open URL script step which will open the calculation field. This will work.. Stu
domb Posted October 15, 2003 Author Posted October 15, 2003 Excellent works very well !! Thank you very much stuj1026 !!
Recommended Posts
This topic is 7713 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now