[FX.php List] [OFF] Saving a PDF file to a Server

Ernest Cunningham ernest.cunningham at gmail.com
Tue Oct 7 20:25:05 MDT 2008


Hi Roger,
I am assuming here what are after is a way to make the pdf's created  
in FileMaker Pro available to a user on the Web. I am also assuming  
since you are here on this list you are using FX.php etc. So my  
solution would be as follows:

1. Use the script to save the pdf to the local machines temp directory  
(eg. Get ( TemporaryPath ) & $UID & ".pdf"), then import the pdf into  
a container field.

2. From the web you can then link to the pdf via the container field.

If this is too vague and you would like me to prepare some sample code  
etc then just give me a bell and I will rustle something up for you.


Kind regards,

Ernest Cunningham

__________________________________________________________

   FileMaker Database Developer
   Nelson,  New Zealand

   Ernest Cunningham
   Mobile: +64-21-40 66 75
__________________________________________________________

On 8/10/2008, at 3:06 PM, Roger Moffat wrote:

> Sorry for a post that's not really on the topic of FX.php, although  
> this database is web enabled for presentation of the data, but is  
> only edited through FileMaker Pro. I sent this post to the FMWebTalk  
> list some hours ago, but didn't get it back yet, nor have there been  
> any messages there in many weeks...
>
> I've got a database I've setup working pretty well. It allows users  
> to log in and make changes to the database which is hosted on FM  
> Server 9.0v3. There are some web pages which draw data from this  
> database for presentation online.
>
> I'd like for the remote users to be able to run a script after  
> they've updated records. The script does a find, sort and then  
> create a PDF file of the results, which I want people to be able to  
> download.
>
> But I can't figure out how to have the "Save Records as PDF" script  
> step save the file to a predetermined folder on a server.
>
> My configuration is 2 machine - one running the Web Publishing  
> Engine, and the web sites, the other running FM Server 9.0v3.
>
> I'd like the PDF file saved to the machine running the WPE, and  
> indeed this works if I log into the database from FM Pro on the WPE  
> machine. But if I log into the database from any other machine it  
> won't save the file.
>
> The error message says:
>
> "MGCDelegates.pdf" could not be created on this disk. Use a  
> different name, make more room on the disk, unlock it, or use a  
> different disk.
>
> I've given the folder it's writing into 777 permissions and that  
> didn't work. I've tried using the IP number/pathToFolder, I've tried  
> using afp://pathToFolder etc etc and nothing I try works.
>
> Or alternatively if I could figure out how to have it saved to a  
> folder on the FileMaker Server machine, from where I can move it  
> with a Folder Action script to the WPE machine I'm sure. But I can't  
> figure out how to do that either.
>
> I must confess to being not entirely sure what the various file:  
> file:/, filemac, filewin etc protocols are exactly about, but I've  
> tried a number of ways to get this to work, and just can't figure it  
> out.
>
> So - is what I'm trying to do possible even - to have a script that  
> is initiated from within FileMaker Pro save a PDF file to either of  
> the FileMaker Server machine or to the WPE machine? If so, how  
> exactly would I set this up?
>
> Thanks for any insights
>
> Cheers
>
> Roger
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20081008/59b1c054/attachment.html


More information about the FX.php_List mailing list