getProofImages Method

Callable

  • getProofImages(options?: object ) : Promise < IProofResult >
  • Renders proof images (72 DPI). For details, see the Introducing the IFrame API topic.

    example
    // Getting links to proof images.
    editor.getProofImages({maxHeight: 720, maxWidth: 720, pregeneratePreviewImages: true})
        // If the links to proof images were generated successfully.
        .then(function (result) {
            // Get the links from the promise properties.
            proofImageUrls = result.proofImageUrls;
        })
        // If there was an error thrown while getting links to proof images.
        .catch(function (error) {
            console.error("Getting proof images failed with exception: ", error);
        });
    

    Parameters

    • Optional options: object

      Parameters of proof images. Note, 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.

      • Optional generateLargePreviews: 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.

      • Optional generateProductProof: boolean

        If true, this method renders previews of all product pages to a multi-page PDF file. In this case, the IRenderingProperty.proofImageFileFormat will be ignored. The default value is false.

        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

      • Optional largePreviewMaxHeight: number

        The maximum height of large proof images. By default, this value is equal to the surface height.

      • Optional largePreviewMaxWidth: number

        The maximum width of large proof images. By default, this value is equal to the surface width.

      • Optional maxHeight: number

        The maximum height of proof images. This value is 500 by default.

      • Optional maxWidth: number

        The maximum width of proof images. This value is 500 by default.

      • Optional pregeneratePreviewImages: 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 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.

    Returns Promise < IProofResult >

    Returns an array of temporary links to proof images.