php and reports related informations needed

Posted on 2011-05-12
Last Modified: 2012-06-27

Is there any printing methods available in php which can print a page in a given paper like A4 etc.

currently im using window.print option with javascript.

also which methods do you use to create reports, invoices etc...?


Question by:3xtr3m3d
    LVL 4

    Accepted Solution

    You won't find any native methods for printing on PHP, because PHP won't natively render screen-related information. It renders and outputs HTML data to the browser -- that's the reason it is a Pre-HTML-Processor.

    There are, however, external libraries that can perform actions such as creating PDF files, etc. There might be a printing library, but I'm not sure
    LVL 82

    Assisted Solution

    by:Dave Baldwin
    To expand a little bit on what @atipico said, PHP runs on the server so it can't be directly used to print on your computer.  You can use methods that run in your browser like javascript or the browser print functions like you are doing.  If it is your website, I also recommend that you look into creating PDFs.  Web pages and browsers are not oriented to paper pages.  It can be difficult to get them to print items from the screen the way you want.
    LVL 3

    Author Comment

    Thanks for the info.  is there ways that can use instead of pdf?
    LVL 82

    Expert Comment

    by:Dave Baldwin
    Your question is a little too general.  You can print from your browser but that only works well if you have simple pages that don't require exact positioning.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now