Image

This element is used to add a picture.

Declaration

Image element is declared as an object with "element_type": "Image" property.

Image file name is provided in the name property.

{
	"element_type": "Image",
	"name": "image.jpg"
}

All images used in the form must be provided to the template generator.

Required properties

Name Type Description
element_type string Must be "Image" (case-insensitive).
name string Name of the image file.

Optional properties

Name Type Default value Description
width integer Original image width Image width, in pixels. Smaller or larger images will be resized.
height integer Original image height Image height, in pixels. Smaller or larger images will be resized.
x integer n/a Set the absolute position of the image relative to the left edge of the page.
Overrides the value of align property.
y integer n/a Set the absolute position of the image relative to the top edge of the page.
align string “left” Horizontal image alignment: "left", "center" or "right".

Allowed child elements

None.

Example

{
	"element_type": "Template",
	"children": [
		{
			"element_type": "Page",
			"children": [
				{
					"element_type": "Image",
					"name": "logo.jpg",
					"align": "center"
				},
				{
					"element_type": "EmptyLine"
				},
				{
					"element_type": "Text",
					"name": "Aspose.OMR Cloud",
					"align": "center",
					"font_size": 24
				}
			]
		}
	]
}

Image