sivarajankumar / alivepdf

Automatically exported from code.google.com/p/alivepdf
0 stars 0 forks source link

Understanding the syntax for addImage #173

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am creating a PDF using the alivePDF.
I can add text and lines fine.
I need to be able to add a logo, which is a png.

I am not understanding the syntex for the addImage, particularly with the 
DisplayObject.

myPDF.addImage("assets/logo.png", 0, 0, 0, 0, ImageFormat.PNG)

I've tried adding the full URL. 

Thanks for any help.

Original issue reported on code.google.com by mortens...@gmail.com on 13 Nov 2009 at 5:18

GoogleCodeExporter commented 8 years ago
Hi there,

addImage will work only for DisplayObject in the current application, not for 
remote 
images.

If you want to include remote images, load first the image through a Loader 
object 
with Loader.dataFormat ste to URLLoaderDataFormat.BINARY. Then, pass the binary 
stream to the addImageStream method.

let me know!

best,

Thibault

Original comment by thibault.imbert on 25 Jan 2010 at 8:00