Problem in printing multiline text

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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....
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139