Nov 16, 2012; 01:57
Jolle Carlestam
Emailing pdf fails honor inserted pdf
I have this strange thing with attaching a pdf to an email if the pdf is created in memory.
Here's code to reproduce it:
// Create the pdf_doc object
local(pdf = pdf_doc( -size = 'A4', -nocompress))
// Prepare a pdf template to insert
local(pdf_template = pdf_read('/test.pdf'))
// Insert the background pdf page.
#pdf -> insertpage(#pdf_template, 1)
// Place text
local(text = pdf_text( 'This text will show.'))
#pdf -> add( #text,
-height = 70,
-width = 200,
-left = 100,
-top = 100,
-leading = 30)
// Close the pdf_doc
#pdf -> close
email_send(-to = 'jolle@amtac.net',
-from = 'xxx@yyy',
-subject = 'Testing pdf',
-host = $zxy,
-port = $vcx,
-username = $wert,
-password = $trew,
-body = 'Some relevant body text',
-attachments = array('demo2.pdf' = bytes(#pdf)))
pdf_serve(-content = #pdf, -file = 'demo1.pdf', -inline)
The served pdf will contain the full pdf including the inserted file. The emailed one will only contain the text "This text will show."
This confuses me...
HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Nov 16, 2012; 02:00
Jolle Carlestam
Re: Emailing pdf fails honor inserted pdf