Prince
  • Buy Prince
  • Samples
  • Documentation
  • Forum
  • Download
  • Installation Guide
  • User Guide
  • Reference Guide

Contents

  • 1. Getting Started
    • Installing Prince
      • Installing Prince on Windows
      • Installing Prince on MacOS X
      • Installing Prince on Linux
        • Debian and Ubuntu
        • Redhat and CentOS
        • OpenSUSE
        • FreeBSD, Solaris and Generic Linux
      • Installing a license file
      • Installation Layout
        • Windows installation layout
        • MacOS X installation layout
        • Linux installation layout
    • Your First Document
      • The lab report
      • Processing the document
      • Styling the document
  • 2. Styling
    • Fonts
      • Defining a font family
      • Generic font families
      • OpenType Features in Prince
      • Redefining the generic font families
    • Layout
      • Text formatting
      • Paragraph formatting
      • Writing Mode
      • CSS Box Model
        • Margin
        • Padding
        • Border
        • Background
      • Tables
        • Automatic table layout
        • Fixed table layout
        • Separated table borders
        • Collapsing table borders
        • Cells that span columns
        • Cells that span rows
        • Numbering table rows
        • Running table headers and footers
        • Table captions
      • Lists
        • List marker position
        • List marker type
        • List marker style
      • Columns
      • Floats
        • Prince extensions to floats
      • Footnotes
        • Footnote calls
        • Footnote markers
        • Styling footnotes
    • Paged Media
      • Page size
      • Page style
      • Trimming marks
      • Page regions
        • Generated content in page regions
      • Selecting pages
        • Blank pages
      • Controlling pagination
        • Page breaks
        • Widows and orphans
  • 3. Scripting
    • JavaScript in Printed Media
    • Logging
    • Console access
    • Event handling
    • Document statistics
    • PDF properties
    • Unsupported DOM properties
  • 4. Graphics
    • Color
      • RGB
      • RGBA
      • CMYK
      • Spot colors
    • Color Management
      • Introduction
      • Color Management and PDF Profiles
      • Color Management in Prince
      • Color conversion
      • Rich black and true black
      • Page color space
    • Filters
    • Images
      • Images in XHTML
      • Images in DocBook
      • Images in Arbitrary XML
      • CSS and Images
        • Image Size in Print
    • Scalable Vector Graphics (SVG)
      • Viewbox and viewport
      • Rectangles
      • Circles
      • Ellipses
      • Lines
      • Masks
      • Polylines
      • Polygons
      • Paths
      • Text
      • Images
      • Links
      • Transformations
      • Style Properties
    • Rasterization
  • 5. Prince Tips and Tricks
    • Generated Content
      • Page headers and footers
      • List markers
      • Footnote markers
      • Before and After pseudo-elements
      • Counters and Numbering
        • Counter reset and increment
        • Nested counters
        • Counter styles
      • Cross-references
        • Using target-counter
        • Using target-content
      • Script Functions
        • Accessing the current date and time
        • User-defined counter styles
      • Using generated content in page regions
      • Copying text content from the document
      • Taking elements from the document
    • Advanced paged media examples
      • Named pages
      • Page groups
      • Page breaks and decoration
      • Printing wide content sideways
    • Hyphenation
    • Typographic Ligatures
    • Watermarks
    • Rotating content in table cells
    • The "Two-Pass" Solution
  • 6. Help
    • Troubleshooting
      • Missing glyphs or fonts
      • Fontconfig
      • Image formats
      • Shared library trouble
      • PATH issues
      • The capture/replay system
      • Running the debug script
    • Frequently Asked Questions
  • 7. Prince Input
    • Applying Style Sheets in Prince
      • Importing Style Sheets
      • Conflicting Declarations
      • Priority Determination
    • Applying JavaScript in Prince
    • XML Input
      • XML Input
        • Validation
        • xml:lang
        • xml:id
        • xml:base
      • XML Styling
      • XML Inclusions (XInclude)
        • Including XML files
        • Including text files
        • Fallback
  • 8. Prince Output
    • PDF Profiles
      • PDF/A
      • PDF/X
    • PDF Output Options
      • PDF Links
      • PDF Actions
      • PDF Pages
      • PDF Printing
      • PDF Compression
      • Font Embedding
      • Creating PostScript output
    • PDF Bookmarks
      • Bookmark levels
      • Bookmark labels
      • Bookmark targets
    • PDF Metadata
      • XMP Metadata
  • 9. Server Integration
    • Security and performance
    • Prince Wrappers
      • Third-Party Wrappers
      • Using Prince from Java
      • Using Prince from .NET with C#
      • Using Prince from .NET with VB.NET
      • Using Prince from Python
      • Using Prince from Perl
      • Using Prince from PHP
      • Using Prince from ASP
      • Using Prince from ColdFusion
      • Using Java
      • Using ActiveX/COM
      • Using Prince from ActiveX / COM / Visual Basic
    • Advanced Command Line Options
      • Prince Control Protocol
      • Structured Log

