Comprehensive XSL-FO Tutorials and Samples Collection

Antenna House is used in production in various industries with a wide range of requirements. Here are some examples of what you can do with Formatter: auto manual, annual report, forms & instructions .

Need more examples? Check out a real live case with Formatter creating documents in real time.

Page region and structure

Page region, width and height, columns, footnote, etc.

XSL Standard Specification
Explaining each region in a page (region-*) PDF FO
Creating regions in a body region, combination of columns, footnotes and floats PDF FO
Writing mode setting in fo:region-start and fo:region-end (writing-mode, reference-orientation) PDF FO
Switching the layout in facing pages automatically (page-sequence-master) PDF FO
Footnote setting (footnote) PDF FO
Column count setting (column-count) PDF FO
Change bar setting(change-bar) PDF FO
AH Formatter Extended Specification
Filling a color in the entire page (background-color) PDF FO
Specifying a background image to the entire page (background-image) PDF FO
Scaling the background image to fit into the area PDF FO
Specifying the border to the region (region-* border-*) PDF FO
Column rule setting (axf:column-rule) PDF FO
Footnote arrangement (axf:footnote-stacking) PDF FO
Footnote arrangement in the column document (axf:footnote-position) PDF FO
Creating a footnote number and specifying a default value ( axf:footnote-number) PDF FO
Suppressing duplicate footnotes within the same page (axf:suppress-duplicate-footnote) PDF FO
A footnote breaking across multiple pages (axf:footnote-max-height) PDF FO
Sidenote setting (axf:footnote-position=”outside”) PDF FO
Line continued mark (axf:line-continued-mark) PDF FO
Line number setting (axf:line-number) PDF FO
Adding independent line numbers for each paragraph (axf:line-number) PDF FO
Rotating line number orientation for vertical writing (axf:line-number-orientation) PDF FO

Character size, weight and decoration

Font size, style and text decoration, etc.

XSL Standard Specification
Font size setting (font-size) PDF FO
Character style setting (font-style、border-style etc.) PDF FO
Font stretch setting (font-stretch) PDF FO
Glyph Orientation in horizontal and vertical writing (glyph-orientation) PDF FO
Preserving white space in the program source code (white-space) PDF FO
Applying upper case, lower case to the entire letters automatically (text-transform) PDF FO

Block attributes and arrangement

Block arrangement, text alignment and direction within the block, border display, etc.

XSL Standard Specification
Setting the border style and border width (border-*-style) PDF FO
Text alignment in the block (text-align) PDF FO
Adding spaces between blocks (space-*) PDF FO
Adding spaces around the text inside the block (indent、border、padding) PDF FO
Line height (line-height) PDF FO
Letter spacing (letter-spacing) PDF FO
Placing adjacent blocks in the same page (keep-with-next) PDF FO
Placing continuous blocks on the same page (keep-together) PDF FO
Setting the position and size of the block container with absolute value (block-container) PDF FO
Other settings of the position and size of the block container
(block-container, inline-progression-dimension, block-progression-dimension etc.)
Writing direction in vertical mode for the entire page or a part of page (block/writing-mode) PDF FO
List example (list-block) PDF FO
Setting example when text cannot fit in the range (overflow) PDF FO
AH Formatter Extended Specification
Replacing text (axf:text-replace) PDF FO
Text alignment in vertical direction (display-align=”justify”) PDF FO
Specifying multi-column and column rule for fo:block-containerfo:block-container (axf:column-*) PDF FO
Adjusting text style, size and line space when text cannot fit in the range (axf:overflow) PDF FO
Specifying the minimum character count to be regarded as an abbreviation to avoid the line break between abbreviations (axf:abbreviation-character-count) PDF FO
Hyphenation for a hyphenated word (axf:hyphenate-hyphenated-word) PDF FO
Specifying the minimum character count and end of line zone to be hyphenated (axf:hyphenation-minimum-character-count, axf:hyphenation-zone) PDF FO
Adding hyphenation info (word) to be hyphenated (axf:hyphenation-info) PDF FO
Radius border as a border extension (axf:border-radius) PDF FO
Diagonal border as a border extension (axf-diagonal-border-*) PDF FO
Box shadow setting (axf:box-shadow) PDF FO
Text shadow setting (text-shadow) PDF FO
Block area transformation (axf:transform) PDF FO

Table attributes and arrangement

Table column, span, text position in a cell, etc.

XSL Standard Specification
Column width setting (inline-progression-dimension) PDF FO
Column span / row span setting (number-*-spanned) PDF FO
Padding and border in a table (table-cell border-*) PDF FO
Text alignment in a table cell (table-cell display-align=”*”) PDF FO
Aligning the entire table to center right and left (table-and-caption) PDF FO
Balance sheet by combining various table features PDF FO
Outputting table header and footer repeatedly or not (table-omit-*-at-break) PDF FO
Specifying whether page breaks in a table row or not (table-row keep-together.within-page=”always”) PDF FO
Rotating the entire table (block-container reference-orientation=”*”) PDF FO
AH Formatter Extended Specification
Omitting a table header/ footer of multi-columns (table-omit-*-at-break=”column”) PDF FO
Aligning the whole text that includes decimal points to the left or centered (axf:text-align-string) PDF FO
Specifying the cell contents split by a page break (axf:table-cell-repeated-marker) PDF FO

