I've installed the PDF library on a LiveCode Server.
Works very well. I worked with the "email with attachement" example you provided.
I have one small problem.
Files are created in /tmp/ directory.
I tried to modify the tTempFile, but no effect.
Is it possible to change the path ? So the library can create the PDF file within the current directory ?
Library for Server : problem with file path
-
- Site Admin
- Posts: 110
- Joined: Sun Jul 18, 2010 5:21 pm
- Location: Aalst, Belgium
- Contact:
Re: Library for Server : problem with file path
Hi,
I guess you're referring to the following snippet from demo 19.
The tricky part is that the PDF output file needs to be stored in a directory the Apache HTTP Daemon can write to and the SendMail application can read from.
You can always try tweaking the above to the following variant:
And then the code might be able to save the document in the same directory as your LiveCode Server script. However, a further complication is that there may be a small window in time where the output.pdf file is overwritten by the next request if two people hit the submit button in their browser at the same time.
What exactly are you trying to accomplish? Are you looking to save the PDF files for future reference? You could always send them to yourself in CC or BCC.
Jan Schenkel.
I guess you're referring to the following snippet from demo 19.
Code: Select all
## close the PDF document and save it to a temporary file
local tTempFile
put the tempName & ".pdf" into tTempFile
qrtPDF_CloseDocument tDocRef
qrtPDF_SaveDocument tDocRef, tTempFile
You can always try tweaking the above to the following variant:
Code: Select all
## close the PDF document and save it to a temporary file
local tTempFile
put "./output.pdf" into tTempFile
qrtPDF_CloseDocument tDocRef
qrtPDF_SaveDocument tDocRef, tTempFile
What exactly are you trying to accomplish? Are you looking to save the PDF files for future reference? You could always send them to yourself in CC or BCC.
Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com
http://www.quartam.com
Re: Library for Server : problem with file path
I was afraid to hear that.JanSchenkel wrote: The tricky part is that the PDF output file needs to be stored in a directory the Apache HTTP Daemon can write to and the SendMail application can read from..
![Smile :)](./images/smilies/icon_e_smile.gif)
So i guess I need to play with Apache in order to set the proper rights... My idea was to put the PDF files within the same directory that contains my LC scripts, in order to ease future files manipulations (sending, deleting etc.) with LC scripts.
[so excited about Kickstarter... almost to the 350 000 mark
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Library for Server : problem with file path
OK solved. Thank you for the hint !
I just made a 777 permissions on a new directory within the directory that contains the LC script that creates the PDF library.
It's working fine now.
So now, I can continue to explore your -looking good- PDF library.
I just made a 777 permissions on a new directory within the directory that contains the LC script that creates the PDF library.
It's working fine now.
So now, I can continue to explore your -looking good- PDF library.
-
- Site Admin
- Posts: 110
- Joined: Sun Jul 18, 2010 5:21 pm
- Location: Aalst, Belgium
- Contact:
Re: Library for Server : problem with file path
Re Kickstarter:
Seems I was a bit of a fore-runner when I decided to make a number of libraries available as LGPL/AGPL![Wink ;-)](./images/smilies/icon_e_wink.gif)
But you're absolutely right, it's been an exciting campaign; and just when I thought it wasn't going to work, the pledges surged and now we're on to some fantastic stretch goals!
Anyway, have fun with the library! And if you have more questions, make sure to post them here...
Jan Schenkel.
Seems I was a bit of a fore-runner when I decided to make a number of libraries available as LGPL/AGPL
![Wink ;-)](./images/smilies/icon_e_wink.gif)
But you're absolutely right, it's been an exciting campaign; and just when I thought it wasn't going to work, the pledges surged and now we're on to some fantastic stretch goals!
Anyway, have fun with the library! And if you have more questions, make sure to post them here...
Jan Schenkel.
Quartam Developer Tools for LiveCode
http://www.quartam.com
http://www.quartam.com