8 Replies Latest reply on Mar 23, 2016 6:41 AM by tkemmere

    Generating a PDF report with multiple sections

    tkemmere

      Dear all,

       

      Ultimately I would like my FileMaker Pro database to generate a report with several sections:

      • A cover page;
      • A table of contents;
      • An introduction;
      • A "lables"-section with a number of pictures with their description, (for example 3 pictures wide, and 3 pictures high, a couple of pages);
      • A section with a subsummary report, requires also multiple pages;
      • A conclusion.

      If FileMaker would be able to export such a document to MS Word, I could have it generate a couple of sections and paste them together in Word. (still not perfect, but ok). But FM doesn't export to Word. So my second best odds are PDF. But since PDF is uneditable, the doc will have to be all ready upon export. I will work with a window called "Settings", in which the user will fill free texts like 'Introduction' and "Conclusion'.

       

      The table of contents we can do without, but the other five sections are more or less essential. Is it somehow possible to add multiple bodies / parts / sections which each have a different behaviour, to a Layout? Or to merge several layouts into a single export PDF doc?

       

      I'm afraid I'm asking too much. Am I? How would you approach this?

       

      Thanks in advance for your help,

      Kind regards, Thomas.

        • 1. Re: Generating a PDF report with multiple sections
          Mike_Mitchell

          tkemmere wrote:

           

          The table of contents we can do without, but the other five sections are more or less essential. Is it somehow possible to add multiple bodies / parts / sections which each have a different behaviour, to a Layout? Or to merge several layouts into a single export PDF doc?

           

           

          Absolutely. Just build the different layouts, and then use the "Append" feature when you export the PDF:

           

          Screen Shot 2016-03-18 at 10.13.07 AM.png

           

          HTH

           

          Mike

          • 2. Re: Generating a PDF report with multiple sections
            skywillmott

            As you are exporting PDF's from FileMaker Pro, you can script it so that each section of the PDF is 'appended' to a previously exported PDF section... The 'Save Records as PDF' script step has an option to 'Append to existing PDF'. Note that 'append to PDF' does not work in FileMaker Go unfortunately....

             

            It's also a good idea to make best use you can of layout parts such as sub-summaries, trailing grand summaries, etc... Also using the 'sliding up when printed' options that are available for layout objects.

             

            Hope this gives you something to get started with....

            • 3. Re: Generating a PDF report with multiple sections
              User26869

              Hi Thomas

               

              You probably can do it if you create one layout for each part, and then use the "Append to existing PDF" option to the script step Save as PDF.

              In more detail: Go to layout 1: find appropriate records and save as PDF, then go to layout 2, find appropriate records and append to the existing PDF, etc, etc.

               

              Hope that helps

               

              Chloe

              • 4. Re: Generating a PDF report with multiple sections
                jrenfrew

                This is also the kind of thing the building with ScriptMaster can iText can do easily ( although I admit not trivial) in that you will need to build the contents page AFTER you have created all the rest to know page numbers and that is also a big pile of workarounds in FMP... and actually means you can't properly use the append method.

                 

                And also the resultant PDf will be much bigger than it needs to be due to the way FM will be creating it. And internally not terrible high quality.

                 

                john

                • 5. Re: Generating a PDF report with multiple sections
                  tkemmere

                  Dear Mike, Skywilllmott, Chloe and Jrenfrew,

                  Thanks! This is good news. I'll dive into it right now.

                  That was very helpful, thank you.

                  Have a nice weekend,

                  Thomas.

                  • 6. Re: Generating a PDF report with multiple sections
                    monkeybreadsoftware

                    you can use MBS Plugin with DynaPDF extension to work with PDF. Even on server.

                     

                    While we can't access the layouts, we can still import exiting PDF as background and write text on top.

                    Or replace text, add tables, add graphics, write formatted text.

                     

                    And of course merge PDFs.

                    We can add page links from one part of PDF to other pages. Or weblink to URLs of course.

                    And if you are interested to write records to PDF with dynamic height (Depending on content height inside record), please check the Catalog example database.

                     

                    see

                    http://www.monkeybreadsoftware.de/filemaker/

                    • 7. Re: Generating a PDF report with multiple sections
                      rgordon

                      I would assume that you want to have numbered pages for your report.  If you use the append method your pages won't automatically number correctly because you are using multiple PDFs and each PDF needs to know when to start numbering.  You will need to use a script to preview each section and then go to the last page of the preview to get the page number.  This will give you the number of pages per section.  With this info you can write a calc to determine how to number the pages. Btw, this method isn't 100% foolproof. There can be very subtle differences between PDF, preview, and print that can cause the numbering to be off.

                      • 8. Re: Generating a PDF report with multiple sections
                        tkemmere

                        Thanks monkeybreadsoftware and rgordon,

                        Also for your input! This forum has been really helpful for me.

                        Regards, Thomas.