summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-09-15 12:27:56 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-09-15 12:28:24 -0600
commitf10aa815444f747e58bd0dbe3ffd22a2ef8f2a0d (patch)
tree84400405e9123baaba280e1162bf655f4acb2fd6
parent39ff7eae758c3ccf0dba45d39d5629f8081c149c (diff)
be more clear that SVGs must declare the viewBox attribute
-rw-r--r--docs/modules/ROOT/pages/image-paths-and-formats.adoc7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/modules/ROOT/pages/image-paths-and-formats.adoc b/docs/modules/ROOT/pages/image-paths-and-formats.adoc
index 033566af..5d545fb6 100644
--- a/docs/modules/ROOT/pages/image-paths-and-formats.adoc
+++ b/docs/modules/ROOT/pages/image-paths-and-formats.adoc
@@ -39,10 +39,11 @@ The following image types (and corresponding file extensions) are supported:
CAUTION: The GIF (.gif), TIFF (.tiff), WebP (.webp), BMP (.bmp), and interlaced PNG formats are not supported unless you install prawn-gmagick.
See <<other-image-formats>> for details.
-TIP: When using an SVG, make sure that the SVG does not define width and height attributes on the root `<svg>` element.
+NOTE: The SVG must declare the `viewBox` attribute on the root `<svg>` element.
+Without that information, the converter does not know how to properly interpret the SVG data and portions of the image may get cut off.
+Make sure that the SVG does not define width and height attributes on the root `<svg>` element.
(A width of 100% is particularly problematic as it can add empty space above and below the visible image).
-The SVG should only declare the `viewBox` attribute.
-The width should be controlled using the `pdfwidth` attribute on the image macro.
+The width should be controlled using the `pdfwidth` attribute on the image macro instead.
In order to embed an image into a PDF, Asciidoctor PDF must understand how to decode it.
To perform this work, Asciidoctor delegates to the underlying libraries.