Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts

    Flash-Based Print Management (Batched Printing)

    I'm having no luck finding anything to do with management of print jobs using flash so I'm hoping to find a suggestion here.

    To clarify: I am not wanting to print something FROM a flash file or script (as in, I don't want to print a flash display or images contained in a flash file), but rather I want to print off several items one after another (in rapid succession) from AJAX-driven HTML page content without getting "printer not available" errors when the printer is waiting for me to finalize my print dialog box.

    I am currently working in Firefox 7.0.1. Previously, I had been doing this just fine with nothing but javascript with a "for" loop (under Firefox 3.x or 4.x) because, apparently, the javascript in the page was interrupted while the print dialog was open. And, apparently, in the latest FF this is no longer the case.

    The overall situation is a report batch that I am running. I generate, via AJAX, about 50 or so reports into my page. When the reports are all done I print them to PDF individually. My basic approach was to hide all results boxes. I would then loop through the results boxes sequentially and unhide/print/rehide each one in order. When the loop is completed all results boxes are unhidden again and the page is restored. This had been working fine for over a year up until I recently upgraded to FF7.

    Since javascript no longer waits for the print dialog to finish I am thinking about handing off print requests to a flash script to manage. So instead of calling print() from javascript I would invoke a flash script to run through the printing instead. This print management (unhiding/printing/rehiding while waiting until the current job is done before calling the next job) would be the ONLY thing that I want this script to do.

    My google searching is fruitless so far... I keep finding solutions for users wanting to print from flash-based sites, which is NOT what I am after. So, to make a long post longer, does anyone know of a script available for this type of thing (or even anything close to it)?
    Last edited by Rowsdower!; 11-10-2011 at 05:15 PM. Reason: fixed a typo
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    I have temporarily worked around this by using a javascript alert (may switch to a confirm, but it's the same in principle) between each call for window.print() to keep the javascript interrupted while I handle each print request in turn, but I would really love to streamline this if I can.

    Does anyone know of a flash-based printing manager? If not, does this idea seem like something that can even be accomplished with flash? In other words, would learning flash be worth my time in order to "home-grow" a solution for this or is it simply outside of the powers of flash to do this at all?

    I know jack squat about flash programming at this point so I am at the mercy of the forum... Any tips will be gratefully received!
    Last edited by Rowsdower!; 11-10-2011 at 05:44 PM.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Posting Permissions

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