#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Questioner's home
    Posts
    89
    Rep Power
    12

    page break programmatically


    I'm trying to write a program to generate html page, the only problem I have now is css page break (page-break-before : always) wont work on any of my browsers (konqueror and mozilla).

    Do you know how to make the printer page break? Sorry I know this is not website development board, but I want to know if there's a python way to do it. Thanks in advance.
    What can change the nature of a man?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Location
    Regensburg, Germany
    Posts
    147
    Rep Power
    16
    Workarounds might be:
    • Create a frameset and start a new frame for every page brake. Most browsers are able to print each frame of a frameset on separate pages.
    • Create a pdf document for every html page using html2ps and ps2pdf and add a link to the pdf file for printing. Read the html2ps documentation of how to force page breaks.
  4. #3
  5. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69

    Python? How?


    You've lost me sorry. Could you explain a little more about how you want Python to fit into this? You would probably get a better responce from one of the web development forums, like you said... Still I don't see how this is a Python question .

    Mark.
    programming language development: www.netytan.com Hula

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Questioner's home
    Posts
    89
    Rep Power
    12
    Nevermind, the prob is solved by using other browsers that support css2.

    The reason I ask here is becoz before this I tried manually adding white spaces by counting lines, and hat method is not very effective since there are many hardcoding inside, and I want to know if there's any python function to detect lines per page.

    Anyway, thanks for your help!
    What can change the nature of a man?

IMN logo majestic logo threadwatch logo seochat tools logo