Download Print Button
UI Component
Changed on:
30 May 2024
Overview
There are some Fluent APIs that directly produce HTML pack slips.These files can't be directly linked as they require authentication, so the Download Print Button exists to allow them to be downloaded directly from the page.| Plugin Name | Core |
|---|
Alias
fc.button.print.download
Detailed technical description
None
Properties
| Name | Type | Required | Default | Description |
| label | `string` | yes | Label text to be presented on the button. Accepts an i18n key. | |
| href | `string` | yes | Relative path of the Fluent endpoint to download. | |
| filename | `string` | yes | Name of the file to save out. This supports template strings (e.g. appending the wave ID) to avoid file name clashes. | |
| behavior | `string` | no | `preview` | Behaviour with which the HTML document is downloaded for printing. Three options are available: `print`: Opens the browser's print preview`preview`: Downloads the HTML document as PDF`newTab`: Opens the HTML document as a PDF in a new tab of the browser |
Configuration example
1{
2 "component": "fc.button.print.download",
3 "props":{
4 "label": "i18n:fc.sf.ui.waves.detail.action.pickList.download.label",
5 "href": "/api/v4.1/wave/{{waveById.id}}/pickingList",
6 "filename": "wave-picklist-{{waveById.id}}.pdf",
7 "behavior":"preview"
8 }
9}Version History
Recommended Placement
n/a