Oct 27, 2012; 19:32
Steve St-Laurent
[FMPro] Displaying Filemaker-generated PDF from CWP
A while back I raised the question of serving up to a Web browser a PDF generated from Filemaker by a script triggered by custom Web publishing. Since I finally cracked this, I thought I would share the solution.
First, because Filemaker Server will not write PDF, you have to use a copy of Filemaker Pro running on the server. No, there's no conflict with the server. This robot FMP uses a script trigger to run a script every minute. The script writes a PDF to the Web folder. Took a while to figure it out but here's the path to the Web folder [the system Web folder, not the user one]"
"filemac:/startupdrivename/Library/Webserver/Documents/anyneeded/subdirectories/"
In the PHP response page to the PDF request, include a meta refresh tag with a name to match what you know will be written. You can include PHP-drawn values in forming this URL. Be sure to set the time interval slightly longer than the script trigger's interval to ensure that the PDF file will be in place when the redirect happens. Example:
<meta http-equiv="refresh" content="70;url=http://yourserver.com/pathto/yourPDFfolder/MMP-<?php echo $edit_record_row->getField('NameLast'); ?>-PDFrequested.pdf">
And, of course, explain to users why the delay, that it's needed for processing.
Hope this is helpful to others. It rocks a current project for me.
-------------
Steve St-Laurent | <steve@holecomm.ca>
Hole-in-the-Wall Communications | Vancouver BC
bodybus.ca | tools to help manage your health
#############################################################
This message is sent to you because you are subscribed to
the mailing list FMPro
FMPro@lists.lassosoft.com
To unsubscribe, E-mail to: <FMPro-unsubscribe@lists.lassosoft.com>
Send administrative queries to <FMPro-request@lists.lassosoft.com>