Fluent Commerce Logo
Docs
Sign In

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 NameCore

The standard library of mystique components. 

0000-00-00

v1.0.0

Initial changelog entry.

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}

Language: json

Version History

2023-08-01

v23.8.1

n/a

Recommended Placement

n/a

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo