1

I'm writing a script to automatically transform plain text test documents into HTML tables with proper column width, step numbering, etc. Each page will have some part of a big, long table in it. I also need to have a header and footer on each page to comply with FDA regulations in this area- it has simple information about copyright, page number, part numbers, etc.

I have noticed some of the prescribed CSS/HTML tools for this task don't seem to work.

1)The @page rule with margins and the ability to put content into those margins would solve this problem pretty neatly, but I don't think it was ever implemented.

2)Many of the suggested answers to this question on SO:

How to add a header and footer to each printed page of a web document (without browser restriction)?

Is there a way to get a web page header/footer printed on every page? end up with some combination of: The footer/header render on top of text, or somehow break the page-break-inside rendering of the body so half of a line renders on each page.

Is it still (given the answers and my attempts to use them) impossible to do this in a clean way? Or at all? I don't mind what browser I have to use to print them correctly either.

Community
  • 1
  • 1
argentage
  • 2,758
  • 1
  • 19
  • 28
  • I vote for `wkhtmltopdf`. What does confuse you about it? – spacediver Jul 19 '12 at 20:57
  • It will make my life painful if I have two separate electronic documents which purport to be the correct test document. (I actually meant to link a different SO post than the one I did for that reason.) I might end up using this but only if the html/css solution is nonexistent or truly horrendous. – argentage Jul 19 '12 at 21:02
  • 1
    It is okay to have two presentations of the same document, if one of them is programmatically built from another, as long as the building process is sufficiently automated. Then everytime you change the source, you rebuild dependent one and that's it. If I understood you correctly :) – spacediver Jul 19 '12 at 21:14
  • as for `html/css`, it is highly desireable to mold the paper view of your document in the `PDF` format, because it will make it way less dependent of the circumstances of the actual printing. – spacediver Jul 19 '12 at 21:16

0 Answers0