diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/modules/ROOT/pages/image-paths-and-formats.adoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/modules/ROOT/pages/image-paths-and-formats.adoc b/docs/modules/ROOT/pages/image-paths-and-formats.adoc index 57c0d49c..6cd1f1f8 100644 --- a/docs/modules/ROOT/pages/image-paths-and-formats.adoc +++ b/docs/modules/ROOT/pages/image-paths-and-formats.adoc @@ -39,6 +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. +(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. + 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. {url-prawn}[Prawn^] provides support for decoding JPG and PNG images. |
