XHTML Publication - From Web to PDF
Part:
1
2
3
4
(Continued from previous part...)
</td>
<td width="1" rowSpan="1"><img height="100%" width="1" ...
<tr><td colSpan="3" height="1"><img height="1" ...
</table>
</td>
<td class="frame_right"></td></tr>
<tr><td class="frame_bottom" colspan="3">
...
</td></tr>
</table>
</body></html>
Note that:
- "meta" tag is used to hide a number of special values for XSL processing.
- "class" attributes are used the CSS formatting and XSL processing.
- "id='*.xhtml'" attribute is used to identify the beginning of the chapter
for XSL-FO referencing purpose.
- Many "table" tags are used to simulate a page layout in the Web browser window.
- The table of contents page should be named as "toc.xhtml".
The CSS File
Here is my CSS file, book.css:
A {
LINK-COLOR: green;
VISITED-COLOR: mediumblue;
ACTIVE-COLOR: red;
HOVER-COLOR: black
}
BODY {
BACKGROUND-COLOR: #707070;
FONT-FAMILY: 'times new roman';
MARGIN-TOP: 0pt;
MARGIN-BOTTOM: 0pt;
MARGIN-LEFT: 0pt;
MARGIN-RIGHT: 0pt
}
P {
margin-left: 0pt;
margin-right: 0pt;
FONT-FAMILY: 'times new roman'
}
P.book_title {
FONT-FAMILY: 'times new roman';
font-weight: bold;
font-size: 22pt;
COLOR: black
}
P.chapter_title {
FONT-FAMILY: 'times new roman';
font-weight: bold;
font-size: 18pt;
COLOR: black
}
P.section_title {
FONT-FAMILY: 'times new roman';
font-weight: bold;
font-size: 14pt;
COLOR: black
}
PRE.block_bold {
FONT-FAMILY: 'new courier';
font-weight: bold;
BACKGROUND-COLOR: #d0d0d0;
MARGIN-TOP: 4px;
MARGIN-LEFT: 0px;
MARGIN-RIGHT: 0px;
MARGIN-BOTTOM: 4px;
BORDER: 10px;
COLOR: black;
PADDING: 5px;
WIDTH: 600px
}
PRE.block_source {
FONT-FAMILY: 'new courier';
BACKGROUND-COLOR: #d0d0d0;
MARGIN-TOP: 4px;
MARGIN-LEFT: 0px;
MARGIN-RIGHT: 0px;
MARGIN-BOTTOM: 4px;
BORDER: 10px;
COLOR: black;
PADDING: 5px;
WIDTH: 600px
}
PRE.block_syntax {
FONT-FAMILY: 'new courier';
font-style: italic;
BACKGROUND-COLOR: #d0d0d0;
MARGIN-TOP: 4px;
MARGIN-LEFT: 0px;
MARGIN-RIGHT: 0px;
MARGIN-BOTTOM: 4px;
BORDER: 10px;
COLOR: black;
PADDING: 5px;
WIDTH: 600px
}
TABLE.frame {
WIDTH: 750px;
HEIGHT: 100px;
BORDER: 0pt solid transparent;
PADDING: 0pt;
BACKGROUND-COLOR: transparent
}
TABLE.page_border {
WIDTH: 700px;
HEIGHT: 100px;
BORDER: 0pt solid red;
PADDING: 0pt;
BACKGROUND-COLOR: #ffffff
}
TABLE.page {
BORDER: 0pt solid red;
PADDING: 49px;
BACKGROUND-COLOR: #fbfbfb
}
TABLE.example {
BACKGROUND-COLOR: transparent;
BORDER: 0PT; not working
CELLSPACING: 0pt;
BORDER: 0pt solid red;
CELLPADDING: 0pt
}
(Continued on next part...)
Part:
1
2
3
4
|