1 Reply Latest reply on Jun 16, 2009 3:29 AM by notboring

    FlexPrintJobScaleType.SHOW_ALL requirements?


      I spent several days trying to figure out how to print a few components and I am stuck, so need some help.


      My problems:


      I am supposed to print a few components (diagrams as well as texts and datagrids).When the user presses the PRINT button the application copies the to be printed content from several locations to the printing canvas. The printing Canvas contains two elements, one is a VBox containing the content to be displayed, the other a VBox including a text field that shows the page numbers.


      Problem #1


      If I resize the canvas or any object in it with x/y or scaleX/scaleY properties, or even just the pagination text field I only get a white page, even with calling validateNow() on the canvas or elements. Why? How does a 90% scaling cause a white page?


      Problem #2


      If I add a page like this:




      the page is not getting centered correctly (bit too much on the right side) and it's not getting resized correctly too since the right side simply is cut off. Anything is cut of the right side. Which makes me wonder what the requirements for SHOW_ALL are. Do I need a canvas that at least has the size of all the content in it?



        • 1. Re: FlexPrintJobScaleType.SHOW_ALL requirements?
          notboring Level 1

          Looks like working 16 hours in a row didn't help with a clear description of the problem I ran into. I am sorry for the weak description. Problem #1 was caused by a variable focus issue and is fixed now, I can scale the printing content but got a new issue there.


          The new issue is that the datagrid header text doesn't resize properly when I set scaleX and scaleY. The height of the column header text is about double as height as the cells they're in, cutting the text at half height making it unreadable. Do I need to search and replace all datagrids with their printing variant? Or is there any event that I can wait for until it got resize properly (and that works while printing)?


          As for the second problem, it's not really relevant anymore but I'd still like to understand what the content needs to be so that it can be printed correctly as full page.