Mark, I’d love to see a simple working example of this.

 

Luckily, my printing needs at the moment are modest, but an interim solution, while MM improves native printing, would be a delight.

 

Tracy

 


From: Mark Hitchcock [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 8:06 PM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders] Re: Advanced Printing Question

 

I have alsohad a number of problems with support for printing in Flex so I started to look outside of Flex for a solution.  There are probably a number 3rd party tools that you could try however as I am more comfortable with Java and Flex is running in a Java app server anyway, I have implemented a solution that works very well for what I am trying to achieve with iText.  iText is a free Java PDF library and can be found here http://www.lowagie.com/iText/  this has also been ported to .NET if anyone is interested in that.

 

The way I have integrated this with Flex is via a Servlet and then using the getURL methodin Flex.  This dynamically creates a pdf every time the servlet is called.  I am able to add headers, footers, images, tables etc, and the list goes on.

 

I'm not sure if this will meet everyone's needs or how support for printing in Flex will improve with future releases of Flex, however this meets and exceeds the printing needs of what I need to do.  If anyone is interested in a working example, just let me know and I will post a simple example I have working.  If anyone from MM has looked into this or has any comments on using iText that would be great also.

 

 

Regards

Mark Hitchcock

 

 


From:Manish Jethani [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 2 March 2005 12:42 AM
To: [EMAIL PROTECTED]
Subject: Re: [flexcoders] Re: Advanced Printing Question

AC wrote:

> The idea is: If I can programmatically build a complex nested control
> (eg Lables inside HBox, which are in turn inside VBox which can have a
> variety of different sibling controls) and then send it to the print
> to SUCCESSFULLY print, I would save a lot of work and maintenance
> issues in the long run.

You can create it at runtime.

   var myPrintableView = PopUpManager.createPopUp(this, VBox, false);
   myPrintableView.visible = false;

   var hbox = myPrintableView.createChild(HBox, "", {});
   var label1 = hbox.createChild(Label, "", {text: "Address:"});

... and so on.  Then you send 'myPrintableView' to printing.

Manish




Reply via email to