Latest Articles:
Committee Members:
Alert Email
Get a short email alert whenever a new entry is published.
Confidential, secure it's piece of cake to keep uptodate.
CFDOCUMENT support
This week saw CFDOCUMENT added to Open BlueDragon. It is in an initial implementation in that it doesn't fully support all the attributes (currently fontEmbed, bookmark, scale, backgroundVisible, localUrl are not supported) and CFDOCUMENTITEM/CFDOCUMENTSECTION support are still to be implemented.
There is bags of functionality in there though that make CFDOCUMENT a very useful addition.
The implementation is based upon the latest version of xhtmlrenderer library (AKA The Flying Saucer project). As such, it benefits from the beautiful rendering it provides and the additional functionality it brings.
For example, you can use the custom css attribute '-fs-table-paginate' if you'd like tables that span multiple pages to repeat the table headers and footers on every page.
<cfdocument format="pdf">
<style>
table {
-fs-table-paginate: paginate;
}
</style>
<table>
<thead><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr></thead>
<tbody>
<cfloop from=1 to=150 index=i>
<cfoutput><tr><td>#i#a</td><td>#i#b</td><td>#i#c</td></tr></cfoutput>
</cfloop>
</tbody>
</table>
</cfdocument>
You can also work around the lack of CFDOCUMENTITEM support for now by specifying the header/footer in CSS.
<cfdocument format="pdf">
<style>
@page{
@top-center {
content: "This is the header";
}
@bottom-center {
content: "Page " counter(page) " of " counter(pages);
}
}
</style>
<h1>Header test</h1>
</cfdocument>
This is just a hint of some of the functionality that is provided in this new tag. As always, please try it out from our nightly builds and feedback is welcomed.
Comments (5)
Great job. How to get utf-8 characters, for east-european languages? example: č ć ž đ š
Great! This'll bring a 10 month cfml dev project one more step to completion! Hooray!
It certainly does :)
Excellent! :-) Tell me, does it properly support text-align:justify please? CF8 doesn't. Thanks.




There was an issue (see bug #111) which has now been fixed. Please try the latest build Aleksandar.