Saving a PDF file to a new stack?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Saving a PDF file to a new stack?
Can you save a PDF file to a stack or a card? If so how do you go about this. I'm still trying to figure this one out. I can save the path, but not having luck with the file itself.
Re: Saving a PDF file to a new stack?
Hi.
Pretty sure you can store it as a custom property of the stack.
Craig Newman
Pretty sure you can store it as a custom property of the stack.
Craig Newman
Re: Saving a PDF file to a new stack?
Hi Shawn,
do this:
1. "Suck" PDF IN:
...
set the cStoredPDF of this stack to url("binfile:" & tPath_to_PDF_here)
## Don't forget to save the stack!
...
2. "Spit" out:
...
put the cStoredPDF of this stack into url("binfile:" & tNew_Path_to_PDF_here)
...
Best
Klaus
do this:
1. "Suck" PDF IN:
...
set the cStoredPDF of this stack to url("binfile:" & tPath_to_PDF_here)
## Don't forget to save the stack!
...
2. "Spit" out:
...
put the cStoredPDF of this stack into url("binfile:" & tNew_Path_to_PDF_here)
...
Best
Klaus
Re: Saving a PDF file to a new stack?
Is there a sample of saving a pdf file to a stack? I've searched here and the livecode tutorials and haven't seen anything. Thanks.
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Saving a PDF file to a new stack?
See the post immediately above yours.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Saving a PDF file to a new stack?
Richard, I read that and added it to a button to test out, guess I'm not understanding it thoughFourthWorld wrote:See the post immediately above yours.

Still searching and reading though.
Re: Saving a PDF file to a new stack?
Hi shawnblc,
Do you know how to use custom properties?
Simon
Do you know how to use custom properties?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Saving a PDF file to a new stack?
Maybe that's what I need to read up on. Going to read up on it now. I'll come back to this post. Thanks for the info.Simon wrote:Hi shawnblc,
Do you know how to use custom properties?
Simon
Re: Saving a PDF file to a new stack?
Using the property inspector use the drop down and select Custom Properties.
Then it's just like making a variable (just add any name you like maybe...cStoredPDF?), you don't have to put anything in it as Klaus's code will do that.
It's easy really, just not immediately obvious.
Simon
Edit: Oh... use the stack inspector
Then it's just like making a variable (just add any name you like maybe...cStoredPDF?), you don't have to put anything in it as Klaus's code will do that.
It's easy really, just not immediately obvious.
Simon
Edit: Oh... use the stack inspector
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Saving a PDF file to a new stack?
Maybe I'm making this more complicated than it needs to be.
I'm not drinking either.
I'm not drinking either.
Re: Saving a PDF file to a new stack?
HI Shawn,
you're almost there
...
answer file "select PDF file"
## "/Users/Shawn/Desktop" ???
## This is NOT the file the user selected but a FOLDER!
## This will not work, means the CP is still empty!
## set the cStoredPDF of this stack to url("binfile:" & "/Users/Shawn/Desktop")
## Set the Custpom Prop to the file that has just selected!
set the cStoredPDF of this stack to url("binfile:" & IT)
...
Best
Klaus
you're almost there

...
answer file "select PDF file"
## "/Users/Shawn/Desktop" ???
## This is NOT the file the user selected but a FOLDER!
## This will not work, means the CP is still empty!
## set the cStoredPDF of this stack to url("binfile:" & "/Users/Shawn/Desktop")
## Set the Custpom Prop to the file that has just selected!
set the cStoredPDF of this stack to url("binfile:" & IT)
...
Best
Klaus
Re: Saving a PDF file to a new stack?
Hmmmmmm. Haven't given up and won't.
Re: Saving a PDF file to a new stack?
This is better:
put the cStoredPDF of this stack into url("binfile:" & specialFolderPath("desktop") &"/savePDF.pdf")
I found trying to look at the Custom Property of the stack would hang the IDE.
Simon
put the cStoredPDF of this stack into url("binfile:" & specialFolderPath("desktop") &"/savePDF.pdf")
I found trying to look at the Custom Property of the stack would hang the IDE.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Saving a PDF file to a new stack?
Using 6.1.2 rc3 bld 2015 and 6.5.0 dp-2 I'm not having that issue. Using Mac OSX w/ Mavericks 10.9.Simon wrote:This is better:
I found trying to look at the Custom Property of the stack would hang the IDE.
Simon
Let me try what you suggest now. This is driving me crazy. It's insignificant, but yet it's consuming me. lol.
Re: Saving a PDF file to a new stack?
Success!shawnblc wrote:Hmmmmmm. Haven't given up and won't.

...
set the cStoredPDF of this stack to url("binfile:" & IT)
save stack "savePDF"
## Don't forget to add the correct SUFFIX -> binfile:/Users/Shawn/Desktop/savePDF.PDF
put the cStoredPDF of this stack into url("binfile:/Users/Shawn/Desktop/savePDF")
...