1 2 Previous Next 16 Replies Latest reply on Jul 19, 2017 11:23 AM by philmodjunk

    Open PDF on Computer from database

    sjrs442

      I would like to be able to click on a PDF or Email from my database and have it open on my computer. I already have the "attach file" option setup which routes to my computer files. Which I add my attachment, I also see the PDF icon and see the name of the attachment. BUT when I try to click on the attachment, nothing opens. I would like for the attachment to open the corresponding PDF on my computer.

        • 1. Re: Open PDF on Computer from database
          philmodjunk

          You'll need to explain this part in much more detail:

           

          I already have the "attach file" option setup which routes to my computer files.

           

          There is more than one way to do that and how you did that will determine how we can help you get what you want.

          • 2. Re: Open PDF on Computer from database
            sjrs442

            My apologies-- I am not the most tech savvy and am not sure how else to explain:

             

            When I attach/import a file into one of the records, I get a popup window to insert a file. I choose a file and an icon (such as a PDF icon, or an email icon, depending on what I choose) shows up.

             

            I would like to be able to click on the inserted file and open the PDF...etc.

             

            I need to be able to attach multiple PDFs/emails/etc per record and be able to click on them and view them.

            • 3. Re: Open PDF on Computer from database
              philmodjunk

              Is this a solution that you designed or one created by someone else?

               

              I am still wondering what "icons" you are clicking--presumably they are buttons that use one or another Insert method to insert a file into a container field. This does not, by itself attach a file to an email, it inserts a file or a reference to a file into a container field.

               

              If you right click such a container field you can normally get an option to export the field contents with a check box that you can click to open the exported copy of the file. This can also be built into a button scripted to do the same thing.

               

              On the other hand, image and PDF files may be viewed from within the container field if it is sized and formatted to make that practical.

              • 4. Re: Open PDF on Computer from database
                sjrs442

                I'm working on it myself.

                 

                By "icons" I mean I click on the container.

                 

                When I right click, the container, I have an option to "export field contents" which takes me to "export field to file."  I see the box that says "After saving: ()Automatically open file or ()Create email with file as attachment.  However, these options aren't particularly what I'm looking for.

                 

                I suppose that if I resize the container that could work, but some of the pdf's that I need to attach have multiple pages so it would be easier if I could just click the container and if doing so would open the original pdf-- is that possible?

                • 5. Re: Open PDF on Computer from database
                  sjrs442

                  I want to click the container and for the PDF to open from adobe. Or click the container and for the email to open on outlook.

                   

                  I'm using a PC unfortunately.

                  • 6. Re: Open PDF on Computer from database
                    philmodjunk

                    So how exactly does right clicking to export the file fail to do what you want?

                     

                    Right clicking to export and open the file should open it in your computer's default application for that type--which would likely be an Adobe application for a PDF and your Email program for an email. And a button can be set up to do this with a single click. The container field itself could be set up  for that purpose, but then you'd lose the option to insert by right clicking it.

                     

                    Depending on the storage options, field format and how you choose to insert the file, you can also set up a container field such that double clicking the container field opens the original copy in your default application for that file type, but this method also brings a number of additional complications with it.

                    1 of 1 people found this helpful
                    • 7. Re: Open PDF on Computer from database
                      sjrs442

                      when I right click, export, and name the file (and click the box to open files automatically after saving), it saves in some weird random "file" format that I cant open-- even if I specify the application with which I want to open it.it doesn't open the file in the original format (pdf in adobe, or email in outlook...etc). Is there any way to fix this? im sure it's from something I've formatted incorrectly.

                       

                      the right click option would work but the second you mentioned would be idea. what types of complications come with the second type of setup you described?

                      • 8. Re: Open PDF on Computer from database
                        philmodjunk

                        Export field contents should export the file in the same format that it had before it was inserted into the container field. Are you perhaps specifying a file name that includes the file extension?

                        • 9. Re: Open PDF on Computer from database
                          badox

                          Question, is there a way to export the file without saving it on the pc... but just viewing it, like a temporary file on the pc maybe?

                          Because if it is exported on multiple devices the file will be on multiple locations.

                          • 10. Re: Open PDF on Computer from database
                            philmodjunk

                            You can export to the local computer's temporary folder. Get ( TemporaryPath ) will return the path to local machine's temporary folder.

                            1 of 1 people found this helpful
                            • 11. Re: Open PDF on Computer from database
                              badox

                              Can I put the temporary part and extract in a script and then add it to a button?

                              The less actions the end user needs to make the more secure the DB.

                              • 12. Re: Open PDF on Computer from database
                                philmodjunk

                                Set Variable [ $Path ; Value: "file:" & Get ( TemporaryPath ) & "FileName.extension" ]

                                Export Field Contents [ table::field ; $Path ]

                                1 of 1 people found this helpful
                                • 13. Re: Open PDF on Computer from database
                                  badox

                                  This solution works for one specific file...

                                  Would it also work on a button, to open several different files in a portal?

                                  ex. several portals containing (PDF, DOC, JPG)?

                                  • 14. Re: Open PDF on Computer from database
                                    philmodjunk

                                    Yes, but you can't the put the file name into quotes if you want the original file names. In that case you extract the file name from the container field to use in that calculation.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next