4 Replies Latest reply on Jan 27, 2017 8:09 AM by petery009

    Generate then Append pdf process is Slow ?


      Hi all


      I have a file that has only one table and 1500 fields ( yes, it's a old file from older filemaker version, now upgrade to 13)


      - There's the process

      - loop through the records , if "type" is A , go to report A layout, 

      - if "type" is B, go to report B layout , there are about 10 types of reports

      - save as pdf current record, append to one same pdf file.


      for 600 records, it took about 1 and half hour only go through 300 records.


      so the process is really slow.


      any idea to speed up this is helpful.





        • 1. Re: Generate then Append pdf process is Slow ?

          where is the file originated from? (previous versions)


          if the 1500 fields are containing a lot of complex calculations going over multiple relationships it can be very slow

          - there might be some old file references as well to be reviewed ..


          hard to guess without more info ..

          • 2. Re: Generate then Append pdf process is Slow ?

            And describe how these report layouts differ from each other, maybe you don't need different layouts.

            • 3. Re: Generate then Append pdf process is Slow ?

              The problem is likely the native Append to PDF functionality in FileMaker.    Unless something has changed in the last couple of years,  using the Append to PDF functionality in FileMaker is VERY slow when appending a lot of pages.  


              I ran into this several years ago when I started getting complaints from clients not long after I started to use the native Append to PDF functionality.    I ran a bunch of tests and found that it gets exponentially slower the more pages you try to append.   It's almost like FileMaker is rebuilding the entire pdf over and over again and including the page you are appending instead of simply appending the page to the end of the PDF. 


              I ended up not using the native Append to PDF functionality.   I hired a Java programmer to right me a function that utilizes the iText PDF java library to merge/combine pdfs together and I used 360Works ScriptMaster plug-in to create a custom plug-in    It's very fast, especially when compared to the native FileMaker functionality. 


              So,  I create a temp directory, save PDFs to that directory and then use the plug-in to merge/combine all the PDFs in that directory.



              If you are going to be appending a lot of PDFs together, as in your example of 600,  you'll want to explore external options.  The native option is good for a handful of pdfs, but for large quantities of pdfs it's just not good from a performance standpoint.

              2 of 2 people found this helpful
              • 4. Re: Generate then Append pdf process is Slow ?

                Thank you all for reply.


                There maybe one thing cause this i found out (realized) later.

                I created a new field in my copy , a global field that hold part of file name client want to put, and give it to client, and he just import the script to another copy, and it still working but i guess because the new field give error and might slow the process. later test just on my copy seems fine.


                but by all means. later if the records gets large, this may be an issue.


                Thanks again.