SVG Conformance

AH Formatter V7.1 conforms to W3C Scalable Vector Graphics (SVG) 1.1 and supports to display SVG images with a newly developed engine. This makes it possible to output high quality SVG images as vectors in the PDF. See also Graphics to learn how to utilize SVG.

The below table shows the implemented SVG elements. They are implemented focusing on basic drawing elements.

  • [yes] in the list means that the element or property is implemented.
  • [partial] means that the element or property is partially implemented.
  • [no] means not implemented.
ElementAttributeConditionComments
5.1 <svg> yes xmlns="http://www.w3.org/2000/svg"
version no When SVG is referenced in upper XML such as FO or HTML, the following properties specified in upper XML is inherited.
  • font-family
  • font-size
  • font-weight
  • font-style
x yes
y yes
width yes
height yes
viewBox yes
preserveAspectRatio yes
zoomAndPan no
baseProfile no
contentScriptType no
contentStyleType yes
class yes
style yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
5.2 <g> yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
5.3 <defs> yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
5.4 <desc> yesIgnored.
class yes
style yes
Core Attributes
5.4 <title> yesIgnored.
class yes
style yes
Core Attributes
5.5 <symbol> yes
viewBox yes
preserveAspectRatio yes
class yes
style yes
Core Attributes
Presentation Attributes
5.6 <use> yes
x yes
y yes
width yes
height yes
class yes
style yes
transform yes
xlink:href yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
5.7 <image> yes
x yes[defer] in preserveAspectRatio is ignored.
y yes
width yes
height yes
preserveAspectRatio yes
class yes
style yes
transform yes
xlink:href yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
5.8.2 <switch> partial
class yes The child element which has the requiredFeatures or the requiredExtensions attribute is ignored.
The child element with the systemLanguage attribute that matches to the language of running environment, or the first element which doesn't have the systemLanguage attribute is effective.
When the systemLanguage attribute matches to the xml:lang property and the language attribute in XSL-FO, it will take priority over the operating system language.
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
6.10 <style> yes
type yesSupports type="text/css" only.
media no
title no
Core Attributes
8.2 <path> yes
d yes
pathLength yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.2 <rect> yes
x yes
y yes
width yes
height yes
rx yes
ry yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.3 <circle> yes
cx yes
cy yes
r yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.4 <ellipse> yes
cx yes
cy yes
rx yes
ry yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.5 <line> yes
x1 yes
y1 yes
x2 yes
y2 yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.6 <polyline> yes
points yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
9.7 <polygon> yes
points yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
10.4 <text> yes
x yes
y yes
dx yes
dy yes
rotate yes
textLength yes
lengthAdjust no
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
10.5 <tspan> yes
x yes
y yes
dx yes
dy yes
rotate yes
textLength yes
lengthAdjust no
class yes
style yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
10.6 <tref> yes
xlink:href yes
class yes
style yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
10.13.2 <textPath> no
10.14 <altGlyph> no
10.14 <altGlyphDef> no
10.14 <altGlyphItem> no
10.14 <glyphRef> no
11.6.2 <marker> yes
markerUnits yes
refX yes
refY yes
markerWidth yes
markerHeight yes
orient yes
viewBox yes
preserveAspectRatio yes
class yes
style yes
Core Attributes
Presentation Attributes
12.3.3 <color-profile> no
13.2.2 <linearGradient> yes
gradientUnits yes
gradientTransform yes
x1 yes
y1 yes
x2 yes
y2 yes
spreadMethod yes
xlink:href yes
class yes
style yes
Core Attributes
Presentation Attributes
13.2.3 <radialGradient> yes
gradientUnits yes
gradientTransform yes
cx yes
cy yes
r yes
fx yes
fy yes
spreadMethod yes
xlink:href yes
class yes
style yes
Core Attributes
Presentation Attributes
13.2.4 <stop> yes
offset yes
class yes
style yes
Core Attributes
Presentation Attributes
13.3.3 <pattern> yes
patternUnits yes
patternContentUnits yes
patternTransform yes
x yes
y yes
width yes
height yes
viewBox yes
preserveAspectRatio yes
xlink:href yes
class yes
style yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
14.3.5 <clipPath> yes
clipPathUnits yes
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
14.4 <mask> no
15.3 <filter> no
15.8.2 <feDistantLight> no
15.8.3 <fePointLight> no
15.8.4 <feSpotLight> no
15.9 <feBlend> no
15.10 <feColorMatrix> no
15.11 <feComponentTransfer> no
15.11 <feFuncR> no
15.11 <feFuncG> no
15.11 <feFuncB> no
15.11 <feFuncA> no
15.12 <feComposite> no
15.13 <feConvolveMatrix> no
15.14 <feDiffuseLighting> no
15.15 <feDisplacementMap> no
15.16 <feFlood> no
15.17 <feGaussianBlur> no
15.18 <feImage> no
15.19 <feMerge> no
15.19 <feMergeNote> no
15.20 <feMorphology> no
15.21 <feOffset> no
15.22 <feSpecularLighting> no
15.23 <feTile> no
15.24 <feTurbulence> no
16.8.3 <cursor> no
17.1 <a> partial
target noFor xlink:href, you can also specify a format such as #nameddest=Chapter6 in Making Link. Hot spots are made rectangular. It does not function in GUI.
xlink:href yes
xlink:show no
xlink:actuate no
class yes
style yes
transform yes
Core Attributes
Conditional Processing Attributes
Presentation Attributes
17.3.3 <view> no
viewBox no
preserveAspectRatio no
zoomAndPan no
viewTarget no
Core Attributes
18.2 <script> no
19.2.10 <animate> no
19.2.11 <set> no
19.2.12 <animateMotion> no
19.2.12 <mpath> no
19.2.13 <animateColor> no
19.2.14 <animateTransform> no
20.3 <font> no
20.4 <glyph> no
20.5 <missing-glyph> no
20.7 <hkern> no
20.7 <vkern> no
20.8.3 <font-face> no
20.8.3 <font-face-src> no
20.8.3 <font-face-uri> no
20.8.3 <font-face-format> no
20.8.3 <font-face-name> no
20.8.3 <definition-src> no
21.2 <metadata> no
23.3 <foreignObject> no
Core Attributes
id yes
xml:base no
xml:lang no
xml:space yes
Conditional Processing Attributes
requiredFeatures no
requiredExtensions no
systemLanguage yes
Presentation Attributes
writing-mode yes
glyph-orientation-vertical no
glyph-orientation-horizontal no
direction yes
unicode-bidi yes
text-anchor yes
dominant-baseline no
alignment-baseline no
baseline-shift no
font-family yes
font-style yes
font-variant yes
font-weight yes
font-stretch yes
font-size yes
font-size-adjust yes
kerning no
letter-spacing yes
word-spacing yes
text-decoration yes
fill yes
fill-rule yes
fill-opacity yes
stroke yes
stroke-width yes
stroke-linecap yes
stroke-linejoin yes
stroke-miterlimit yes
stroke-dasharray yes
stroke-dashoffset yes
stroke-opacity yes
display yes
visibility yes
marker-start yes
marker-end yes
marker-mid yes
color-interpolation no
color-interpolation-filters no
color-rendering no
shape-rendering no
text-rendering no
image-rendering no
color yes
color-profile no
stop-color yes
stop-opacity yes
overflow yes
clip yes
clip-path yes
clip-rule yes
opacity yes

Elements and attributes not listed in the above table are not supported.

SVG in gzip file format is supported.

Restrictions

  • Only CSS can be described in <style>. Evaluates CSS2 selectors and a part of CSS3 selectors, but has the following restrictions: The same applies to external CSS.
    • @ rules (except for @namespace) are ignored.
    • !important is ignored.
    • Does not match the selector that includes pseudo elements.
    • Supports the following pseudo classes. Does not match the selector that includes the other pseudo classes.
      • :root
      • :first-child
      • :last-child
      • :only-child
      • :first-of-type
      • :last-of-type
      • :only-of-type
      • :nth-child()
      • :nth-last-child()
      • :nth-of-type()
      • :nth-last-of-type()
      • :empty
      • :not()
    • With the [attr=val] attribute selector, only the conformity of the character string is evaluated. For example, the x="1.0" attribute doesn't match the [x="1"] selector. The following selectors are supported.
      • E[foo]
      • E[foo="bar"]
      • E[foo~="bar"]
      • E[foo^="bar"]
      • E[foo$="bar"]
      • E[foo*="bar"]
      • E[foo|="bar"]
    • Functions and Variables cannot be used.
    • When there is a grammatical violation, no more issues are evaluated after that.
  • To reference an external CSS, use <?xml-stylesheet?> and specify as follows:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="foobar.css"?>
    <svg xmlns="http://www.w3.org/2000/svg">
    ...
    
  • xlink is abolished in SVG 2.0. Therefore, it is accepted as href instead of xlink:href.
  • fill, stroke, and stop-color are not supported for complex settings using multiple values. Only the first value is effective.
  • Supports stop-opacity only for the PDF output.
  • Strokes with complicated gradation (greater than or equal to 3 colors, repeat, reflect) are not supported.
  • Transparency is not supported in PDF1.3.