Javascript:window.print()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tassadique
    New Member
    • Mar 2007
    • 1

    Javascript:window.print()

    i m developing the electrnic check printing. I design one check. now for printing i m giving this command "javascript:par ent.window.prin t()". but the problem is that it also print some unnecessary information. like title, page numbers etc.

    Can anyone help me in this regard. or is there any other way to design check in web applications.

    Regards
    Tassadique Humayun
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Before you run your script you must set the 'print options' of your browser. Set the header and footer text to blank.

    Ronald :cool:

    Comment

    • bergy
      New Member
      • Mar 2007
      • 89

      #3
      Another alternative to using HTML to create the checks would be to create the checks as a PDF file which should give you alot more flexibility with the layout and printing options.

      There is an amazing class called FPDF that will allow you to generate PDF files in PHP. It's very easy to use, well documented, and (best of all) FREE! I use it when I'm creating invoices and receipts in ecommerce apps and if I were coding what you're doing I'd use it there too.

      Here's a link to check out:



      Also, if you'd like to import existing PDFs (like maybe a couple templates with customized backgrounds for your checks) check out this addon to FPDF called FPDI. You can take any PDF file, import it to the class and start writing on it.

      Comment

      Working...