@@ -2070,7 +2070,7 @@ By using ``_pdf``, ``_Pdf``, ``_file``, ``_File``, ``_zip``, ``_Zip``, ``_excel
will be set.
All files will be read by PHP - therefore the directory might be protected against direct web access. This is the
preferred option to offer secure downloads via QFQ.
preferred option to offer secure downloads via QFQ. Check `secure-direct-file-access`_.
.. _download-parameter-files:
...
...
@@ -2130,34 +2130,34 @@ Parameter and (element) sources
Link: https://example.com/dl.php/doe/john
* *popupMessage*: `a:<text>` - will be displayed in the popup window during download. If the creating/download is fast, the window might disappear quickly.
* *popupMessage*: ``a:<text>`` - will be displayed in the popup window during download. If the creating/download is fast, the window might disappear quickly.
* *mode*: `M:<mode>`
* *mode*: ``M:<mode>``
* *mode* = <file|pdf|zip|excel>
* If `M:file`, the mime type is derived dynamically from the specified file. In this mode, only one element source
* If ``M:file``, the mime type is derived dynamically from the specified file. In this mode, only one element source
is allowed per download link (no concatenation).
* In case of multiple element sources, only `pdf`, `zip` and `excel` (template mode) is supported.
* If `M:zip` is used together with `p:...`, `U:...` or `u:..`, those HTML pages will be converted to PDF. Those files
* If ``M:zip`` is used together with `p:...`, `U:...` or `u:..`, those HTML pages will be converted to PDF. Those files
get generic filenames inside the archive.
* If not specified, the **default** 'Mode' depends on the number of specified element sources (=file or web page):
* If only one `file` is specified, the default is `file`.
* If there is a) a page defined or b) multiple elements, the default is `pdf`.
* *element sources* - for `M:pdf` or `M:zip`, all of the following element sources may be specified multiple times.
* *element sources* - for ``M:pdf`` or ``M:zip``, all of the following element sources may be specified multiple times.
Any combination and order of these options are allowed.
* *file*: `F:<pathFileName>` - relative or absolute pathFileName offered for a) download (single), or to be concatenated
* *file*: ``F:<pathFileName>`` - relative or absolute pathFileName offered for a) download (single), or to be concatenated
* By default, the options given to wkhtml will *not* be encoded by a SIP!
* To encode the parameter via SIP: Add '_sip=1' to the URL GET parameter.
E.g. `p:id=form&_sip=1&form=Person&r=1`.
E.g. ``p:id=form&_sip=1&form=Person&r=1``.
In that way, specific sources for the `download` might be SIP encrypted.
...
...
@@ -2166,13 +2166,31 @@ Parameter and (element) sources
* If there are trouble with accessing FE_GROUP protected content, please check :ref:`wkhtmltopdf<wkhtml>`.
* *url*: `u:<url>` - any URL, pointing to an internal or external destination.
* *url*: ``u:<url>`` - any URL, pointing to an internal or external destination.
* *uid*: `uid:<tt-contentrecordid>` - the tt_content.uid of a QFQ PageContent record (shown on hover in the backend). This will render
only the specified QFQ content record, without any Typo3 layout elements (Menu, Body,...)
QFQ will retrieve the tt-content's bodytext from the Typo3 database, parse it, and render it as a PDF. Parameters can be
passed: `uid:<tt-contentrecordid>[&arg1=value1][&arg2=value2][...]` and will be available in the SIP store for the QFQ PageContent,
or passed as wkhtmltopdf arguments, if applicable.
* *uid*: ``uid:<functionname>`` - the output is treated as HTML (will be converted to PDF) or EXCEL data.
* The called tt-content record is identified by `function name`, specified in the subheader field. Optional
the numeric id of the tt-content record (=uid) can be given.
* Only the specified QFQ content record will be rendered, without any Typo3 layout elements (Menu, Body,...)
* QFQ will retrieve the tt-content's bodytext from the Typo3 database, parse it, and render it as a PDF or Execl data.
* Parameters can be passed: ``uid:<tt-contentrecordid>[&arg1=value1][&arg2=value2][...]`` and will be available via
STORE_SIP in the QFQ PageContent, or passed as wkhtmltopdf arguments, if applicable.
* For more obviously structuring, put the additional tt-content record on the same Typo3 page (where the QFQ
tt-content record is located which produces the link) and specify ``render = api`` (`report-render`_).
* *source*: ``source:<functionname>[&arg1=value1][&arg2=value2][&...]`` - (similar to a `uid`) the output is treated
as further sources. Example result reported by *function name* might be: ``F:file.pdf1|uid:myData&arg=2|...``
* Use this functionality to define a *central managed download* function, which can be reused anywhere by just specify the
*function name* and required arguments.
* The called tt-content record is identified by `function name`, specified in the subheader field. Optional
the numeric id of the tt-content record (=uid) can be given.
* The output of the tt-content record will be treated as further source arguments. Nothing else than valid source
references should be printed. Separate the references as usual by '|'.
* The supplied arguments are available via STORE_SIP (this is different from `qfq_function`_).
* Tip: For more obviously structuring, put the additional tt-content record on the same Typo3 page (where the QFQ
tt-content record is located which produces the link) and specify ``render = api`` (`report-render`_).
* *WKHTML Options* for `page`, `urlParam` or `url`:
...
...
@@ -2208,6 +2226,12 @@ Example `_link`: ::
# One source and a header file. Note: the parameter to the header URL is escaped with double backslash.
SELECT "d:complete.pdf|s|t:Complete PDF|p:id=detail2&r=1&--orientation=Landscape&--header={{URL:R}}?indexp.php?id=head\\&L=1|F:fileadmin/pdf/test.pdf" AS _link
# One indirect source reference
SELECT "d:complete.pdf|s|t:Complete PDF|source:centralPdf&pId=1234" AS _link
An additional tt-content record is defined with `sub header: centralPdf`. One or multiple attachments might be concatenated.
10.sql = SELECT '|F:', a.pathFileName FROM Attachments AS a WHERE a.pId={{pId:S}}
* $vars[DOWNLOAD_MODE] - Optional. file | pdf | excel | thumbnail | monitor - default is a) 'file' in case of only one or b) 'pdf' in case of multiple sources.