Reference Guide

  • A1. Command-line Reference
    • Examples
    • Specifying input and output
    • Options
      • General Options
      • Logging Options
      • Input Options
      • Network Options
      • JavaScript Options
      • CSS Options
      • PDF Output Options
      • PDF Metadata Options
      • PDF Encryption Options
      • Raster Output Options
      • Utility Options
      • Advanced Control and Log Options
  • A2. CSS References
    • CSS Features
    • Length Units
      • Absolute Length Units
      • Font Length Units
      • Pixel Unit
  • A3. CSS Properties
    • alternate-color
    • background
    • background-attachment
    • background-clip
    • background-color
    • background-image
    • background-origin
    • background-position
    • background-repeat
    • background-size
    • baseline-shift
    • border
    • border-bottom
    • border-bottom-color
    • border-bottom-left-radius
    • border-bottom-right-radius
    • border-bottom-style
    • border-bottom-width
    • border-clip
    • border-collapse
    • border-color
    • border-left
    • border-left-color
    • border-left-style
    • border-left-width
    • border-radius
    • border-right
    • border-right-color
    • border-right-style
    • border-right-width
    • border-spacing
    • border-style
    • border-top
    • border-top-color
    • border-top-left-radius
    • border-top-right-radius
    • border-top-style
    • border-top-width
    • border-width
    • bottom
    • box-decoration-break
    • box-sizing
    • caption-side
    • clear
    • clip
    • clip-path
    • clip-rule
    • color
    • column-break-after
    • column-break-before
    • column-count
    • column-fill
    • column-gap
    • column-rule
    • column-rule-color
    • column-rule-style
    • column-rule-width
    • column-span
    • column-width
    • columns
    • content
    • counter-increment
    • counter-reset
    • direction
    • display
    • dominant-baseline
    • empty-cells
    • fill
    • fill-opacity
    • fill-rule
    • filter
    • float
    • font
    • font-family
    • font-size
    • font-stretch
    • font-style
    • font-variant
    • font-weight
    • footnote-display
    • footnote-style-position
    • height
    • hyphens
    • left
    • letter-spacing
    • line-height
    • line-stacking-strategy
    • list-style
    • list-style-image
    • list-style-position
    • list-style-type
    • margin
    • margin-bottom
    • margin-inside
    • margin-left
    • margin-outside
    • margin-right
    • margin-top
    • marker-end
    • marker-mid
    • marker-start
    • marks
    • mask
    • max-height
    • max-width
    • min-height
    • min-width
    • opacity
    • orphans
    • overflow
    • overflow-wrap
    • padding
    • padding-bottom
    • padding-left
    • padding-right
    • padding-top
    • page
    • page-break-after
    • page-break-before
    • page-break-inside
    • position
    • prince-background-image-resolution
    • prince-bleed
    • prince-bookmark-label
    • prince-bookmark-level
    • prince-bookmark-state
    • prince-bookmark-target
    • prince-caption-page
    • prince-fallback-cmyk-profile
    • prince-filter-resolution
    • prince-flow
    • prince-footnote-policy
    • prince-forced-breaks
    • prince-hyphenate-after
    • prince-hyphenate-before
    • prince-hyphenate-character
    • prince-hyphenate-lines
    • prince-hyphenate-patterns
    • prince-image-magic
    • prince-image-resolution
    • prince-linebreak-magic
    • prince-link
    • prince-mark-length
    • prince-mark-offset
    • prince-mark-width
    • prince-page-group
    • prince-pdf-color-conversion
    • prince-pdf-color-options
    • prince-pdf-destination
    • prince-pdf-duplex
    • prince-pdf-link-type
    • prince-pdf-open-action
    • prince-pdf-output-intent
    • prince-pdf-page-colorspace
    • prince-pdf-page-label
    • prince-pdf-page-layout
    • prince-pdf-page-mode
    • prince-pdf-paper-tray
    • prince-pdf-print-scaling
    • prince-pdf-profile
    • prince-pdf-script
    • prince-pdf-xmp
    • prince-rotate-body
    • prince-shrink-to-fit
    • prince-text-justify
    • prince-text-replace
    • prince-tooltip
    • prince-trim
    • prince-wrap-inside
    • right
    • size
    • src
    • stop-color
    • stop-opacity
    • string-set
    • stroke
    • stroke-dasharray
    • stroke-dashoffset
    • stroke-linecap
    • stroke-linejoin
    • stroke-miterlimit
    • stroke-opacity
    • stroke-width
    • table-baseline
    • table-column-span
    • table-layout
    • table-row-span
    • text-align
    • text-align-last
    • text-anchor
    • text-decoration
    • text-indent
    • text-line-through
    • text-line-through-color
    • text-line-through-style
    • text-overflow
    • text-overline
    • text-overline-color
    • text-overline-style
    • text-transform
    • text-underline
    • text-underline-color
    • text-underline-style
    • top
    • transform
    • transform-origin
    • unicode-bidi
    • unicode-range
    • vertical-align
    • visibility
    • white-space
    • widows
    • width
    • word-break
    • word-spacing
    • writing-mode
    • z-index
  • A4. CSS Selectors
    • Terminology and Definitions
    • Logical Combinations
    • Elemental Selectors
    • Attribute Selectors
    • Linguistic Pseudo-classes
    • Location Pseudo-classes
    • Tree-Structural pseudo-classes
    • Combinators
    • Tree-Abiding Pseudo-element Selectors
    • Typographic Pseudo-element Selectors
    • Footnote Pseudo-element Selectors
    • Page Selectors
  • A5. CSS Media Queries
    • Media Queries
    • Media Query Modifiers
    • Media Types
    • Media Features
    • Dimension Media Features
    • Display Quality Media Features
    • Color Media Features
    • Interaction Media Features
    • Scripting Media Features
  • A6. CSS Functional Expressions
    • CSS Functions
    • Prince Specific Functions
  • A7. CSS At-rules
    • Initial At-Rules
    • Nested At-Rules
  • A8. Page Size Keywords
  • A9. Character Entities
    • Accented Letters
    • Symbols
    • Quotes
    • Accents
    • Miscellaneous
  • A10. Acknowledgements

