SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Media Print

  1. #1
    Non-Member
    Join Date
    May 2005
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Media Print

    I want to develop a new HTML form/screen for an employee to fill out, and when they print it the screen/form prints two separate pages. I want to be able to control where the 2nd page starts.

  2. #2
    Pedantic Semantic blain's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First off you need to specify a print stylesheet in your HTML.

    Code:
    <link rel="stylesheet" href="style.css" type="text/css"> media="print"
    Then find where you want your page break to go, look for the last HTML tag before your break, give that tag an class="pagebreak"

    then
    Code:
    #pagebreak
         {
         page-break-after: always
         }
    Technology is dominated by two types of people:
    those who understand what they do not manage,
    and those who manage what they do not understand.

  3. #3
    Non-Member
    Join Date
    May 2005
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont want to break a page. because its a dynamic page

  4. #4
    Pedantic Semantic blain's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is only a pagebreak for the purposes of printing.
    Technology is dominated by two types of people:
    those who understand what they do not manage,
    and those who manage what they do not understand.

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2006
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think what he is trying to say is that he cant use that because the page is created dynamically.

  6. #6
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by milind_p1982
    I want to be able to control where the 2nd page starts.
    Quote Originally Posted by milind_p1982
    I dont want to break a page. because its a dynamic page
    How do you expect to 'control where the 2nd page starts' without a page break?

    What blain tried to tell you is that you can add a CSS rule via an ID on the last element of the first page (or the first element on the second page, using page-break-before). You can set that ID in your server-side script.
    Birnam wood is come to Dunsinane


Bookmarks

Posting Permissions

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