Printing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sheldonlg

    Printing

    I have been asked to implement a "Print All" function to an application.
    The current screen has a list of invoices. Clicking on any one of
    them (via a preview button) opens a new window for that invoice. They
    can then, of course, print that document.

    What they want is a single button that sends all the invoices to a
    printer. Of course, each one has to look like it would when opened
    singly via the preview and then printed.

    It would be best if there were a confirmation window for the list
    enabling a choice of printer.

    I am not sure if this is php or javascript or both. I suspect it is
    both (since the generation has to be pulled from database data).

    Any help would be appreciated.
  • Joost Diepenmaat

    #2
    Re: Printing

    sheldonlg <sheldonlgwrite s:
    I have been asked to implement a "Print All" function to an
    application. The current screen has a list of invoices. Clicking on
    any one of them (via a preview button) opens a new window for that
    invoice. They can then, of course, print that document.
    >
    What they want is a single button that sends all the invoices to a
    printer. Of course, each one has to look like it would when opened
    singly via the preview and then printed.
    >
    It would be best if there were a confirmation window for the list
    enabling a choice of printer.
    >
    I am not sure if this is php or javascript or both. I suspect it is
    both (since the generation has to be pulled from database data).
    >
    Any help would be appreciated.
    All you can do in javascript here is to use the print() method, which
    on most browsers opens up the same dialog as selecting the "Print..."
    menu option.

    If you want to stay with HTML you can put all the invoices on a single
    HTML file (generated via PHP) and print that - you can use CSS to
    insert page breaks etc.

    Alternatively, you may be able to generate PDF or some other format
    that gives you more control over the resuling pages.


    --
    Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/

    Comment

    • fred

      #3
      Re: Printing

      On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.n lwrote:
      sheldonlg <sheldonlgwrite s:
      I have been asked to implement a "Print All" function to an
      application. The current screen has a list of invoices. Clicking on
      any one of them (via a preview button) opens a new window for that
      invoice. They can then, of course, print that document.
      >
      What they want is a single button that sends all the invoices to a
      printer. Of course, each one has to look like it would when opened
      singly via the preview and then printed.
      >
      It would be best if there were a confirmation window for the list
      enabling a choice of printer.
      >
      I am not sure if this is php or javascript or both. I suspect it is
      both (since the generation has to be pulled from database data).
      >
      Any help would be appreciated.
      >
      All you can do in javascript here is to use the print() method, which
      on most browsers opens up the same dialog as selecting the "Print..."
      menu option.
      >
      If you want to stay with HTML you can put all the invoices on a single
      HTML file (generated via PHP) and print that - you can use CSS to
      insert page breaks etc.
      >
      Alternatively, you may be able to generate PDF or some other format
      that gives you more control over the resuling pages.
      >
      --
      Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
      I used PDF for my project, but it was pretty painful... I had to make
      my form resemble one that we use within the company. If I'd have been
      able to get a commercial PDF library it would have been better, but I
      had to write hundreds of lines to replicate the look of a single page
      using a free PDF generator.

      Of course, you would then reuse that page for each invoice, so it
      seems worth it if you really need to control the look. Failing that,
      you can designate which CSS is applied to printing.

      Comment

      • Captain Paralytic

        #4
        Re: Printing

        On 28 Aug, 15:39, fred <fred.h...@gmai l.comwrote:
        On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.n lwrote:
        >
        >
        >
        >
        >
        sheldonlg <sheldonlgwrite s:
        I have been asked to implement a "Print All" function to an
        application. The current screen has a list of invoices.  Clicking on
        any one of them (via a preview button) opens a new window for that
        invoice.  They can then, of course, print that document.
        >
        What they want is a single button that sends all the invoices to a
        printer.  Of course, each one has to look like it would when opened
        singly via the preview and then printed.
        >
        It would be best if there were a confirmation window for the list
        enabling a choice of printer.
        >
        I am not sure if this is php or javascript or both.  I suspect it is
        both (since the generation has to be pulled from database data).
        >
        Any help would be appreciated.
        >
        All you can do in javascript here is to use the print() method, which
        on most browsers opens up the same dialog as selecting the "Print..."
        menu option.
        >
        If you want to stay with HTML you can put all the invoices on a single
        HTML file (generated via PHP) and print that - you can use CSS to
        insert page breaks etc.
        >
        Alternatively, you may be able to generate PDF or some other format
        that gives you more control over the resuling pages.
        >
        --
        Joost Diepenmaat | blog:http://joost.zeekat.nl/|work:http://zeekat.nl/
        >
        I used PDF for my project, but it was pretty painful... I had to make
        my form resemble one that we use within the company.  If I'd have been
        able to get a commercial PDF library it would have been better, but I
        had to write hundreds of lines to replicate the look of a single page
        using a free PDF generator.
        Of course you could have built the layout in HTML and then used one of
        the HTML2PDF php libraries to generate your pdf files.

        Comment

        Working...