8 Replies Latest reply on Aug 18, 2015 6:26 PM by keywords

    view pdf


      I have container fields with pdfs and my read-only users get a message that they do not have access to view those files.  what access is required in order to view a pdf in a container field?

        • 1. Re: view pdf

          Can they see other fields?


          Don't you use script that export container? So, "Export Records" access is need. (But predefined view only access privilege have it)

          • 2. Re: view pdf

            1. Create a calculation field in the table that has your container field.

                 Name: "Metadata_filename"

                 Calculation: GetContainerAttribute ( <container_field>;"filename" )


            2. Create a script and assign it to a button on the same layout as the container field. Replace <Container_Field> with the name of your container field.


            If (not IsEmpty(<container_field>)

                 Set Variable ($temp; Value: "file:" & Get (Temporary Path) & Metadata_filename

                 Export Field Contents [<container_field>; "$temp"; Automatically open]

            End If

            • 3. Re: view pdf

              Contrary to the two previous replies, it is not necessary to export a pdf in order to view it.

              • 4. Re: view pdf

                The solution I provided will allow the container to open the contained object file in whatever program the system allows it to be viewed in. i.e.; Acrobat PDF files will open in Acrobat while JPEG files will open in Preview, Photoshop or whatever the user has defined as their default program for viewing JPEG files.


                Please elaborate on your alternative method.

                • 5. Re: view pdf

                  Yes, I recognise that. But it is possible (since FM12, I think) to set a container field to view interactively, and thus multipage PDFs can be read directly inside FM, without having to export. All you need do is create a layout with a container of sufficient size (or make it expandable with autosizing). Prior to interactive containers you could do the same (indeed still can) using a web viewer.

                  • 6. Re: view pdf

                    I agree with you. However the PDF controls for multi-page PDF files are problematic. It is best to open the file in an external viewer in my opinion.

                    • 7. Re: view pdf

                      Your script is good, but seems a bit off topic, since the question is about access, (only) read-only users can't view.

                      • 8. Re: view pdf

                        Here is a demo file with guest account (read only) activated. To log in using this account hold down Option/Alt as you open the file. I had no problem viewing a PDF with this account in this file. If you find the same, use it to compare to your own and see if you can figure out what's different.