Discuss: Printing a Book with CSS: Boom!
by HÃ¥kon Wium Lie, Bert Bos
- Editorial Comments
62 Quick invoices and proposals
I opened up this article mainly because I’ve been looking for a means to create invoices and proposals quickly, easily, and with some customization.
I’ve always hated opening up Indesign or Msoft Word just to fudge a couple variables and print. I’m on a slow laptop, and it can seem like forever to load up these bloated apps, only to close them after seconds of use.
I love the possibility that I can create a printed page template, and only have to open a simple text editor to edit and then send it to a browser (which is always on!) and hit print.
I know everyone’s been knocking the book format application, but I’m very excited about other possible applications.
posted at 06:36 am on January 31, 2006 by Marc Phu
63 Is there a good CCS file for enhacing docbook "boo
I am righting a docbook “book”. Some of the fonts are not looking good and would like to enhace the fonts. I learned that I could use CSS for enhancing fonts output in html. I am trying to see if someone has gone thru the experience and have used a good CSS stylesheet file. I would like to get a copy of the CSS stylesheet if possible. Or point me to good location where I can get a good CSS file.
Thanks,
Raj
posted at 02:58 pm on February 8, 2006 by raj patel
64 CSS and DocBook
I am righting a docbook “book�. Some of the fonts are not looking good and would like to enhace the fonts. I learned that I could use CSS for enhancing fonts output in html. I am trying to see if someone has gone thru the experience and have used a good CSS stylesheet file. I would like to get a copy of the CSS stylesheet if possible. Or point me to good location where I can get a good CSS file.
Prince ships with a CSS style sheet that does rudimentary styling of DocBook files. It’s called “docbook.css” and it should be a reasonable starting point.
posted at 07:54 am on March 14, 2006 by HÃ¥kon Wium Lie
66 Needs to improve
While the article is great, i don’t get the point.
I tried printing you HTML file via the latest version of firefox and ie and the footers (page numbers) do not appear.
if we need to have another program to convert to pdf to then be able to print, what is the use? why cannot CSS just work with browsers for printing?
I am trying to create documents that can be visible on the web and then when somene wants to print them, have a page number and a footer appear and your solution does not work, why is the question? since it is CSS and XHTML, there should not be a problem.
i have to revert to the idea of making 2 style scheets one for print and one for screen which is also a bad solution.
Unless i missed something
posted at 05:31 pm on May 10, 2006 by thierry bordet
67 Untitled
Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed.
posted at 04:18 pm on June 20, 2006 by Daniel Lynch
68 Untitled
Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed. Respectfully disagreed.
posted at 04:18 pm on June 20, 2006 by Daniel Lynch
69 Orphans
I don’t think this is ready for any serious use. Consider for example
<ul>
<li>That you can’t have a ul inside a p,</li>
<li>or any block level element</li>
</ul>
which really breaks orphan control code. There is simply no way that a client figure out like that a sentence like this belongs to the paragraph above, and isn’t a paragraph on its own.
(La)TeX has rather advanced algorithms to do this right, since it seriously breaks text flow. It may not be the kind of thing that people point their fingers at, but if you ask them, they tell you that your text was “heavy”. Any typographer worth his salt, and a serious book publisher will give this high priority.
Don’t get me wrong: I would really like to see a LaTeX replacement, as the HTML tools are much more widespread than LaTeX, and LaTeX is often a pain to write. However, it is important to realise that there are many good reasons why people use it for high-quality work, and that is not going to change before certain flaws in the original design of HTML is corrected, and I know it breaks your heart, HÃ¥kon, but that means backwards-incompatible changes must be made to HTML.
Also, it means that we have to put some effort into high-quality printing in the UAs, and I don’t see us doing that…?
posted at 09:09 pm on June 27, 2006 by Kjetil Kjernsmo
70 references to images with counters
I like the idea, since we already have the API documentation of our software generated as HTML. It must not be perfect for printing (I would prefer Latex over XSL-FO/Docbook, but that is not important here).
What I am really missing is the possibility to create a reference to a numbered element: E.g. images are numbered with a chapter prefix and a counter for the image, i.e. a caption like “Fig. 2.3” for the third image in the second chapter.
&&/%%$$ &&&%%&% %%&&&&&&& {text-align:center}Fig. 1.1
This could be easily done using counters. But now I would like to create a reference in the text to this image like, e.g. “see Fig. 2.3” where the “Fig 2.3” is automatically generated. Is this possible?
bla bla bla (see Fig 1.1) bla bla bla
posted at 03:01 pm on August 14, 2006 by Victor Volle
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






61 Very cool, guys
Very nice paper, thanks. And Prince may be just the tool I need for a “print-on-demand” adjunct to my (free) ebooks site (http://etext.library.adelaide.edu.au)
I’ve been tinkering for a long time with ebooks — mostly public domain novels and essays (which it is true to say are quite simple compared to technical works), using HTML. My main interest has been in formatting books for the web rather than print, but there’s always that lingering, “wouldn’t it be nice” feeling that it would be great to be able to print them too, if desired. And I have had some limited success in that direction using rudimentary CSS (see the FAQ), which produces a nice result if you don’t mind A4 and don’t much care about page numbering etc.
But it is very pleasing to see someone pushing the envelope to see what can be done with CSS. Now, if only my browsers supported all those features, I’d be very happy.
Of course, with or without Prince, there’s no reason I should not use the CSS3 features, even if they are not currently supported. They will be one day, and then my ebooks will be ready and waiting!
(And I’ve heard all the “wrong tool” arguments from the ebook crowd already, thanks! LaTex, Docbook, XSL, yadda yadda. Most of them are still producing ugly results whatever the tool.)
posted at 10:04 am on January 3, 2006 by Steve Thomas