Character Entities

Character entities are a method of including arbitrary characters in XML documents by referencing their UNICODE number rather than writing them directly. CSS has a similar mechanism to include special characters.

This can be convenient when you wish to include characters such as smart quotes, symbols or mathematical operators that do not exist in the character encoding that you are using for your XML documents (such as ASCII or ISO-8859-1 "Latin-1"), or when you want to insert some of these characters into the final layout by means of CSS.

Here is an example of including smart quotes in an XML document using character entities:

XML

<p>
These are &#x201C;smart quotes&#x201D; to be precise.
</p>

Output

These are “smart quotes” to be precise.

A typical usecase for CSS is the prince-text-replace property, which replaces a certain character string with another one. In the sample "Reconstructed Essay" (HTML - PDF), the property is used to replace occurrences of "s" with the "long s" to recreate the original printed book.

CSS

body {
  prince-text-replace: "s" "\017F";
}

The tables below are a quick reference for some commonly requested UNICODE characters, expressed in XML and CSS notation; for everything else please consult the UNICODE code charts.

Accented Letters

XML CSS Character Name
&#xC0; \C0 À A grave
&#xC1; \C1 Á A acute
&#xC2; \C2 Â A circumflex
&#xC3; \C3 Ã A tilde
&#xC4; \C4 Ä A dieresis
&#xC5; \C5 Å A ring
&#xC7; \C7 Ç C cedilla
&#xC8; \C8 È E grave
&#xC9; \C9 É E acute
&#xCA; \CA Ê E circumflex
&#xCB; \CB Ë E dieresis
&#xCC; \CC Ì I grave
&#xCD; \CD Í I acute
&#xCE; \CE Î I circumflex
&#xCF; \CF Ï I dieresis
&#xD1; \D1 Ñ N tilde
&#xD2; \D2 Ò O grave
&#xD3; \D3 Ó O acute
&#xD4; \D4 Ô O circumflex
&#xD5; \D5 Õ O tilde
&#xD6; \D6 Ö O dieresis
&#xD8; \D8 Ø O slash
&#xD9; \D9 Ù U grave
&#xDA; \DA Ú U acute
&#xDB; \DB Û U circumflex
&#xDC; \DC Ü U dieresis
&#x0178; \0178 Ÿ Y dieresis
&#xE0; \E0 à a grave
&#xE1; \E1 á a acute
&#xE2; \E2 â a circumflex
&#xE3; \E3 ã a tilde
&#xE4; \E4 ä a dieresis
&#xE5; \E5 å a ring
&#xE7; \E7 ç c cedilla
&#xE8; \E8 è e grave
&#xE9; \E9 é e acute
&#xEA; \EA ê e circumflex
&#xEB; \EB ë e dieresis
&#xEC; \EC ì i grave
&#xED; \ED í i acute
&#xEE; \EE î i circumflex
&#xEF; \EF ï i dieresis
&#x0131; \0131 ı dotless i
&#xF1; \F1 ñ n tilde
&#xF2; \F2 ò o grave
&#xF3; \F3 ó o acute
&#xF4; \F4 ô o circumflex
&#xF5; \F5 õ o tilde
&#xF6; \F6 ö o dieresis
&#xF8; \F8 ø o slash
&#xF9; \F9 ù u grave
&#xFA; \FA ú u acute
&#xFB; \FB û u circumflex
&#xFC; \FC ü u dieresis
&#xFF; \FF ÿ y dieresis

