From 8fb45235a01dfa8e18620a022486672cf52904b3 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 8 Apr 2021 18:00:10 +0300 Subject: [PATCH] print to pdf tips --- docs/user-guide/printing-to-pdf-tips.md | 87 +++++++++++++++++++++++++ docs/user-guide/printing-to-pdf.md | 5 ++ 2 files changed, 92 insertions(+) create mode 100644 docs/user-guide/printing-to-pdf-tips.md diff --git a/docs/user-guide/printing-to-pdf-tips.md b/docs/user-guide/printing-to-pdf-tips.md new file mode 100644 index 000000000..e4567b8ff --- /dev/null +++ b/docs/user-guide/printing-to-pdf-tips.md @@ -0,0 +1,87 @@ +# Printing to PDF tips + +In this article: + + * [PDF syntax](#pdf-code-syntax) + * [Text](#text) + * [Logo/Image](#logoimage) + * [Table](#table) + * [Link](#link) + +## PDF code syntax + +If you open a template code view (``) you will see that your PDF document data is markupped with the tags well known in HTML. + +**Note!** +Due to a security policy some of HTML tags, attributes or styles may not be supported or allowed by editor. So it will truncate them automatically. + +## Text + +* `some text` - bold text style +* `some text` - underlined text style +* `some text` - italic text style +* `some text` - crossline the text +* `
` - insert single line breaks in a text +* `some text` - element which is used to color a part of a text: `` + +#### Image resize + +* Setting a size with percentage: `style="width: 25%;"` +* Setting a size with pixels: `width="300" height="100"` + +## Table + +2x2 table structure example: +``` + + + + + + + + + + + +
+ id + + user_name +
+ 1 + + Admin +
+``` +* `border="0.5pt"` - table attribute for setting the width of a table border. Without this parameter you won't see the table borders. +* `bgcolor="#659B86"` - set a background color. Works for the `` and the `` tags. +* `width="25%"` - set a table cell width. +* `text-align: center;` - set a text position. Supports: `center`, `left`, `right`, ` justify`. +* `color: rgb(0, 0, 0);` - set the color of the text. +* `font-size: 12px;` - set the text size. +* `line-height: 1;` - set a line height. +* `` & `` - defines a table raw. +* `` & `` - defines a standard data cell in a table. +* `{{dateQuoted}}
` + +## Link + +You can create a link by clicking the link button in the tool panel. + +Code view: `Click me` diff --git a/docs/user-guide/printing-to-pdf.md b/docs/user-guide/printing-to-pdf.md index bded72cf7..9bb95ecc0 100644 --- a/docs/user-guide/printing-to-pdf.md +++ b/docs/user-guide/printing-to-pdf.md @@ -44,6 +44,7 @@ Table of content: * [Raw values](#raw-values) * [Maps](#maps) * [Custom helpers](#custom-helpers) +* [Tips](#tips) Available at Administration > PDF Templates. @@ -387,3 +388,7 @@ It's possible to print Google Maps image in PDF. See [here](../administration/ma ### Custom helpers See [here](../development/template-custom-helper.md). + +### Tips + +See [here](printing-to-pdf-tips.md).