The Office Renderer component can be configured using the Aspire REST API. It requires the following entities to be created:

Below are the examples of how to configure the component. 

API Fields

  • "type" must always be specified as "application".
  • "description" must be a descriptive string without spaces.
  • "config" must always be specified as "com.accenture.aspire:app-thumbnail-office".
  • "appType" must always be specified as "office-renderer".
  • "appName" must always be specified as "Office Renderer".



Create or Update Workflow


NOTE: Some options in the following table collapse or are displayed only when selecting other options, such as a checkbox or selects.


Field


Required


Default


Multiple

NotesExample
descriptionYes-NoName of the component application.

"office-renderer"

propertiesYes-NoConfiguration object

rendererType

Yes"PDF"NoThe type of documents to be rendered. It can be: "PDF", "DOC" or "PPT""PDF"

pdfRenderer

YestrueNoConstant for internal validations.true

docRenderer

YesfalseNoConstant for internal validations.false

pptRenderer

YesfalseNoConstant for internal validations.false

magick

Yes

-

No

The path to the ImageMagick Executable.

"C:\\Program Files\\ImageMagick-7.1.1-Q16-HDRI\\magick.exe"

addSourceName

YesfalseNo

When selected, the store ID part of the sequence file path will be extracted from the document's source.

true

contentSourcePath

No"/doc/seed/id"No

The path of the document field that holds the id.

"/doc/seed/id"

addSuffix

YesfalseNo

When selected, the binary store folder name will have the given suffix added.

true

suffix

No"_thumbnails"No

The suffix to add to the binary store folder name.

"_thumbnails"

thumbnails

Yes-No

The thumbnail size configurations.

-

thumbnail

Yes-YesThe thumbnail config object."thumbnail"

id

Yes-No

An identifier for the thumbnail that can be used to identify it later - eg small, large, 40x20, etc.

"small"

size

Yes-No

Thumbnail size - fixed sizes by pixel (40x30), fixed width by pixel (40w), fixed height by pixel (30h) or percentage (10%).

"30%"

ignoreErrors

YesfalseNo

If any exception occurs during extraction, the exception will be logged, but not thrown so the job can continue with other stages.

false
debugNofalseNoOption if you want to debug messages enabled.false

Example 

NOTE: The following structure is not ordered by the sections of the component configuration. 


PUT aspire/_api/workflows/9bdf3efb-c266-46ac-ab59-eb8eda87d9e9/rules
{
	"type": "application",
	"appName": "Poi Renderer",
	"appType": "aspire-thumbnails",
	"config": "com.accenture.aspire:app-thumbnail-poi",
	"description": "apache-poi-renderer",
	"properties": {
		"rendererType": "PDF",
		"pdfRenderer": "false",
		"docRenderer": "true",
		"pptRenderer": "false",
		"magick": "C:\\Program Files\\ImageMagick-7.1.1-Q16-HDRI\\magick.exe",
		"addSourceName": true,
		"contentSourcePath": "/doc/seed/id",
		"addSuffix": true,
		"suffix": "_thumbnails",
		"thumbnails": [
			{
				"thumbnail": {
					"id": "small",
					"size": "30%"
				}
			},
			{
				"thumbnail": {
					"id": "medium",
					"size": "600x400"
				}
			}
		],
		"ignoreErrors": false,
		"debug": false
	}
}
  • No labels