Apr 28, 2014; 11:31
Duane Hannan
Image from File to PDF
Greetings, I have art competition contestants fill out an entry form and upload a photo of their work to a folder on the file server. I have lasso adjust the file name on the fly (to include the title of the work, the year, a random number, and .jpg). Upload works fine. But when I want to display the work on a PDF page (I generate .pdfs for judges and award certificates), if an entry doesn=92t have a photo file (which is not required), lasso shoots an error: PDF_Doc:(Add) Error adding Image1. The code worked fine last year (running Lasso 7.x). In the meantime I=92ve upgraded to Lasso 8.x, and again, if the entry has an associated photo, the .pdf is correctly drawn.
The code I use to call the photo–I do it in two steps:
[var:'Image1'=(field:'Title') + ($VAYear) + (field:'EntryID') + '.jpg']
[var:'Image2'=(PDF_Image: -file='///library/Webserver/Documents/DefaultSite/MSHSLVisualArtsCompetition/VACompEntryPhotos/' + $Image1, -height=150.0, -width=150.0)]
And to display the image on the .pdf:
[$Scoring Forms->(Add:$Image2, -Left=36.0, -Top=312.0)]
I=92ve tried using a simple conditional for the line:
[if:($Image2) == '']
[var:'Image2'='No Photo']
[$Scoring Forms->(Add:$Image2, -Left=36.0, -Top=312.0)]
[else]
[$Scoring Forms->(Add:$Image2, -Left=36.0, -Top=312.0)]
[/if]
but it hasn=92t worked.
I=92d appreciate any help.
Duane Hannan
WWG Schools
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Apr 28, 2014; 11:44
Tim Taplin
Re: Image from File to PDF
Apr 28, 2014; 11:48
Steve Piercy - Web Site Builder
Re: Image from File to PDF
Apr 28, 2014; 15:32
Duane Hannan
Re: Image from File to PDF