6/29/2010 3:38:44 AM
Title:
Print multipale pages in air flex3
hii all
i want to print multipale pages from RichTextEditor.
i have one example of multiple page printing in grid
http://livedocs.adobe.com/flex/3/html/help.html?content=printing_5.html
but i need in <mx:RichTextEditor/>
if any one know thne give me code or help me
6/29/2010 9:27:27 AM
see if this code works for you
http://www.java2s.com/Code/Flash-Flex-ActionScript/Development/Printthetextovermanypages.htm
6/29/2010 9:45:31 AM
flash is quite bad in complex printing , I think the best solution is to run a loop to print the text .
steps
1) Add all your text to textbox say height 600px is printable area. And check the textbox height if it exceeds 600px then.
2) remove the text in loop until the rows reduce and text box height is less than or equals 600px.Add this to print job and send for print. Save the removed / extra text in a variable.
3) set the remaining text which was removed to the textbox and do the same check again
6/29/2010 10:08:04 PM
HII. Trilian THIS IS JAVA CODE HOW CAN I APPLY IN FLEX..
CAN ANY ONE GIVE ME CODE (TAHT CAN PRINT MULTIPLE PAGE ).
THANKS
6/29/2010 10:53:04 PM
thats not java man. thats actionscript . Its a printing class extended to add multiple page functionality in actionscript
6/29/2010 11:01:05 PM
OK THANKS FOR THAT I WILL TRY AND BACK REPLY U SOON
6/29/2010 11:23:32 PM
hii..can u tell me how can we use it ....how can i add my textarea or richtext box and send to print?
thank a lot for reply
7/5/2010 3:21:16 AM
see this 1 sample if has any use
var printJob:FlexPrintJob = new FlexPrintJob();
if(printJob.start()) {
printJob.addObject(canvas1);
printJob.addObject(canvas2);
//printJob.printAsBitmap = true;
printJob.send();
}