4 Replies Latest reply on Oct 3, 2011 12:55 PM by GS

    Saving PDF's to a container field

    GS

      Title

      Saving PDF's to a container field

      Post

      I've been reading what is here and I'd like to determine if what I want to do is possible.

      This is for a mixed platform network.

       

      I want to save a PDF to a container field directly in another table (not a reference).  What I'm reading suggests that I can't do that directly.  I can't imagine why?

      Thanks

        • 1. Re: Saving PDF's to a container field
          philmodjunk

          You can do it in two steps.

          Save it to a location on your hard drive (can be temporary items folder).

          Then insert it from that location into a container.

          This can be done by hand or via a script.

          • 2. Re: Saving PDF's to a container field
            GS

            Thanks for answering PhilModjunk.  

            I think what you are saying is that I should save it to a Documnet folder in the file with the FMP files and then use the name to retrieve it to a container field in my table.  Naturally, I want to do this in a script.  The tool they give us doesn't seem to provide a way to save it directly to a table - is that right?

            If you have an example script I would appreciate it.

             

            Thanks

            • 3. Re: Saving PDF's to a container field
              philmodjunk

              If you save it to temporary items, you don't have to clean up a clutter of these pdf files later, so I suggest that location on your computer if you are not going to use the "store only a reference" option. If you use the "reference" option, you need to save to a location that is directly accessible by all users such as a shared directory that is mapped/mounted identically on all client machines.

              To save the PDF:

              Set Variable [ $Path ; Value:  "file:" & Get ( TemporaryPath ) & YourTable::FileNameField & ".PDF"]
              Save Records as PDF [Restore; no dialog ; "$Path" ; //specify the other options you need for your script here]
              Insert File [YourTable::YourContainerField ; "$Path"]

              • 4. Re: Saving PDF's to a container field
                GS

                Thanks for the help.  It works great.