diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-09-08 03:38:05 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-09-08 03:38:29 -0600 |
| commit | 3cd63dc34646ec1c79a402cfbdb89a4ee7e8dd05 (patch) | |
| tree | 5e982dba88ee24e8faed129f279210c48905897b /docs | |
| parent | 7d7a1a9637e1d65171efacfd0b1b641f60fa2916 (diff) | |
add tip about removing width and height attributes from SVG data
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. |
