mesaglam / alivepdf

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

pdf.addImage() problem #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. i need to add images to pdf book, the images are loaded at run time, and
i put pdf.addImage(imageLoaded, bla bla bla bla), but in all pages the
images are the same. if I put pdf.addText the text changes fine :s
2. for testing, i made a function to save the image loaded to my disk, and
saves the right image, at the right time...

What version of the product are you using? On what operating system?
0.14 winXp 2k

Please provide any additional information below.
Urgent, my dead line has past over at two days :s

i just need to know how to clear data from the last pdf.addImage

help!!

Original issue reported on code.google.com by info.rui...@gmail.com on 6 Feb 2008 at 3:11

GoogleCodeExporter commented 9 years ago
i noted now that if i use the same object twice, the function addimage only 
returns
the first data of that object..

i think this is a problem.. is there a simple fix?

Original comment by info.rui...@gmail.com on 6 Feb 2008 at 5:00

GoogleCodeExporter commented 9 years ago
i really need this because, i have a canvas, and all the content of that canvas 
is
loaded by a array of objects with positions, dimensions z-index bla bla bla 
bla, and
then i need to save the content of that canvas on each page of the pdf, but if 
the
addImage function dont acept new data for the same object how do i would do 
that?

help help help please

Original comment by info.rui...@gmail.com on 6 Feb 2008 at 5:29

GoogleCodeExporter commented 9 years ago
hehe i solved!

i just change the image:dicionary to image:arraycollection

and in the this.images[pDisplayObject] = info;
i put this.images.addItem(info);

and voila thats it!

i guess i'm not fired xD

Original comment by info.rui...@gmail.com on 6 Feb 2008 at 6:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi info.ruicruz,

sorry for this late answer !

this behavior is not a bug, this was done to prevent from having copies of the 
same
(DisplayObject) images in the final PDF, which would lead to extra size for 
nothing.

But you are right, this behavior would be a problem, in a situation like yours.

I'm gonna add a new behavior in the next release, which would detect that
automatically . 

Thanks for tracking ;)

Thibault

Original comment by thibault.imbert on 6 Feb 2008 at 11:42

GoogleCodeExporter commented 9 years ago
Whow to made this modification?
I need to modify source of an image to generate some images in my pdf file with 
different sources of the database. Understand me?
I'm sorry if my english text is wrong.

Original comment by jeanckre...@gmail.com on 20 Feb 2008 at 5:19

GoogleCodeExporter commented 9 years ago
sorry late answer.. 

insted of using swc, use the source actionscript files. then search for
"image:dicionary" and replace with "image:arraycollection
", then you need to change the way that data is stored on array collection, 
search
for "this.images[pDisplayObject] = info" and replace with
"this.images.addItem(info)". i think thats it, don't remember now, but if gives 
error
you'll fix it without any problems :)

best regards,
rui cruz

Original comment by info.rui...@gmail.com on 27 Feb 2008 at 9:51

GoogleCodeExporter commented 9 years ago
Another option would be to clone imageLoaded, or draw it to a new bitmap, so 
that the 
dictionary would have a different key for each image.

Original comment by macleod.tyler on 24 Sep 2009 at 12:35