Results 1 to 5 of 5

Thread: About Printing Question...

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    47

    About Printing Question...

    Excuse me..
    I have some project with PHP (Intranet)...
    I have some question about reporting via html
    1. How to give Header and Footer... ??
    2. How to get num of lines from 1 web page ??
    3. How to change the page ...
    Example : 1 paper for 50 Lines..., But after line 30, I want change the page and Print another data...

    In my case , my report like this :

    Code:
    Page  : 1
    Group 1
    ================================================
    |Row          1 | EXPLANATION (Data Type : Text)                 
    |                  |                                                               
    |                  |                                                               
    --------------------------------------------------------------
    |Row          2 | EXPLANATION (Data Type : Text)                 
    |                  |                                                               
    |                  |                                                               
    --------------------------------------------------------------
    -> change page
    
    Page : 2
    Group 2
    ================================================
    |Row          1 | EXPLANATION (Data Type : Text)                 
    |                  |                                                               
    |                  |                                                               
    --------------------------------------------------------------
    |Row          2 | EXPLANATION (Data Type : Text)                 
    |                  |                                                               
    |                  |                                                               
    --------------------------------------------------------------
    Is there a way to get number of lines from text data type ??
    In my mind, I will get number lines, if it's reach the limit of pages, it'll get header and data again... Or Maybe another suggestion ???
    Thanks For Your help ...
    It's hard to find something that doesn't exist in reality.....
    Sorry If My English is very Bad....

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: About Printing Question...

    Huh? PHP is server side and printing happens on the client side. PHP has absoultely nothing to do with printing.

    As for your issue, it looks like you want to limit the amount of information per page. Honestly, I don't think you can do that even with JavaScript pragmatically, however; you could strategically place HTML elements to space them enough to seperate data onto pages.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: About Printing Question...

    Actually, the CSS print module can force page breaks. You just have to find a browser that supports it properly.

    I think you're better off getting one of those PHP PDF generation libraries.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: About Printing Question...

    Quote Originally Posted by CornedBee
    Actually, the CSS print module can force page breaks. You just have to find a browser that supports it properly.

    I think you're better off getting one of those PHP PDF generation libraries.

    If you decide to use a PDG library take a look at FPDF.

    If your question has been answered can you mark this thread as resolved thanks.

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2006
    Posts
    47

    Re: About Printing Question...

    I try page break, it solve my problem little (my #3 question)
    About page break, is there a way to show header in the page but not shown in web page ???
    About FPDF, i think i don't use it because the user must have Acrobat Reader and when i try it, it's heavy for some computer...

    And How about my #2 Question ??? , Is there a way to count the number of lines of webpages , so i can combine with page break ???
    It's hard to find something that doesn't exist in reality.....
    Sorry If My English is very Bad....

Posting Permissions

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



Click Here to Expand Forum to Full Width