download-publication-preview

Type: Operation

Download the generated publication preview for the current or specified document

Downloads the preview of the document generated by the CMS. This requires that the CMS implements the document/download route to return a preview of the document in the desired file format. Since this route is also used for the open-publication-preview-in-new-tab operation, this operation sets forceDownload=true in the query string parameter of this request. This should be used as a hook for the CMS to set the 'Content-Disposition' header to be 'attachment' in the response of the document/download route.

Label

Download document preview

Icon

eye

Imported operation data

  1. documentId

    (Optional)

    The Document ID of the document to preview, defaults to the current document

  2. variant

    (Optional)

    Type: String

    May be specified to create multiple previews in accordance with the CMS. The CMS can create a different preview based on a value in this parameter. Eg: variant=whitepaper and variant=brochure could generate different previews.