Can One Append a Record Saved as A pdf with a pdf File From a Container Field?
Is this possible?
If you want the pages from the PDF in the container field to be the first pages in the merged PDF, then yes. If you want them last, then no.
The save as PDF script step can append the pages of the PDF being generated to an existing PDF file so you can export the PDF from a container field and then append the new pages to the end of the PDF file to produce a merged PDF.
I understand. So, if I have three container fields each containing a pdf file I can't use FileMaker to merge them into one pdf file in conjunction with a record from my database? Is there any way to view the contents of a container field that contains a pdf file on a layout? Any other suggestions?
Thank you for your input. Much appreciated.
You are correct, that you can't use filemaker to merge existing PDF files.
Is there any way to view the contents of a container field that contains a pdf file on a layout?
You can use a web viewer to open and view a PDF file on your layout. You can also use Export Field Contents to open the PDF in your systems acrobat reader.
Are you able to elaborate a little more on using a web viewer? My understanding was that you can use the web viewer to display pdf content from websites, not content from a container field within the database. Each time I point a web viewer to a container field with a pdf within the database it is perpetually showing that it is loading the file and nothing is every "viewed/displayed." Any suggestions?
You can also display the contents of a PDF file.
This would not be the contents of a container field, but if you are using the "store by reference" option to store your PDF files in the first place, you can use the contents of the container field to compute a URL expression that the viewer can use to open and display the PDF.
I am using the "store by reference" option to store my PDF files. Might you be able to point me to an example/information specific to this topic on the web? I feel like looked quite a bit and while I've found lots of other neat tricks, examples of other applications, I can't seem to get this. Supposedly an example file called shipping from FileMaker 8.5 contains examples of all of the different techniques for using a web viewer. However, I can't find it. Thank you for any direction you can provide.
If you use Insert File with the store by reference option to insert the PDF into the container field, this expression extracts the file path to it from that container field:
GetValue ( containerField ; 2 )
If you use this expression in the URL box for your Web Viewer:
Let ( path = GetValue ( ContainerField ; 2 ) ; If ( not IsEmpty ( path ) ; "file:/" & Right ( path ; Length ( path ) - 9 ) )
you should see the PDF file referenced by the container displayed inside your web viewer.
Note: the first 9 characters in path should be either "FileWin:/" or "FileMac:/".
Let ( path = GetValue ( Table::gTestContainer ; 2) ; If ( not (IsEmpty ( path )) ; "fileMac:/" & Right ( path ; Length ( path ) -9 ) ) )
does get me what appears to be a vaiid path to the file however the file never loads/is displayed in the web viewer. I get the following expression at the bottom of my web viewer but the file never loads.
Might you have an idea as to what's not working?
Please try the original expression and see if that works. I don't think the webviewer understands the FileMac term which may be why my original expression replaces "filemac" or "filewin" with "File:".
THANK YOU:)) Using "file:" instead of "fileMac:/" or "file:/" worked! All of your help is very appreciated! Kristie
Retrieving data ...