Page number, marker, etc.

XSL Standard Specification
Adding page numbers (page-number) PDF FO
Creating a table of contents (page-number-citation) PDF FO
Page number format and initial page number (format, initial-page-number) PDF FO
Thumb Index (marker, retrieve-marker) PDF FO

Color; Gray scale, CMYK

XSL Standard Specification
Drawing gray scale by rgb-icc (rgb-icc(R, G, B, #GrayScale, Value)) PDF FO
Drawing CMYK by rgb-icc rgb-icc (rgb-icc(R,G,B,#CMYK,Value)) PDF FO

Formatting multi-languages

Formatting multi-languages, ligature, pair kerning, non-starter character, punctuation, etc.

AH Formatter Extended Specification
Formatting multi-languages(xml:lang=”*”) PDF FO
Spacing before and after punctuation, between punctuations and digits (axf:space-after-punctuation, axf:space-before-punctuation, axf:space-between-digit-and-punctuation, axf:space-between-punctuation-and-digit) PDF FO
Non-starter Japanese character (axf:line-break=”strict”) PDF FO
Trimming the full-width punctuations (axf:punctuation-trim) PDF FO
Trimming the space between full-width punctuation and full-width character(axf:punctuation-spacing) PDF FO
Example of trimming Japanese text (axf:text-justify-trim) PDF FO
Hanging punctuation at the start /end of line (axf:hanging-punctuation) PDF FO
Pair Kerning in Alphabets (axf:kerning-mode) PDF FO
Ligatures in Alphabets (axf:ligature-mode) PDF FO
Spacing between Japanese and Western languages (ideograph-numeric, ideograph-alpha, ideograph-parenthesis) PDF FO

Features for PDF Creation

Bookmarks, links, annotations, etc.

XSL Standard Specification
External / Internal Links in PDF (basic-link) PDF FO
Bookmarks in PDF (bookmark-tree, bookmark) PDF FO
AH Formatter Extended Specification
Example of Document Information embedded into PDF (axf:document-info) PDF FO
Annotations in PDF (axf:annotation-*) PDF FO
Example of embedding multimedia in PDF (external-graphic, content-type, etc.) PDF FO
Example of keeping the annotation in the embedded PDF (import-annotation-types) PDF FO
Layer in PDF output PDF (axf:layer-settings, axf:layer) PDF FO
Configuration example of a form field (axf: form, axf: form-field) PDF FO
Printer marks (axf:printer-marks, axf:crop-offset, axf:bleed) PDF FO

Float examples

Placing a float in any positions.

XSL Standard Specification
Side float settings (float=”start”, float=”end”) PDF FO
AH Formatter Extended Specification
Arranging floats in any positions in a page (axf:float-reference=”page”) PDF FO
Arranging floats within multi-column document (axf:float-reference=”multicol”) PDF FO
Arranging floats within a column document (axf:float-reference=”column”) PDF FO

Ruby and emphasis marks

Mono-ruby, group-ruby, jyukugo-ruby, emphasis mark, etc.

AH Formatter Extended Specification
Example of ruby (axf:ruby, axf:ruby-base, axf:ruby-text) PDF FO
Example of ruby in vertical mode (axf:ruby, axf:ruby-base, axf:ruby-text) PDF FO
Example of ruby and emphasis marks together (axf:text-emphasis-style) PDF FO


Importing external images, watermarks in SVG, etc.

XSL Standard Specification
Loading external graphics (external-graphic) PDF FO
Example of scaling a graphics to fit into the region (scale-to-fit) PDF FO
Example of watermark using SVG (background-image=”./*.svg”) PDF FO
Gradient (linear-gradient, radial-gradient) PDF FO

MathML expression

Rendering mathematical expression

MathML 3.0 samples PDF FO


It is necessary to purchase AH Formatter Barcode Generator Option to use this feature.

AH Formatter Extended Specification
Barcode output example (external-graphic src=”data:application/vnd.ah-barcode;type=*) PDF FO

Download all samples: Zip File


Extra examples

Cell repeat marker PDF FO
Document info PDF FO
Open Action Zoom PDF FO
Float in change bar PDF FO
Font from url PDF FO
Footnote PDF FO
Formatter configuration in FO PDF FO
Hyphenation configuration in FO PDF FO
Outline and mutli volume PDF FO
Punctuation spacing PDF FO
Text Transform PDF FO
Table omit header and table omit footer PDF FO
Overflow PDF FO
Leader alignment PDF FO
Internal Destination PDF FO
Format PDF FO
Force page count PDF FO
Font variant PDF FO
Font stretch PDF FO
Font size adjust PDF FO
Display align PDF FO
Border style PDF FO
Download all misc samples: Zip File

Advanced Forms

Dynamic content change (axf:document-info, axf:form, axf:form-field ) PDF FO