3 Replies Latest reply on May 11, 2012 4:54 PM by philmodjunk

    Trying to Understand PDFs and Container Fields in FM 12

    cjl108

      Title

      Trying to Understand PDFs and Container Fields in FM 12

      Post

      I have been working on a library project where references to pdfs are stored in a container. The means by which they get in there are many, yet have different outcomes. In an interest to understand them, I have tested the variations and am curious as to pros and cons to each method.

      I am on a Mac using FM 12, so I don't have to worry about PC issues, and all pdfs are stored via reference. Any input or ideas would be welcome.

      I have listed the various ways in which I can get a pdf into a container field by outcome. 
      Where it says "Text:" it referes to the information that is in the container field, obtained by a calculation field pointing to the container. 

      Outcome #1

      container: pdf icon and name

      Text:

      file:Test_PDF.pdf

      filemac:/Archives/Books/PDFs/Test_PDF.pdf

      Methods for #1:

      1: Right Click: insert File

      2: Function: Insert File -Dialogue Options:Display set to "Icon with filenames"

       

      Outcome #2

      container: pdf shown

      Text:

      size:381,620

      image:Test_PDF.pdf

      imagemac:/Archives/Books/PDFs/Test_PDF.pdf

      Methods for #2:

      1: Right Click: insert PDF

      2: Right Click: insert Picture

      3: Function: Insert File -Dialogue Options:Display set to "Content of File"

      4: Function: Insert PDF

      5: External applescript: setfield "containerPDF" toanItem -- this is from a folder action workflow in automater

       

      Outcome #3

      container: pdf shown

      container2: thumbnail of pdf

      field1: "Test_PDF.pdf"

      field2: "file://Archives/Books/PDFs/Test_PDF.pdf"

      Text of container: "image:/Archives/Books/PDFs/Test_PDF.pdf"

      Text of container2: "untitled.jpg"

      Methods for #3:

      1: Function: Import Records --data source: Folder

       

      Overview and questions

      when it is an icon, you can launch the pdf in Acrobat by the Function: Go to Field - with select/perform checked. I cannot figure out how to open the pdf externally when the pdf is shown in the container. Any ideas?

      I like how when importing pdfs as records, it makes a thumbnail, is there a way to do this with pdfs brought in by other means?

      My main interest is consistency. I can get filenames and paths to be consistent regardless of the input method, but the size and the thumbnail of the pdf seem to be unique to certain methods. How have people dealt with this?

      I have thought about making multiple containers for each record so if imported via Function:"Import Records" I could then use the function:"insert file" using the path so I could then get the size and icon (to open externally) and then if imported via Function:"Insert File", I could then import that one record to get the thumbnail. This all seems very cumbersome and I am worried it may slow down the DB and workflow process. Any ideas or comments?

       

      Sorry if this was a bit long winded, but perhaps it will help others as well!

      thanks

       

        • 1. Re: Trying to Understand PDFs and Container Fields in FM 12
          philmodjunk

          Export Field Contents will open your files from all of the above examples and also when the file itself instead of a reference is inserted into the container field. This is something you can script--but note that any changes made to the file--such as adding comments to a PDF--will not be retained when you close the file unless you or a script reinserts the file from whatever location contains the exported file.

          You can export to the temporary items folder or use export field contents with no field specified to delete the exported file so that you don't litter your hard drive with multiple copies of opened files.

          For by reference files inserted via Insert File, you can also open the file by double clicking it.

          • 2. Re: Trying to Understand PDFs and Container Fields in FM 12
            cjl108

            I would rather not have to go the Export Field Contents option, as comments will very likely need to be inserted. I may have to make 2 containers, one for the pdf to show in FM and one for the icon so I can open the reference.

            As for double clicking, on FM 12.0v1 - Mac OSX 10.6.8 I was unable to get that to work.

            Any idea how to get a thumbnail of the pdf if I don't import records?

            • 3. Re: Trying to Understand PDFs and Container Fields in FM 12
              philmodjunk

              Dual containers sound like a reasonable workaround. You may even be able to define the second container as a calcualtion field that returns Container as it's field type with an expression that extracts the Filepath from the first. If that works, you don't have to do any fancy scripting to insert the file a second time.

              As for double clicking, on FM 12.0v1 - Mac OSX 10.6.8 I was unable to get that to work.

              It works on my windows systems as long as two criteria are met:

              1. Inserted by Insert File, not Insert Picture
              2. Store a Reference was selected.