

Download the 05_Server side PDF file which is part of DemoKit16 – a collection of tools aimed at helping demonstrate and explore new features of the FileMaker 16 Platform (brought to you by the World Wide Solutions Consulting team at FileMaker, Inc.). Before implementing this I would recommend you first become familiar with the server side printing/PDF changes in FileMaker Server 16 – a great place to start is the found in the App Innovations space of the FileMaker Community. This might look complicated but I was able to implement this in a couple of hours for a client that needed to generate PDFs for a PHP/CWP solution. Now that you have the PDF in a regular container field you can exit the FileMaker script and your printReport.php can use the getContainerData method to retrieve the PDF and either display this in the browser or download it the Create PDF Report on Server receives the script result from the Save PDF script – if you’re passing the PDF as Base64 encoded data you can set a container field using the Base64Decode function.It includes a Perform Script On Server step which performs another script running under FileMaker Server which handles the Print Setup/Save Records as PDF steps and generates the PDF file and stores it in a container field (or passes the PDF back as Base64 encoded text using the Base64Encode function). the Create PDF Report on Server script is run as a CWP script (remember this script cannot create a PDF on its own).Let’s call this script Create PDF Report on Server when a user clicks this button it performs a FileMaker script using the PHP API newPerformScriptCommand method.printReport.php – which includes a Print PDF Report button With some planning you can implement a solution that works like this: lock and hide the toolbar, navigate to a blank layout etc).

#Filemaker server 16 requirements pro
If your PHP users don’t normally access the database using a FileMaker Pro client then you may need to make some changes to your OnFirstWindowOpen script to limit their access (e.g.

At this point it’s important to mention that PSoS does require the fmapp extended privilege to be enabled for your PHP/CWP users and their associated Privilege Sets.

The solution to this requires the Perform Script On Server script step (PSoS) which is CWP compatible. At this point you might be inclined to assume that there is nothing helpful in these changes for CWP/PHP developers, but there is a way to leverage the Save Records as PDF support under FileMaker Server from a PHP page. If you look at the documentation for the Save Records as PDF script step you will see that is only compatible with FileMaker Server and FileMaker WebDirect and not compatible with Custom Web Publishing (CWP), which is used by the PHP API when running FileMaker scripts. the Save Records as PDF script step now allows you to save PDFs with FileMaker Server and FileMaker WebDirect.the Print Setup script step now allows you to specify PDF options for the Print script step and Save Records As PDF script step on FileMaker Server and FileMaker WebDirect.the Print script step now allows you to create PDFs in web browsers with FileMaker WebDirect.were finally able to deliver on this with the release of the FileMaker 16 platform earlier this year, which included the following new features related to PDF and printing from FileMaker Server: engineers it was the number one feature request. You can use one of the available PHP PDF classes such as TCPDF or FPDF which require specifying x and y coordinates, fonts and text to output in certain positions on the page, or setup a “robot” FileMaker Pro client that runs in a loop looking for new jobs to process.ĭevelopers have been requesting the ability to generate PDF files server-side for many years, and from my conversations with FileMaker, Inc. If you’ve been doing Custom Web Publishing with the FileMaker PHP API and needed to generate a PDF report you haven’t had many simple options.
