< Day Day Up > |
Produce PDF documents for XML documents styled with CSS using YesLogic Prince . YesLogic (http://www.yeslogic.com) of Melbourne, Australia, offers an extremely simple little tool for converting XML documents styled with CSS into PDF or PostScript. It's called Prince and it's currently at Version 3.0. It runs on Windows or Red Hat Linux (Versions 7.3 and 8.0). Prince comes with a set of examples, default stylesheets, and DTDs. You can download a free demo version from http://yeslogic.com/prince/demo/. This demo is fully featured but outputs the word Demo in an outline font across every page it creates. If you like it, you can purchase a copy from http://yeslogic.com/prince/purchasing/. This simple XML document represents a time: <?xml version="1.0" encoding="UTF-8"?> <!-- a time instant --> <time timezone="PST"> <hour>11</hour> <minute>59</minute> <second>59</second> <meridiem>p.m.</meridiem> <atomic signal="true" symbol="◑"/> </time> The CSS stylesheet provides detailed formatting information for it: time {font-size:40pt; text-align: center } time:before {content: "The time is now: "} hour {font-family: sans-serif; color: gray} hour:after {content: ":"; color: black} minute {font-family: sans-serif; color: gray} minute:after {content: ":"; color: black} second {font-family: sans-serif; color: gray} second:after {content: " "; color: black} meridiem {font-variant: small-caps} After downloading and installing Prince, open the application and follow these steps:
Figure 6-20 shows you time.pdf in Adobe Reader Version 6.0. Figure 6-20. time.pdf in Adobe Reader 6.0![]() Michael Fitzgerald |
< Day Day Up > |