2 Replies Latest reply on Jun 17, 2013 6:06 PM by James_L

    Adding PDF from Container Field to Existing PDF

    James_L

      Title

      Adding PDF from Container Field to Existing PDF

      Post

           I'm working on a script that spawns from a layout of Table 1: it basically creates a .pdf that presents one record.

           What I need the script to do now is to go back through related records (if any) in Table 2, adding .pdf's from a container field "Attachments" to the .pdf.  I've read the manual, but it doesn't address specifically how to access and manipulate those container fields in this context. 

           Any help is appreciated. 

        • 1. Re: Adding PDF from Container Field to Existing PDF
          philmodjunk

               That's because it can't be done this way in FileMaker.

               You can do the opposite of what you describe so you may be able to get something figured out.

               You can export a single PDF file from the container field and then use Save As PDF to generate a PDF and append it to the exported PDF.

          • 2. Re: Adding PDF from Container Field to Existing PDF
            James_L

                 No good,  so far....  I can save the entire record (including the container) as a pdf, but I can't save an exported container that was already a pdf as a pdf.   Kind of inefficient:  exporting / appending pdfs-in-containers into existing pdfs would be a nice feature to have in the future. 

                 I'm still looking for a good permanent solution, if you can think of one.

                 In case anybody else is in the same bind, I did create a bit of a jury-rigged solution that's a variation on Phil's suggestion:

                 I created a layout in which I displayed the contained object on a full legal sized page.  (All my attachments, fortunately, are legal sized, else I'd need a much more complicated solution.) 

                 In my script, I use that layout, exporting it as a .pdf with the "append" box checked, to the existing pdf at  $$filepath.  Needs tweaking, but at least gets the object in the .pdf report.

                 Not pretty, but it's doing the job, sort of.  If anybody can think of a better work-around, I'd love to have it.