Hi everyone, I'm still fairly new to LiveCode so I'm struggling to know how to explain my problem correctly, but here it goes...
I'm building an Invoice Creator program for Windows, you input the data for your invoice into fields on a card and then click a button which creates a PDF of the invoice. That all works fine.
What I want to provide is an option for the end user to upload an image which can replace the default image that is on the final invoice PDF. Basically giving them the option to have there own logo on their invoices.
Is this even possible? I'm not entirely sure what I would search for to get some help, hence why I've resorted to posting in here.
Either an actual solution or a nudge in the right direction would be of great help!
Uploading an image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 447
- Joined: Mon Jan 23, 2012 12:46 pm
Re: Uploading an image
Try this out:
Create a new stack with a button and an image area.
In the button put this script:
Hope this helps.
--Sefro
Create a new stack with a button and an image area.
In the button put this script:
Code: Select all
on mouseUp
answer file "select an image"
put it into tPicPath
set the filename of img 1 to tPicPath
end mouseUp
Hope this helps.
--Sefro
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: Uploading an image
Hi Garry - you wrote "upload an image" - do you want to upload it to a server or use in your app? Both are very doable and Sefro showed one way to do the latter, uploading to the server takes more work...
Kind regards
Dave
Kind regards
Dave
"...this is not the code you are looking for..."
-
- Posts: 3
- Joined: Sun Mar 29, 2015 8:26 pm
Re: Uploading an image
Thanks Sefro,
This has worked perfectly!
Thanks to Dave too, not quite ready to be using servers just yet though!
This has worked perfectly!
Thanks to Dave too, not quite ready to be using servers just yet though!