Add Uploaded Images to Rich Style Documents 

SKIP AHEAD TO 
When would you add uploaded images to a rich style document?
How to add images into your document
How to restrict image sizes
Limitations

 

When would you add uploaded images to a rich style document?

When images have been uploaded by the end user during an Assessment through the File Upload field in a FORM page, you can display this inside rich style documents.

  

How to add images into your document

Follow the below syntax to add uploaded images to your rich style document.

  1. To start the image syntax, use the variable with the hash i.e. {{#FILE reference}}
  2. To insert the image(s), use the fixed variable i.e. {{%image}}
  3. To end the image syntax, use the file variable with a forward slash i.e. {{/FILE reference}}

Note: Each line of text must be separated with paragraph spaces as specified below.

WARNING: Please do not copy and paste any formatting templates in this article as transferring text from this article to your Word document may cause errors when generating your document in Checkbox. We strongly encourage you to write the syntax manually to avoid these issues in your document.

INCORRECT Formatting:  CORRECT Formatting: 
{{#FILE1}} 
{{%image}} 
{{/FILE1}} 

{{#FILE1}}

 

{{%image}}

 

{{/FILE1}}


Where 'FILE1' is the variable name of the File Upload field and '%image' is the fixed variable where all uploaded images will be appear in the document. This syntax will allow the user to add the image into the Document at the size that it was uploaded. Should the size of the image exceed the width of the document the image will be automatically resized to fit the width of the page. 

Example in document:

Image_in_Rich_Doc_Example_2020-12-31_13-48-58.png

  

How to restrict image sizes

WARNING: Please do not copy and paste any formatting templates in this article as transferring text from this article to your Word document may cause errors when generating your document in Checkbox. We strongly encourage you to write the syntax manually to avoid these issues in your document.


To restrict the size of the image you can use either of the following two methods. 

  1. Restricting the pixel width of the image.

Add the " | size:#" syntax after "%image" where # is the pixel size of the width restriction you want to set for the uploaded image.

For example:

Formatting:

{{#FILE1}}

 

{{%image | size:100}}

 

{{/FILE1}}


By adding the " | size:100" syntax, this restricts the image to a width of 100 pixels. The image will retain the original ratio by adjusting the pixel height automatically. 

Example in document:

Image_in_Rich_Doc_Example_2020-12-31_13-51-31.png

  1. Restricting both the pixel width and pixel height of the image.

Add the " | size:#:#" syntax after "%image" where the first # is the pixel size of the width restriction and the second # is the pixel size of the height restriction you want to set for the uploaded image.

For example:

Formatting:

{{#FILE1}}

 

{{%image | size:200:300}}

 

{{/FILE1}} 


By adding the " | size:200:300" in the middle syntax, this restricts the image to a width of 200 pixels and pixel height of 300.

Note: By default the image will have a centre alignment.

Example in document:

Image_in_Rich_Doc_Example_2020-12-31_13-52-53.png

 

Limitations

  1. Supported image file types that can be uploaded are JPEG and PNG
  2. Only up to 50 images can be uploaded in the File Upload field at one time (For example: To upload 100 images, you will need to upload the first 50 images before continuing to upload the remaining 50 images)

 

Related Articles