When using the SVG Converter we highly recommend creating your SVG template with the Inkscape editor (it's a free software available for Linux, Mac, and Windows). Inkscape will allow you to define line-wrapped text, thus avoiding the problem of text going beyond the right margin of the page.

Requirements

  • You need the PHP Imagick extension: if you don't have it please ask your service provider to install it for you.

  • If you use Inkscape version 1.0 or later you need to follow these steps before beginning:

Line Wrapped Text

If you want your text to be bound inside a region with automatic line wrapping then, when using the text tool, select a rectangular region by keeping the left mouse button pressed. In the PDF the text will stay inside this region, even when tokens are included. Make also sure you follow the second step of the requirements section above.

Please do not take line wrapping for granted and check if it works on your server. Unfortunately Image Magick configuration vary by server, and on some configuration line-wrapping does not work. In such cases, allow for enough space on the right making sure that any input will fit. In such case you should also restore Inkscape settings to their default.

Adding a Signature

Add the token for the signature field id without the square brackets in a rectangle id. Check this video to see how it is done:

Fonts

In order to be rendered correctly, the font you use in Inkscape needs to be available on the Server too. If it isn't, a generic font will be used instead for the final PDF. For a list of available fonts on the Server create a PHP Raw widget with this code:

foreach( Imagick::queryFonts() as $f ) {
echo '<li>' . $f;
}

You can ask your host provider to add more fonts.

If the text is not very long (for example a title or logo) and does not contain tokens, you can just convert it to a path (from the menu: Path, Object to Path)

Troubleshoot

  • The rendered page is completely blank: this likely means you have an old version of Image Magick, where the SVG conversion was disabled because of an old security policy. Ask your hosting provider to upgrade Image Magick or remove the policy.

Did this answer your question?