Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
Navigator35 #1
Problem in printing multiline text
Hi
I am working in a project using Flex where I have to use printing
extensively. I have to generate a print preview and then print the same. As its
a kind of report there are lot of text involved in it.
so coming to the problem, my preview page is showing multiline text properly.
but while printing some of the contents in a multiline text is not showing at
all. its only happening in case of multiline text. i tried with
clipContent="false". but its still happening like that. i don't know how to
solve this!!!
By the way i am using FlexPrintJob.
for example,
if my Preview page has:
Flex is the new age technology.
One day it'll replace HTML.
the printed document is showing only:
Flex is the new age technology.
please help me to solve this problem. Looking forward to help from you people
out there.
Thanks in advance.
Navigator35 Guest
-
Text formatting - multiline text field?
- Access datasebase field set to memo - Online Form has a multiline text field How can you see paragraphs on your website, because when you... -
set and detect multiline in dynamic text
Hi, I have a textbox on the stage, a plain textbox with one line but set with multiline. My actionscript assigns string values to the textbox.... -
dynamic text multiline
I have text coming in via remoting. I can see the text, however it will not multiline for some reason. I have checked the height of the text box... -
write multiline text into ini / text-content / serialise
Hi, I was trying to write a multiline text into an ini file. Which is ok so far until it comes to read back the text with CR. When reading the... -
Different fonts in multiline text box...
I have a multiline text box. I would like some of the text to be one font color and other text another font color. Is this possible with a... -
kcell #2
Re: Problem in printing multiline text
Hi Navigator,
we solved the problem some time ago.
I have attached some code which might help you as example.
best regards
kcell
// mxml file
private function printDocument():void
{
// TO PRINTDocument
var printJob:FlexPrintJob = new FlexPrintJob();
printJob.printAsBitmap = false;
if ( printJob.start() != true)
return;
var printView:MYGeneralPrintForm = new MYGeneralPrintForm();
addChild(printView);
printView.width = printJob.pageWidth;
//printView.height = printJob.pageHeight;
// set data to the print view
printView.addMyMultilineText( mymultilinetext);
printJob.addObject(printView);
printJob.send();
removeChild(printView);
}
...
// in the MYGeneralPrintForm
public class MYGeneralPrintForm extends VBox
...
public function addMyMultilineText( strText:String):void
{
var aTextArea:Text = new Text();
aTextArea.percentWidth = 100;
aTextArea.text = strText;
addChild(aTextArea);
}
kcell Guest



Reply With Quote

