Interface Editor.IGetProofImagesOptions
Parameters of rendering the preview images.
Package: @aurigma/design-editor-iframe
Remarks
Editor.getProofImages() takes these options.
When defining the width and height, the resulting image will be proportionally resized to fit the defined rectangle. For example, if the maximum width and height are both set to 640 pixels, then a 1280 x 960 px image will be resized to 640 x 480 px. When using _mockups_, specify the size of proof images more than or equal to the preview mockup size to avoid loss of the image quality.
Examples
// Getting links to proof images.
const links = await editor.getProofImages({maxHeight: 720, maxWidth: 720, pregeneratePreviewImages: true});
// Get the links from the promise properties.
proofImageUrls = links.proofImageUrls;
Properties
applyDataToVariablesOnly
if false, applies personalization data to any field with the specified name; if true, the data applies only to fields marked as variable. The default value is false.
Declaration
applyDataToVariablesOnly?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | if |
generateLargePreviews
If true, this method renders real-size proof images. If largePreviewMaxWidth and largePreviewMaxHeight are not set, then this method will take the size of the rendered surface. The default value is false.
Declaration
generateLargePreviews?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
generateProductProof
If true, this method renders previews of all product pages to a multi-page PDF file. In this case, the file format specified in proofImageFileFormat will be ignored. The default value is false.
Declaration
generateProductProof?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
Remarks
When you generate product previews in PDF files and allow your users to directly download these files using the links returned by this method, you can pass the filename query parameter that enables the download and customizes the resulting file name. For example, to download a booklet.pdf file: **https://example.com/api/rendering/GetProofImage/JohnWood/06047be9-78fb-4b89-98c5-8b1712ba1b51/-1\_-1.pdf?filename=booklet\*\*
largePreviewMaxHeight
The maximum height of large proof images. By default, this value is equal to the surface height.
Declaration
largePreviewMaxHeight?: number;
Property Value
| Type | Description |
|---|---|
| number | The maximum height of large proof images. By default, this value is equal to the surface height. |
largePreviewMaxWidth
The maximum width of large proof images. By default, this value is equal to the surface width.
Declaration
largePreviewMaxWidth?: number;
Property Value
| Type | Description |
|---|---|
| number | The maximum width of large proof images. By default, this value is equal to the surface width. |
maxHeight
The maximum height of proof images. This value is 500 by default.
Declaration
maxHeight?: number;
Property Value
| Type | Description |
|---|---|
| number | The maximum height of proof images. This value is |
maxWidth
The maximum width of proof images. This value is 500 by default.
Declaration
maxWidth?: number;
Property Value
| Type | Description |
|---|---|
| number | The maximum width of proof images. This value is |
pregeneratePreviewImages
If true, this method starts generating preview images in the background when called. In this case, the resulting links to these images will be returned before the image generation is complete. If false, this method only returns links to these images and starts generating the preview images when a request to download them is received. The default value is false.
Declaration
pregeneratePreviewImages?: boolean;
Property Value
| Type | Description |
|---|---|
| boolean | If |
productProofPageIndexes
Specifies the indexes of the product surfaces to be included in the output PDF file. You can specify comma-separated numbers as well as page ranges (two numbers separated by a dash "-"), in any order. Any negative values are not allowed. For multiple entries of an index, only one surface copy will be rendered to the file. By default, the resulting PDF will contain all product surfaces.
Declaration
productProofPageIndexes?: string;
Property Value
| Type | Description |
|---|---|
| string | Specifies the indexes of the product surfaces to be included in the output PDF file. You can specify comma-separated numbers as well as page ranges (two numbers separated by a dash "-"), in any order. Any negative values are not allowed. For multiple entries of an index, only one surface copy will be rendered to the file. By default, the resulting PDF will contain all product surfaces. |
Examples
"0,1,2,3,4" "3,4,1,0,2" the result is equal to "0,1,2,3,4" "1,1,2,0,0" the result is equal to "0,1,2" "0-4" "0-4,6,8-10,12"