Interface: IFinishProductDesignOptions
Parameters of rendering the hi-res and preview images.
Remarks
(Editor:class).finishProductDesign takes these options.
Example
// Rendering the product.
const renderingResult = await editor.finishProductDesign();
// Get the promise properties.
stateId = renderingResult.stateId;
userId = renderingResult.userId;
Properties
proofMaxWidth?
optionalproofMaxWidth?:number
The maximum width of proof images, in pixels. This value is 500 by default.
proofMaxHeight?
optionalproofMaxHeight?:number
The maximum height of proof images, in pixels. This value is 500 by default.
fileName?
optionalfileName?:string
The name of the resulting print file. This name is only used when you allow end-users directly downloading hi-res files using the links returned by the finishProductDesign method. The file name is combined with a file extension of configured output format. For example, if you pass business_card as a value of the argument and configure Customer's Canvas to save results in PDF, the result file name will be business_card.pdf.
stateId?
optionalstateId?:string
Specifies a state file name without an extension, up to 36 symbols length. If such a file exists, it will be overwritten. You can pass this parameter for any user except master and default. If you omit this parameter, then a new file name is generated.
pregenerateHiRes?
optionalpregenerateHiRes?:boolean
If true, this method starts generating hi-res outputs in the background when called. In this case, the resulting links to hi-res outputs will be obtained before the image generation is complete. If false, this method only updates links and starts generating print files when a request to download them is received. The default value is false.
pregeneratePreviewImages?
optionalpregeneratePreviewImages?:boolean
If true, this method starts generating preview images in the background when called. In this case, the resulting links to these images will be obtained before the image generation is complete. If false, this method only updates links to these images and starts generating the preview images when a request to download them is received. The default value is false.
generateProductProof?
optionalgenerateProductProof?:boolean
If true, this method renders previews of all product pages to a multi-page PDF file. The default value is false.
generateLargePreviews?
optionalgenerateLargePreviews?:boolean
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.
largePreviewMaxWidth?
optionallargePreviewMaxWidth?:number
The maximum width of large proof images. By default, this value is equal to the surface width.
largePreviewMaxHeight?
optionallargePreviewMaxHeight?:number
The maximum height of large proof images. By default, this value is equal to the surface height.
storeDataInState?
optionalstoreDataInState?:boolean
if true, saves personalization data to state files. In this case, a state file will represent the initial product design without applying this data. If false, then the resulting state file will contain a set of personalized product copies but will not include the personalization data. The default value is true.
applyDataToVariablesOnly?
optionalapplyDataToVariablesOnly?:boolean
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.
productProofPageIndexes?
optionalproductProofPageIndexes?: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.
Example
"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"