Satishpethani92 / alivepdf

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

addImage() yields #2015 Bitmap Error (Hack Solution Included) #129

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Basically, I've attempted to pass a parent of a DisplayObject or
variable reference to a DisplayObject instance in my class. Examples:

myPDF.addImage(this);
myPDF.addImage(MovieClip.stage);
myPDF.addImage(MovieClip.parent);

What is the expected output? What do you see instead?
I wanted to take a screen capture instance of my entire SWF, but instead
I'd get the following runtime error: ArgumentError: Error #2015 Invalid
BitmapData.

The problem I found was on line 3190 of org.alivepdf.pdf.PDF.as. Using
FlashTracer, I determined that the following values were being passed into
the addImage function:

displayObject.width:44038179.6
displayObject.height:16513228.8

When I alternatively hard code the values, the PDF prints fine:
var bitmapDataBuffer:BitmapData = new BitmapData (1000, 600, false);  

What version of the product are you using? On what operating system?
I'm using AlivePDF 0.1.4.8 with Flash CS3 and TextMate on MacOSX Leopard

Original issue reported on code.google.com by mandal...@gmail.com on 28 May 2009 at 9:17

GoogleCodeExporter commented 8 years ago
I got the same error, I just tried to addImage of a VBox containing one Label..

Original comment by bruno4...@gmail.com on 18 Feb 2010 at 2:13

GoogleCodeExporter commented 8 years ago
I specify heigh and width of the Box instead of 100%, I got no longer the error 
but 
got a blank page as PDF..

Original comment by bruno4...@gmail.com on 18 Feb 2010 at 2:29

GoogleCodeExporter commented 8 years ago
I just realised we need to display a Flex component for being able to add it as 
image. 
Then I added the code : validateNow() after addChild(component).

Original comment by bruno4...@gmail.com on 19 Feb 2010 at 7:09