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 (<fo:region-*>) PDF FO
Creating regions in a body region, combination of columns, footnotes and floats (<fo:float>, <fo:footnote>, column) PDF FO
Writing direction in the region-start/end (writing-mode, reference-orientation) PDF FO
Switching between right and left page layouts (<fo:page-sequence-master>) PDF FO
Multi columns (column-count) PDF FO
Footnote (<fo:footnote>) PDF FO
Change bar (<fo:change-bar-*>) PDF FO
AH Formatter Extended Specification
Spread page master (<axf:spread-page-master>, <axf:spread-region>) PDF FO
Setting a background color to the entire page (background-color) PDF FO
Setting an image to the background page (background-image) PDF FO
Scaling the background image (axf:background-content-height) PDF FO
Specify the border to the region (<fo:region-*>, border-*) PDF FO
Nested fo:page-sequence (<fo:page-sequence>) PDF FO
Column rule (axf:column-rule) PDF FO
Footnote arrangement (<fo:footnote>, axf:footnote-stacking) 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
Footnote arrangement in the column document (axf:footnote-position) PDF FO
Sidenote (axf:footnote-position) PDF FO

Float examples

Placing a float in any positions.

XSL Standard Specification
Side float (<fo:float>) PDF FO
AH Formatter Extended Specification
Page floats (<fo:float>, axf:float-reference, axf:float-x, axf:float-y) PDF FO
Multi-column float examples (<fo:float>, axf:float-reference, axf:float-x, axf:float-y) PDF FO
Column float examples (<fo:float>, axf:float-reference, axf:float-x, axf:float-y) PDF FO
Side floats (<fo:float>, axf:float-x) PDF FO

Ruby and emphasis marks

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

AH Formatter Extended Specification
Ruby (<axf:ruby>, <axf:ruby-base>, <axf:ruby-text>) PDF FO
Ruby in vertical mode (<axf:ruby>, <axf:ruby-base>, <axf:ruby-text>) PDF FO
Ruby alignment (<axf:ruby>, axf:ruby-align) PDF FO
How ruby overhangs text (<axf:ruby>, axf:ruby-overhang) PDF FO
Ruby and emphasis marks (<axf:ruby>, axf:text-emphasis-style) PDF FO

Graphics

Importing external images, watermarks in SVG, etc.

XSL Standard Specification
Loading external graphics (<fo:external-graphic>) PDF FO
Arranging the graphics to the drawing area automatically (scale-to-fit) PDF FO
Scalable Vector Graphics (SVG) (<fo:external-graphic>, SVG) PDF FO
Displaying CGM Graphics (<fo:external-graphic>, CGM) PDF FO
Encapsulated PostScript (EPS) graphics (<fo:external-graphic>, EPS) PDF FO
MathML Samples (<math>) PDF FO
MathML rendering of menclose notation=”circle” and pseudo script (<math>, pseudoScripts, encloseCircle) PDF FO
AH Formatter Extended Specification
Example of watermark using SVG (background-image, SVG) PDF FO
Gradient (background-image, linear-gradient, radial-gradient) PDF FO

Barcode

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

AH Formatter Extended Specification
Barcode (<fo:external-graphic>, data:application/vnd.ah-barcode) PDF FO
Barcode color and quiet zone (<fo:external-graphic>, data:application/vnd.ah-barcode, color, qz) PDF FO

Other

XSL Standard Specification
Avoiding fo:table-row overflow due to keep-together.within-*=”always” (keep-together.within-page, keep-together.within-column) PDF FO
AH Formatter Extended Specification
Float move examples (axf:float-move) PDF FO

Character size, weight and decoration

Font size, style and text decoration, etc.

XSL Standard Specification
Font size (font-size) PDF FO
Font-stretch (font-stretch) PDF FO
Character style (font-weight, font-style, baseline-shift, text-decoration, border-style, color, background-color) PDF FO
Text shadow (text-shadow) PDF FO
White space and line breaks in program code (font-family, monospace, white-space) PDF FO
Changing the capitalization of text (text-transform) PDF FO
Glyph Orientation (glyph-orientation-*) PDF FO
AH Formatter Extended Specification
Specifying Japanese font face variants (font-variant, font-variant-east-asian) PDF FO
Additional fonts with axf:font-face (axf:font-face) PDF FO
Character string substitution (axf:text-replace) PDF FO

Line

XSL Standard Specification
Line height (line-height) PDF FO
Text alignment in the block (text-align) PDF FO
Letter spacing (letter-spacing) PDF FO
AH Formatter Extended Specification
Specifying the amount of space between the punctuation and digit in European Typography (<axf:space-*-punctuation>, <axf:space-between-*-and-*>) PDF FO
Pair Kerning in Alphabets (axf:kerning-mode) PDF FO
Ligatures in Alphabets (axf:ligature-mode) PDF FO
Space between Japanese and Western languages (ideograph-numeric, ideograph-alpha, ideograph-parenthesis) PDF FO
Trimming Japanese texts (axf:text-justify-trim) PDF FO
Hanging punctuation at the start / end of line (axf:hanging-punctuation) PDF FO
Non-starter Japanese character (axf:line-break) PDF FO
Trimming Japanses full-width punctuations (axf:punctuation-trim) PDF FO
Trimming the space between full-width punctuation and full-width character (axf:punctuation-spacing) PDF FO
Hyphenation of hyphenated words (axf:hyphenate-hyphenated-word) PDF FO
Specifying the character count and zone of the word to be hyphenated (axf:hyphenation-minimum-character-count, axf:hyphenation-zone) PDF FO
Adding hyphenation information (axf:hyphenation-info) PDF FO
Controlling line breaking at abbreviations (axf:abbreviation-character-count) PDF FO
Example of line number (axf:line-number) PDF FO
Independent line numbering in table columns (axf:line-number) PDF FO
Example of line number orientation (axf:line-number-orientation) PDF FO
Line continued mark (axf:line-continued-mark) PDF FO
Tabs (<axf:tab>, <axf:tab-*>) PDF FO

Block attributes and arrangement

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

XSL Standard Specification
Creating optional spaces around text inside a block (start-indent, end-indent, border-*, margin-*, padding) PDF FO
Adding spaces between blocks (space-before, space-after) PDF FO
Border Style and Border Width (border-style, border-width) PDF FO
Place adjacent blocks in the same page (keep-with-next.within-column) PDF FO
Place continuous blocks on the same page (keep-together.within-page, keep-together.within-column) PDF FO
Absolute positioning of a block container (<fo:block-container>, absolute-position) PDF FO
Position and size of a block container (<fo:block-container>, inline-progression-dimension, block-progression-dimension) PDF FO
Overflow examples (overflow) PDF FO
List Example (<fo:list-block>, <fo:list-item>, <fo:list-item-label>, <fo:list-item-body>, provisional-label-separation, provisional-distance-between-starts, label-end(), body-start()) PDF FO
AH Formatter Extended Specification
Border extensions for rounded corners (axf:border-radius) PDF FO
Drawing a diagonal border (axf:diagonal-border, axf:reverse-diagonal-border) PDF FO
Thickness of double-border lines (border-style, axf:border-double-thickness) PDF FO
Generating wavy borders (border-style, axf:border-wave-form) PDF FO
Box shadow (axf:box-shadow) PDF FO
fo:block-container with multiple columns (<fo:block-container>, axf:column-count, axf:column-gap, axf:column-rule) PDF FO
Text alignment in vertical direction (display-align, justify) PDF FO
Overflow extension (overflow, axf:overflow-replace, axf:overflow-condense) PDF FO
Rendering where inline content overflows (overflow, axf:text-overflow) PDF FO
Block transformation (axf:transform, axf:transform-origin) PDF FO
Line grid (axf:baseline-grid, axf:baseline-block-snap) PDF FO

Table attributes and arrangement

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

XSL Standard Specification
Table alignment (<fo:table-and-caption>, text-align) PDF FO
Padding and border in a table (<fo:table-cell>, border-*) PDF FO
Column width (<fo:table>, inline-progression-dimension) PDF FO
Column span & row span (number-*-spanned) PDF FO
Outputting table header and footer repeatedly (table-omit-*-at-break) PDF FO
Controlling a page break in a table row (<fo:table-row>, keep-together.within-page) PDF FO
Text aligment in a table cell (<fo:table-cell>, display-align) PDF FO
Text alignment with text-align=”<string>” (axf:text-align-string) PDF FO
Adding a “continued” indicator when a table is split (<fo:retrieve-table-marker>) PDF FO
Rotating table (<fo:block-container>, reference-orientation) PDF FO
Combining various table features (<fo:table>) PDF FO
AH Formatter Extended Specification
Omitting table header/footer at a column break (table-omit-*-at-break) PDF FO
Content of a table cell split by a page break (axf:table-cell-repeated-marker) PDF FO

Page number, marker, etc.

XSL Standard Specification
Page numbers (<fo:page-number>) PDF FO
Page number format and initial page number (initial-page-number, format) PDF FO
Table of contents (<fo:page-number-citation>) PDF FO
Thumb index (<fo:marker>, <fo:retrieve-marker>) PDF FO
Index (<fo:index-key>, <fo:index-page-citation-list>, <fo:index-key-reference>) PDF FO
AH Formatter Extended Specification
Relative page numbers (<fo:page-number>, <fo:page-number-citation-last>, axf:origin-id) PDF FO
Page numbers with mixed horizontal and vertical pages (axf:reverse-page-number, axf:reverse-page) PDF FO
Counter styles (axf:counter-style) PDF FO

Color; Gray scale, CMYK

AH Formatter Extended Specification
Grayscale rendering with rgb-icc() (rgb-icc, #Grayscale) PDF FO
Drawing color by rbg-icc (rgb-icc, #CMYK) PDF FO
PANTONE® spot colors with rgb-icc() (rgb-icc, PANTONE, #Separation) PDF FO

Formatting multi-languages

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

XSL Standard Specification
Writing direction in vertical mode (writing-mode) PDF FO

Features for PDF Creation

Bookmarks, links, annotations, etc.

XSL Standard Specification
PDF Bookmarks (<fo:bookmark-tree>, <fo:bookmark>) PDF FO
Links in PDF (<fo:basic-link>) PDF FO
AH Formatter Extended Specification
Link settings with a destination type specified (axf:destination-type) PDF FO
Annotations in PDF document (axf:annotation-*) PDF FO
Keeping the annotation in the embedded PDF (import-annotation-types) PDF FO
Embedding multi media in PDF (<fo:external-graphic>, content-type) PDF FO
Rich Media Annotations (<fo:external-graphic>, axf:multimedia-treatment, content-type) PDF FO
Printer Marks (axf:printer-marks, axf:crop-offset, axf:bleed) PDF FO
Overprint (axf:overprint) PDF FO


Misc

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
Form 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