![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Sorry for title hard to state what I was wanting in a few lines.
I have a few apps that report back charts and datagrids. I have a function that I can pass in a UIComponent and it gives me back BitMap data. I then encoded this too jpg or png using JPGEncoder/PNGEncoder. I send the image to a php script on the server, that just spits it back to the client as a download. This enables the users to capture elements of the flex app to use in reports of there own. This all works great bar one issue. It only grabs what is visible on screen, not an issue with charts, but when I capture datagrids I only get the visiual portion. I would like to grab the whole grid sans scroll bar. Code below. Thanks in advanced (code snippet just core for ease of reading) cursorManager.setBusyCursor(); imgeSource = getBitmapData( UIComponent(myDataGrid) ); var jpgEncoder:JPGEncoder = new JPGEncoder(50); imgeStream = jpgEncoder.encode(imgeSource); var header:URLRequestHeader = new URLRequestHeader ( "Content-type", "application/octet-stream" ); var jpgURLRequest:URLRequest = new URLRequest (io_modules/jpg_encoder_download.php); jpgURLRequest.method = URLRequestMethod.POST; jpgURLRequest.data = imgeStream; var jpgURLLoader:URLLoader = new URLLoader(); navigateToURL(jpgURLRequest, "_self"); cursorManager.removeBusyCursor(); private function getBitmapData( target : UIComponent ) : BitmapData { var bd : BitmapData = new BitmapData( target.width, target.height); var m : Matrix = new Matrix(); bd.draw( target, m ); return bd; } |
| Sponsored Links |
|
|||
|
"flashharry!" <webforumsuser@macromedia.com> wrote in message news:gc4uv0$958$1@forums.macromedia.com... > Sorry for title hard to state what I was wanting in a few lines. > > I have a few apps that report back charts and datagrids. I have a function > that I can pass in a UIComponent and it gives me back BitMap data. I then > encoded this too jpg or png using JPGEncoder/PNGEncoder. I send the image > to a > php script on the server, that just spits it back to the client as a > download. > This enables the users to capture elements of the flex app to use in > reports of > there own. This all works great bar one issue. You may find that you can persuade the PrintDataGrid to help you. HTH; Amy |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise