Print complete document from stagewebview
I have a air application that shows in a stagewebview a facebook app.
In that facebook app you have to fill in a form.
Under the form there is a print button (that won't work)
So I wrote my own print button.
But the problem is that I have to convert the viewport of the stagewebview to a bitmap
and then print the bitmap to pdf or my printer.
But he always just take the part that is shown on my stage.
But I have to print the whole document that is in the stagewebview...
Can anybody help me?
Here is my code to convert to bitmap and the print...
var bitmapData:BitmapData = new BitmapData(iBreedte,iHoogte);
webView.location;
webView.drawViewPortToBitmapData(bitmapData);
var webViewBitmap:Bitmap = new Bitmap(bitmapData);
var myPrintJob:PrintJob = new PrintJob();
var options:PrintJobOptions = new PrintJobOptions();
options.printAsBitmap = true;
myPrintJob.start();
var s:Sprite = new Sprite();
s.height = iHoogte;
s.width = iBreedte;
s.addChild(webViewBitmap);
s.scaleX = .40;
s.scaleY = .40;
myPrintJob.addPage(s, null, options);
myPrintJob.send();
