Make sure PDF text isn't cut off
Sometimes the information captured in your form won't fit in the cell where the data-name tag is placed. Select these options to make the cell grow automatically:
- In the doForms Report settings, check Auto-fit rows in PDF (checked by default).
- In your Excel template, select Wrap Text for the cell(s) that should grow. In this example, row 5 will increase in height to fit everything entered in the Subject_Description field.
Control PDF page breaks
Page breaks in the PDF may not fall in exactly the same places as in the Excel print preview. Use one or both of these strategies to control where page breaks fall in the PDF:
- Use one worksheet for each page:
If the information in the worksheet comes close to filling up a whole page, you can make sure everything prints on one page by selecting Page Layout > Height > 1 page, and/or Page Layout > Width : 1 page. - Add page breaks to the worksheet:
Select Page Layout > Breaks > Insert Page Break to add a page break. This is most effective if the page break is placed above where an automatic page break would occur. For example, if selecting View > Page Break Preview in Excel shows a page break after row 45, add a page break anywhere before row 45 to ensure the PDF page break occurs where you selected.
Control what is included in the PDF
There are several ways to control which parts of the Excel template print in the PDF:
- To print only a portion of a worksheet, highlight the cells to print, and then select Page Layout > Print Areas > Set Print Area. You can highlight multiple cell ranges by holding down the CTRL/⌘ key.
- To keep an entire worksheet from printing, right click the worksheet name in the worksheet tabs and select Hide.
- To keep a row or column from printing, right click the row or column header and select Hide.
Format images
By default, images will be stretched to fill the whole cell where they are placed.
To keep from stretching images, select the Keep image ratio in custom template reports option in the Report settings. Note that this works only if the default font of the Excel file (File > Options > General > Use this as the default font) is one of the following:
- Calibri
- Arial
- Times New Roman
- Trebuchet MS
- MS Sans Serif
- Meiryo UI
- Aptos Narrow
Use check boxes and other symbols
You can convert captured information into check boxes or other symbols by using formulas.
For example, to show an ☒ if "YES" was entered and ☐ if "YES" was not entered, follow these steps:
- Set the font for the cell where the check box should be to Segoe UI Symbol. This font contains a wide variety of symbols and shapes.
- Copy this formula and paste it into the cell. This formula searches for "YES" anywhere in A1.
=IF(ISNUMBER(SEARCH("YES",A1)),"☒","☐")
- Change "YES" to the value that should result in a ☒.
- Change A1 to the address of the cell to search for the value.
To use other symbols, select Insert > Symbol, and then change the Font in the Symbol screen to Segoe UI Symbol.
You can also copy and paste these common symbols directly from this article:
☐☑☒⏹✖✕✘✗✔✓
Print header, footer and page numbers
Use the File > Print > Page Setup > Header/Footer dialog in the Excel template to include page numbers as well as consistent information in the header or footer of the PDF.
Hide rows, columns and sheets automatically
You can use script functions to hide rows, columns and sheets automatically based on the value of a question answer. Script functions affect both the Excel and PDF output of custom templates.
Below are a few examples that illustrate how script functions work:
Example 1: You would like to hide row 37 if the value of the mydata_name field is empty. Place the following tag in a cell in row 37 instead of just {mydata_name}:
{<script> if (value == "") {hideRow("37");}</script>mydata_name}
This script will hide row 37 if the value in the mydata_name field is empty. For example, if mydata_name corresponds to a picture, but no picture was taken, then this script would hide the row reserved for the picture. This can be used to consolidate the format of the report.
Example 2: You would like to hide sheet Sheet1 if the value of the mydata_name field is not empty. Use the following tag where you want the value placed:
{<script> if (value != "") {hideSheet("Sheet1");}</script>mydata_name}
Example 3: You would like to hide row 37 and column P if the value of the Subject_Description field is equal to the text “abc123”. Use the following tag where you want the value placed:
{<script> if (value == "abc123") {hideRow("37"); hideCol("P");}</script>Subject_Description}
This script will place the value of the Subject_Description field in the desired cell, and if it equals “abc123” it will also hide row 37 and column P.
Example 4: You would like to hide rows 30:32, 34, 37 and columns P, Q, A:H if the Total_Price field is equal to the number “88.3”. Use the following tag where you want the value of the Total_Price field placed:
{<script> if (value == "88.3") {hideRow("30:32,34,37"); hideCol("A:H,P,Q");}</script>Total_Price}
This script will place the value of the Total_Price field in the desired cell, and if it equals "88.3" it will hide rows 30 to 32, 34, and 37 and columns A to H, P, and Q.
Example 5: You would like to hide row 37 if the Total_Price field is greater than 20. Use the following tag where you want the value of the Total_Price field placed:
{<script> if (value > "20") {hideRow("37");}</script>Total_Price}
Note: The double quotes must be the straight double quote ("). Excel may add a slanted or curly double quote (“ ”) when you type. Try editing the script in Notepad, or copy and paste the double quotes from the scripts above.
Supported PDF fonts
Choose from the following fonts to ensure the PDF appearance matches your template:
- Agency FB
- Arial
- Arial Black
- Arial Narrow
- Baskerville Old Face
- Bernard MT Condensed
- Bookman Old Style
- Britannic Bold
- Brush Script MT
- Calibri
- Cambria
- Century Gothic
- Consolas
- Copperplate Gothic Bold
- Courier New
- Edwardian Script ITC
- Eras Medium ITC
- FangSong (Simplified Chinese)
- Garamond
- Georgia
- Lucida Bright
- Lucida Calligraphy
- Lucida Handwriting
- Lucida Sans Typewriter
- Lucida Sans Unicode
- Malgun Gothic (Korean)
- Meiryo (Japanese)
- Meiryo UI (Japanese)
- Monotype Corsiva
- Pristina
- Rockwell Extra Bold
- Script MT Bold
- Segoe Print
- Segoe Script
- Segoe UI
- Segoe UI Symbol
- Symbol
- Tahoma
- Times New Roman
- Trebuchet MS
- Verdana
- Webdings
- Wingdings
- Wingdings 2
- Wingdings 3