15 Replies Latest reply on Jul 1, 2010 10:22 PM by Gourav-flex

    Multi-Page Printing in Adobe AIR

    flipone01 Level 1
      I developed a commercial application for a client in Adobe AIR about 3 months ago. Now my client wants to add a printing feature. The problem is it requires multi-page printing based on the number of rows in a SQLite table.

      BUT I FOUND OUT TO MY AMAZEMENT that I'm limited to less than 3K vertical pixels (or about less than 3 or 4 pages of printout, depending on the vertical size of the page in the set)!

      I was really dumbfounded (AND EMBARRASSED WITH MY CLIENT) to see this rather fundamental shortcoming in Adobe AIR. It is supposed to revolutionize desktop application development, but AIR's lack of such an important printing support as multi-page printing is really very disappointing.

      Most desktop applications require and are expected to provide multi-page printing. I hope the members of the AIR development team are listening to this well-justified criticism and will roll up their sleeves and work on it!

      Thanks!
        • 1. Re: Multi-Page Printing in Adobe AIR
          ab1301 Level 1
          Ditto. This needs to be handled like YESTERDAY.

          If I may suggest a workaround in the meantime, you might try generating a report in html, saving it to the application storage directory, then use navigateToURL to navigate to the html report in the system browser. Make sure the html report has on open print in the body tag, and maybe give the user a little note in an alert window. Voila, you have a semi-automated print function 100 times better than Adobe's built in print function.
          • 2. Re: Multi-Page Printing in Adobe AIR
            flipone01 Level 1
            Hi ab1301,

            This is actually the work-around I implemented and packaging tomorrow for delivery. I'm providing a Confirm dialog after the user saves the HTML file to ask if s/he wants to open the saved HTML file in the default system Web browser. (We do think alike, I think. :-)

            Thanks for the feedback.

            Oscar
            • 3. Re: Multi-Page Printing in Adobe AIR
              jbenson@oper8 Level 2
              Wanted to add a quick "Me Too" here.

              I'll be going with either AlivePDF or a "open in the system browser hack" like described here. However neither are really the right solution when you just need your app to print a file.

              But Adobe: Thank you sincerely for the laughs. I really did get a chuckle of the printJobOptions API located here:

              http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/printing/PrintJobOptions.html

              If there's only one property, and it always has to be set to true, why does it exist? :D
              • 4. Re: Multi-Page Printing in Adobe AIR
                flipone01 Level 1
                quote:

                Originally posted by: jbenson@oper8

                But Adobe: Thank you sincerely for the laughs. I really did get a chuckle of the printJobOptions API located here:

                http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/printing/PrintJobOptions.html

                If there's only one property, and it always has to be set to true, why does it exist? :D



                He he :-)
                • 5. Re: Multi-Page Printing in Adobe AIR
                  ab1301 Level 1
                  Unfortunately, in this case I think no news is bad news. I have seen people mentioning AIR's printing problems all over the place, and I haven't seen word 1 from anyone at Adobe. On any other issue, the "evangelists" always seem to be out in force. I think that means no one is even working on this, and no one wants to talk about a negative that doesn't have a fix around the corner or even on the horizon. (If you don't have anything good to say, don't say anything at all). Its really a shame, since printing is so vital to the desktop and AIR is supposed to be the bridge between the desktop and web.

                  There are a couple bug reports on this issue that you might vote for if interested: https://bugs.adobe.com/jira/browse/SDK-13895
                  https://bugs.adobe.com/jira/browse/ASC-3300

                  Of course the status of the bugs is "deferred" and the priority is "none," which only reinforces my belief that Adobe doesn't intend to address this any time soon.
                  • 6. Re: Multi-Page Printing in Adobe AIR
                    btetampa Level 1
                    I'd like to add my voice to the chorus of requests to address this issue. Having an integrated webkit browser is a great feature and the main reason I will likely deploy an app using Air. However, the lack of any standard print capability almost defies belief. That means every developer will have to slog through tons of documentation and/or blog posts to "roll their own" solution to one of the most common and important functions of a browser.

                    I haven't yet implemented anything, but the blog post below looks like it may be helpful:

                    http://dryicons.com/blog/2008/04/26/multiple-page-printing-from-a-html-adobe-air-applicati on/

                    Any response from Adobe would be appreciated to at least reassure us this issue is registering with the corporate consciousness.
                    • 7. Re: Multi-Page Printing in Adobe AIR
                      Czajka Level 1
                      I agree with all of you. Oh, and Adobe, while you are at it, integrate the PDF libraries into AIR so the user doesn't have to install Acrobat or Adobe Reader. While INM has a great product for integrating PDF viewing and printing within Director 11, they are punting on upgrading some of their other tools for now. So as a developer, we're sitting on the fence confused at what tools to use and which platforms we can target.
                      • 8. Re: Multi-Page Printing in Adobe AIR
                        jcomdesigns Level 1
                        Adobe... can you please give some kind of response to the whole printing thing?

                        • 9. Re: Multi-Page Printing in Adobe AIR
                          flipone01 Level 1
                          Hi btetampa,

                          I've seen the Web page you mentioned in your post before I posted here. Unfortunately, despite the author's creativity and best efforts, the code still suffers from the @ 2,800 vertical pixels limitation.

                          I'm so perplexed why nobody from the Adobe AIR team is responding or saying anything about this issue. Maybe it's not in their to-do list for the next release and so have really nothing to say about it. Sigh...
                          • 10. Re: Multi-Page Printing in Adobe AIR
                            manofspirit
                            quote:

                            Originally posted by: ab1301
                            Unfortunately, in this case I think no news is bad news. I have seen people mentioning AIR's printing problems all over the place, and I haven't seen word 1 from anyone at Adobe. On any other issue, the "evangelists" always seem to be out in force. I think that means no one is even working on this, and no one wants to talk about a negative that doesn't have a fix around the corner or even on the horizon. (If you don't have anything good to say, don't say anything at all). Its really a shame, since printing is so vital to the desktop and AIR is supposed to be the bridge between the desktop and web.

                            There are a couple bug reports on this issue that you might vote for if interested: https://bugs.adobe.com/jira/browse/SDK-13895
                            https://bugs.adobe.com/jira/browse/ASC-3300

                            Of course the status of the bugs is "deferred" and the priority is "none," which only reinforces my belief that Adobe doesn't intend to address this any time soon.



                            If this is true, then its really bad
                            I already had selected AIR for my University Project, and If adobe doesnt add printing support within 6 months, then im going to have a hard time

                            Is there any article which talks about those semi printing ways like Save to HTML or simialr?
                            • 11. Multi-Page Printing in Adobe AIR
                              jbenson@oper8 Level 2
                              I just posted my hack for printing via the user's browser here:

                              http://vfoo.wordpress.com/2009/03/24/adobe-air-print-css-and-html-printing-hack/

                              There are probably better ways to do this, this one just happens to be mine.
                              • 12. Re: Multi-Page Printing in Adobe AIR
                                flipone01 Level 1
                                Thanks for sharing J.

                                Cheers,
                                Oscar

                                PS: Incidentally, I just posted a message at Oliver Goldman's blog about multi-page printing in AIR. I don't know if he'll respond to it though. But here's his blog address:

                                http://blogs.adobe.com/simplicity/

                                --- ditto ---
                                • 13. Re: Multi-Page Printing in Adobe AIR
                                  flipone01 Level 1
                                  Oliver Goldman, a member of the Adobe AIR team, responded to my message in his blog that printing enhancements are "under consideration" for a future release.

                                  I can only hope that "under consideration" means it will be included in the next release.
                                  • 14. Re: Multi-Page Printing in Adobe AIR
                                    Govadica Level 1
                                    Thank for sharing .
                                    • 15. Re: Multi-Page Printing in Adobe AIR
                                      Gourav-flex Level 1

                                      Is their any code to print multiple pages from <mx:html  /> in adobe air1.5  or air2???

                                       

                                      plz help me if  any one have solution?