As you create and test your document templates, formerly called print templates, use these suggestions to help resolve problems. Most of these solutions apply to document templates with the .docx or PDF file type.

Syntax Errors

Check for these common syntax issues:

You can also try copying and pasting the entire document into a new Word document to remove ghost formatting.

Broken Paragraphs

There are often sections of document templates that need to stay together. For example, you might want to keep all signature lines together on the same page, so that if the preceding text gets too long, the entire signature section jumps to the next page together. You can make sure sections of the template stay together on the same page.

  1. Highlight the entire section that you need to keep together.
  2. Right-click the selection and click Paragraph.
  3. In the Paragraph window, click the Line and Page Breaks tab.
  4. Select the Keep with next and Keep lines together checkboxes.
  5. Click OK.

Now, the selected paragraphs will always stay together as a whole.

Tables

Refer to Embedding Tables and Fields from Tables for information about including tables. If you're building a complex table, here are some formatting tips for working with tables in Word:

Styles

Make sure to use the Format Painter tool to apply a consistent style to your document template. In particular, use the Format Painter to apply a consistent style to formulas, starting at the $. For example, if you have a $startif formula with an $endif, you should highlight everything from the first $ to the final f in $endif.

If the document template's final output has style problems, but not the original document template, check the style applied to the text inserted to replace formulas and variables. If the style is different than the rest of the document, you might need to modify that style to make it match the style used in the rest of the text, or apply that style to the text in the original document template. For example, inserting text from an HTML field is often automatically set to the Normal (Web) style in Microsoft Word, while the document template body is usually written in the Normal style. Setting the document template body to Normal (Web) or setting Normal (Web) to the same formatting as Normal can fix this issue.

For best results, store clauses as Microsoft Word files and use the Document Template option to prioritize the template's formatting, instead of Use Global Settings or Field. For complex clauses, or clauses that contain images, set the specific clause to use AltChunk using the customaltchunk=true parameter. If you need a single clause to both use automatic numbering and include an image, the best method is to split the clause into two parts, so that the numbering can be handled using the document template formatting and the image can be handled using AltChunk.

If the text or list style in the final product still doesn't match the style in the document template, you might need to review the style preference settings for your system, the specific document template, and potentially the individual clause being inserted.

Troubleshooting Styles

First, if the issue comes from inserting a clause, and the clause is stored in a Microsoft Word file rather than an HTML text field, review the text of the document template to locate the variable pointing to that clause text.

Next, edit the Word/PDF template itself and check the style preferences drop-down setting at the bottom. This controls the style preference for the whole document template.

Finally, if the lower-level settings weren't the problem, check the global variable settings. Log in as an administrator and go to Setup > System > Manage Global Variables.

Remember that any change to global variable settings affects all document templates in the system, not just the one you're troubleshooting.

If you need to include bookmarks in the final product of a Microsoft Word template, you can configure the system to preserve bookmarks from document templates. To do so, go to the Customized Variables tab and select New > Choice Constant. Create a new global variable named print_template_remove_bookmark and set it to No. This setting applies only to Word document templates, not PDF or HTML formats.


Related articles