Jump to content

Storing and Opening PDF in Container Field

Recommended Posts

I am starting to create a new solution to catalog all of our companies Safety Data Sheets and would like to make the PDFs accessible through FMP14. At the moment I have created a container field that is Interactive and has temporary storage. If I choose "Insert PDF" FMP thinks about it for a moment then opens the pdf I have selected, if I close the pdf I can see that something is in the container but there is no content show. If I move to a record where this has been done the PDF automatically opens, albeit slowly, but I am unable to view the PDF contents without exporting it. If I insert the pdf as a file I see a file icon but am not able to read the file in any way except by exporting it. 

From reading about PDFs and container fields, it sounds like I should at least be able to see a thumbnail of the pdf but I am not able to read any of the PDFs content. Has anyone else been having that problem? A sample file is attached. 

Ideally the pdf would be viewable in the record or by clicking a single button and then could be saved to the user's computer for printing purposes. 


Share this post

Link to post
Share on other sites

"At the moment I have created a container field that is Interactive and has temporary storage."

Not sure what you mean here. Containers can be embedded, stored only as a reference, stored externally secured and stored externally open. Which are you using?

As for how you wish the container to behave, see: http://www.filemaker.com/help/14/fmp/en/html/edit_layout.10.45.html#1136311

perhaps more specifically, this:


Honestly, I script both Import and Export, because I've not had clients that wish to interact with PDFs within FM. I use Export Field Contents with Auto open.


Edited by bcooney

Share this post

Link to post
Share on other sites

Thank you for your response bcooney. 

With 'interactive and temporary' I was referring to the thumbnail generation that is located under Manage Containers and then the individual container which is set to optimize for Interactive content. 

My container field is stored externally open, but I am open to whatever storage options would make this work. 


Both of links you sent make me think that I should be at least able to see a thumbnail of the PDF content in my container. I am unable to see any of the PDF content. Is this normal or should you see a preview of the pdf?

Is there any way to view a PDF without exporting it from FMP?

Share this post

Link to post
Share on other sites

Yes, you can view a PDF in a container if it is inserted using Insert>PDF and Optimized for Interactive Content.

Share this post

Link to post
Share on other sites

Any idea why a PDF would not only not be viewable if inserted this way but the full pdf opens in Reader whenever you click into that record (and do not click on the field)? When it opens by itself it also bogs down my whole database. 

Share this post

Link to post
Share on other sites

Andsersonk06: did you ever find out any answers? I have the exact same thing happening to me...

Were you running FMP Advanced as I am?  When I open my FMP db in Filemaker Pro (not Advanced), the containers work exactly how they are supposed to work (the .PDFs are interactive and can be viewed within the container) When the db is opened in FMP Advanced, the .pdf appears as a white block within the container, are not interactive and, very weirdly, open full screen when I switch between layout mode and browse mode...

Anyone with potential solutions to this issue?  Thanks!


Share this post

Link to post
Share on other sites

Hi Ryan,

No, I've not yet gotten this to work. I'm running strictly on Pro so i may be having a different problem than you. I think my problem is stemming from the fact that my FMP Server is being accessed through a Citrix network. 

But please do keep me posted if you figure anything out.

Good luck

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Asu
      Hello -- I would like to open pdf files that are stored in a secure external manner. 
      Only the first page of multipage files show in a FM container window (if I';m not mistaken) so I am wondering about using Preview (Mac, of course). I can retrieve the file path to the secure file by processing the text output of the container file, and then use it as a variable filename in a Send Event script step,  but Preview cannot open it.
      Any suggestions?
    • By NBS5000
      Hi all,
      I'm using trying to add an image to a PDF in Scribe, the process works well, however the image I'm using is a PNG with transparency.
      The image is stored in FM and the transparency is retained, if I export the field contents, it is retained too.
      When the image is added to the PDF, it loses the transparency, and the are replaced with white, which means I can't see what's under it.
      Has anyone else had this issue? Is it resolved/resolvable, or is this something where I need to find an alternative solution?
    • By Dean Ingram
      I am trying to get a page count from a PDF file stored in a container field. ScribeDocLoad is successful. Next I'm attempting to use ScribeDocReadValue to get the PDFPageCount. The variable $LastPage is set to ScribeDocReadValue( "PDFPageCount" )
      This parameter, or any other of the metadata values listed in the documentation, results in an error like "Reading values is not supported for the file PDFPageCount"
      The documentation reads like this:
        Am I fundamentally misunderstanding what this is supposed to do? The PDF file has no formal "fields." Its just a scanned PDF. 
    • By Bob Minteer
      Howdy from Texas!
      I am trying to change a little bit of Groovy that stamps a given phrase at a specified location on an existing PDF.
      The original code operates on files however I want to simply specify container fields as input and output.   
      I did successfully change the input (src) to come FROM a container field.   I can't seem to figure out how to return the resulting object to a container (dest) directly.   
      I am passing the container parameters as:  "myTable::inputContainer" and "myTable::outputContainer".
      Can someone please point me in the right direction here?
      Thanks in advance!
      Bob Minteer
      This is the code:
      RegisterGroovy( "stampPdf( src ; dest ; xPosition ; yPosition ; phrase )" ; "import com.itextpdf.text.Rectangle;¶ import com.itextpdf.text.Element;¶ import com.itextpdf.text.pdf.PdfReader;¶ import com.itextpdf.text.pdf.PdfStamper;¶ import com.itextpdf.text.pdf.ColumnText;¶ import com.itextpdf.text.pdf.PdfContentByte;¶ import com.itextpdf.text.Phrase;¶ import com.itextpdf.canvas.*;¶ import com.itextpdf.text.pdf.PdfWriter;¶ ¶ InputStream container¶ try{¶ container = fmpro.getContainerStream(src)¶ }catch(e){¶ throw new Exception('Could not get data from container (make sure container field name is passed as text)')¶ }¶ ¶ // test if container field is empty¶ if( container == null ) {¶ throw new Exception('Container field is empty')¶ }¶ ¶ reader = new PdfReader(container)¶ ¶ float xP = Float.parseFloat(xPosition)¶ float yP = Float.parseFloat(yPosition)¶ ¶ stamper = new PdfStamper(reader, new FileOutputStream(dest), PdfWriter.VERSION_1_7)¶ ¶ PdfContentByte canvas = stamper.getOverContent(1);¶ ¶ ColumnText.showTextAligned(canvas, Element.ALIGN_LEFT, new Phrase(phrase),xP,yP,0)¶ ¶ return stamper¶" )  
    • By Rabernethy
      I have inherited a database in Filemaker 12 on Windows, but I am completely new to databases. I have a script which generates and saves a pdf for each person using fields from their record. This works well.
      I then have a second script which is meant to email each of these pdfs to the corresponding person. I have included screen shots of the script and the "send mail" options.
      When I tested it by putting only my own email address in the To: box, it sent me hundreds of emails each with a different name in the text, and the correct corresponding pdf attached, as expected.
      Very embarrassingly, when I tried to send the pdfs out, it sent an email to each person with the right name in the body of the text, but all with the same email attachment (for the first person in the list)! What did I do wrong?
      Thank you in advance for any advice you can offer.


Important Information

By using this site, you agree to our Terms of Use.