RE: [flexcoders] Re: Advanced Printing Question
Hi Tracy, Not a problem. Yes, my printing needs are quite modest aswell and like I said in the original email, this solution exceeds my printing needs at the moment, but offeres the flexibility I need. Please find attached a simple mxml file as well as a java file which will need to be compiled. Add the servlet and servlet mapping to the web.xml file as below: SimplePdf samples.SimplePdf SimplePdf /servlet/simplePdf.pdf You will also need to download the latest iText jar (itext-1.2.jar) and add this to the lib directory along with servlet.jar I hope this helps with your printing needs, so enjoy and have fun with the iText library. Regards Mark _ From: Tracy Spratt [mailto:[EMAIL PROTECTED] Sent: Thursday, 3 March 2005 9:25 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Advanced Printing Question 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: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Advanced Printing Question I have also had 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 method in 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: flexcoders@yahoogroups.com 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 Yahoo! Groups Sponsor ADVERTISEMENT <http://us.ard.yahoo.com/SIG=129c45eho/M=298184.6018725.7038619.3001176/D=gr oups/S=1705007207:HM/EXP=1109898507/A=2593423/R=0/SIG=11el9gslf/*http://www. netflix.com/Default?mqso=60190075> click here <http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S= :HM/A=2593423/rand=874200691> _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . --=_NextPart_001_002D_01C51FDE.A3429E20 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable http://www.w3.org/TR/REC-html40"; xmlns:v =3D=20 "urn:schemas-microsoft-com:vml" xmlns:o =3D=20 "urn:schemas-microsoft-com:office:office" xmlns:w =3D=20 "urn:schemas-microsoft-com:office:word"> @font-face { font-family: Wingdings; } @font-face { font-family: Tahoma; } @page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; } P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" } A:link { COLOR: blue; TEXT-DECORATION: underline } SPAN.MsoHyperlink { COLOR: blue; TEXT-DECORA
RE: [flexcoders] Re: Advanced Printing Question
I have also had 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 method in Flex. This dynamically creates a pdf every time the servlet is called. I am ableto 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 intothis 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 AMTo: flexcoders@yahoogroups.comSubject: 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 inturn 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 lotof 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
Flex license install
Hi Everyone, I have finally received my license for flex 1.5 however I'm not sure if it is installed correctly as the apps that I have deployed keep expiring. Basically the production system is Sun Jes Application server which has the license installed. The apps are pre-compiled on my local machine and deployed to the app server as a war file. As my trial of flex has expired on my local machine, I am running with the Developer Edition enabled. Part of the Ant deployment script is to install the license on the war file before it is deployed to the web container. This seems to run fine and reports back that the license is enabled. When I run the licensetool on the appserver on both the deployed directory and war file it reports back the following: The license key was successfully installed. Retrieving licensing information, please wait ... 02/23 16:17:55 INFO License Service: Flex 1.5 Educational Edition enabled After about a 24 hour period when the application initialises I get the message that "This standalone application was created with the Developer edition" and I need to recompile and redeploy the apps. The Developing Flex Apps doc mentions that "If you precompile a Flex SWF file, you can deploy it only on a server that is running a licensed copy of Flex." Is there something I am missing? Thanks Mark
Flex license install
Hi Everyone, I have finally received my license for flex 1.5 however I'm not sure if it is installed correctly as the apps that I have deployed keep expiring. Basically the production system is Sun Jes Application server which has the license installed. The apps are pre-compiled on my local machine and deployed to the app server as a war file. As my trial of flex has expired on my local machine, I am running with the Developer Edition enabled. Part of the Ant deployment script is to install the license on the war file before it is deployed to the web container. This seems to run fine and reports back that the license is enabled. When I run the licensetool on the appserver on both the deployed directory and war file it reports back the following: The license key was successfully installed. Retrieving licensing information, please wait ... 02/23 16:17:55 INFO License Service: Flex 1.5 Educational Edition enabled After about a 24 hour period when the application initialises I get the message that "This standalone application was created with the Developer edition" and I need to recompile and redeploy the apps. The Developing Flex Apps doc mentions that "If you precompile a Flex SWF file, you can deploy it only on a server that is running a licensed copy of Flex." Is there something I am missing? Thanks Mark
RE: [flexcoders] Printing TextArea
Hi Jester, Thanks for the initial help in this area. I know Macromedia are looking at improving printing support in flex however it would be good to get something working even if it is fairly basic. I think the main problem I have is not being able to scroll through the textArea and print text that isn't currently visible. I have been looking at the dataGrid printing example and I think I may need to work out how many lines of text are visible in the textArea and to also work out the height of the lines. This way I may be able to perform a calculation similar to the one used in the datagrid example to workout the number of pages needed, the number of lines of text for each page etc. Would you know how we can work any of this out? Thanks Mark From: JesterXL [mailto:[EMAIL PROTECTED] Sent: Friday, 4 February 2005 11:00 AMTo: flexcoders@yahoogroups.comSubject: Re: [flexcoders] Printing TextArea Something close to this:http://www.macromedia.com/2003/mxml">- Original Message - From: "Mark Hitchcock" <[EMAIL PROTECTED]>To: Sent: Thursday, February 03, 2005 9:02 PMSubject: [flexcoders] Printing TextAreaDoes anyone have an example or ideas about how to print scrollable contentin a textArea?ThanksMark Hitchcock[EMAIL PROTECTED]Yahoo! Groups Links
Printing TextArea
Does anyone have an example or ideas about how to print scrollable content in a textArea? Thanks Mark Hitchcock [EMAIL PROTECTED]