6 Replies Latest reply on May 14, 2012 4:59 PM by philmodjunk

    Cannot write a PDF file



      Cannot write a PDF file


      On application exit, I have a script that causes FM to dump a PDF file containing table stats and other useful info to keep track of what's going on in case of a problem and for me to generally keep an eye on the healt of the data.

      When I use FM 11 Pro, all works fine and when I test for an eror I get error = 0 and a successful .pdf file write. When I create a runtime and test it (same machine, same user privileges), I get an error = 1 return with no .pdf file being written.

      I am using the "Save Records As PDF" script step. Any ideas?

      Image attached if this helps. The folder "Exports" was present when I ran the script.




        • 1. Re: Cannot write a PDF file

          Save as PDF does not work as a runtime. Filemaker Inc. did not acquire a license from Adobe that allowed them to include this feature in run time solutions.

          To generate a PDF from a run time, you have to install PDF wrting software that acts as a Printer or in Mac systems, you can specify the PDF option from the regular print dialog.

          You might consider exporting data to a tab, merge or csv format instead of PDF.

          • 2. Re: Cannot write a PDF file

            So you are saying that if a client wants to email a nicely formatted report that can be emailed, printed, etc. I have do something like a .csv dump and write some formatting code to create a .pdf or html file from that?

            Or, pdf writing software? Can you please give me a pointer? 

            • 3. Re: Cannot write a PDF file

              My suggestion of using an export in another format only applies to your "Dump" of data when the application quits. That's something you can use with an Import records step to import and display the exported data in a user friendly format and not have to use a PDF at all. Keep in mind the qualifiers in my last post: "you might consider...". It's by no means a subsitute for PDF in every place where you might use it.

              With PDF writing software, there are a number of applications that function like a printer, but print to PDF instead of paper. Adobe Acrobat is the original program for that but alternatives from other sources are available. You can search the internet and find quite a few offered.

              With them, you select Adobe Acrobat or one of the other PDF utilities instead of your normal printer and then "print" to generate the PDF.

              And trying to set up a script where you attach such a PDF without the user finding and attaching it.... Not sure that this can be done with just Filemaker and no plug ins...

              • 4. Re: Cannot write a PDF file

                Ok, let me try this from a different approach. It is not just the "stat" file that is produced. My clients need to provide online (email attachable) and print'able billings, invoices, etc. Ok, I screwed up and did not RTFM on the .pdf production, I see it now, but I cannot believe there is not a simple solution to this problem. How do FM developers handle this very common requirement on non-Apple systems?

                For the end-of-application data dump, I do not mind doing a dump in .cvs format and use Exel to examine the data. However, as I mentioned above the problem is for my customers using the runtime to produce good looking docs for their customers. 

                I will take a look online to see if I can find solutions, I would guess that dozens (hundreds?) of FM runtime producers reading this forum have an easy answer to my Q - this has to be a commong problem - no?


                Thanks again,


                • 5. Re: Cannot write a PDF file

                  I got it to work at home via the print script step, printer options and distiller, but man it's a lot of stuff for someone who just wants to print a layout....sigh.

                  • 6. Re: Cannot write a PDF file

                    I's look into including an installer for a free pdf writing utility, but the automation requirements could be a real pain here...