Symbols

XML CSS Character Name
&#x2022; \2022 • bullet
&#xA2; \A2 ¢ cent
&#xA9; \A9 © copyright
&#xA4; \A4 ¤ currency
&#x2020; \2020 † dagger
&#xB0; \B0 ° degree
&#xF7; \F7 ÷ divide
&#x2021; \2021 ‡ double dagger
&#x0192; \0192 ƒ florin
&#x2044; \2044 ⁄ fraction
&#xA1; \A1 ¡ inverted exclamation
&#xBF; \BF ¿ inverted question
&#xB5; \B5 µ micro
&#xB7; \B7 · middle dot
&#xAC; \AC ¬ not
&#xAA; \AA ª ordfeminine
&#xBA; \BA º ordmasculine
&#xB6; \B6 ¶ paragraph
&#x2030; \2030 ‰ perthousand
&#xB1; \B1 ± plusminus
&#xAE; \AE ® registered
&#xA7; \A7 § section
&#xA3; \A3 £ sterling
&#x2122; \2122 ™ trademark
&#xA5; \A5 ¥ yen

Quotes

XML CSS Character Name
&#x2018; \2018 ‘ left single quote
&#x2019; \2019 ’ right single quote
&#x201C; \201C “ left double quote
&#x201D; \201D ” right double quote
&#x2039; \2039 ‹ left single guillemet
&#x203A; \203A › right single guillemet
&#xAB; \AB « left double guillemet
&#xBB; \BB » right double guillemet
&#x201A; \201A ‚ base single quote
&#x201E; \201E „ base double quote

Accents

XML CSS Character Name
&#xB4; \xB4 ´ acute
&#x02D8; \x02D8 ˘ breve
&#x02C7; \x02C7 ˇ caron
&#xB8; \xB8 ¸ cedilla
&#x5E; \x5E ^ circumflex
&#xA8; \xA8 ¨ dieresis
&#x02D9; \x02D9 ˙ dot accent
&#x02DD; \x02DD ˝ double acute
&#xAF; \xAF ¯ macron
&#x02DB; \x02DB ˛ ogonek
&#x02DA; \x02DA ˚ ring
&#x02DC; \x02DC ˜ tilde

Miscellaneous

XML CSS Character Name
&#x2026; \x2026 … ellipsis
&#x2014; \x2014 — em dash
&#x2013; \x2013 – en dash
&#xFB01; \xFB01 fi fi ligature
&#xFB02; \xFB02 fl fl ligature
&#xA0; \xA0   non-breaking space
&#xC6; \xC6 Æ AE
&#xE6; \xE6 æ ae
&#x0152; \x0152 Œ OE
&#x0153; \x0153 œ oe
&#xDF; \xDF ß sharp s
Copyright © 2002 – 2019 YesLogic Pty. Ltd.
  • About Us
  • Privacy Policy
  • Contact Us