# DOWNLOADPDF

#### Syntax

**DOWNLOADPDF**(*pageInfo*; *fileName*)

1. *pageInfo* - the name of the page which should be added to the pdf file, or a json text containing a list of pages to be exported - ***Value type**: text (optional, default value: current page name)*

   Possible values:

   * *text* - the name of the page which should be downloaded as pdf file
   * *json -* see the function [PDFCREATE ](https://docs.nedyx.com/version-1.52-preview/clearlines-functions/import-export-functions/pdfcreate)for a detailed description of this option
2. *fileName* - the name under which the pdf file is downloaded - ***Value type**: text (optional, default value: the name of the current page or the first page name in the json text)*

#### Remark

* *fileName* can only be specified if *pageInfo* is specified as well.

#### Examples

**Example 1**

A click on the "Download PDF" button downloads the current page as a PDF file.

<figure><img src="https://3862539772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4X6nN2wTlDsVpd8P1WDM%2Fuploads%2FzGVN0afPOG8g80EiA7m8%2Fgrafik.png?alt=media&#x26;token=43b4dc62-55c6-468d-8f6d-e866f309d6f5" alt=""><figcaption></figcaption></figure>

**Example 2**

A click on the "Download PDF" button downloads the page "Dashboard" as a PDF file with the file name "MyDashboard.pdf".

<figure><img src="https://3862539772-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4X6nN2wTlDsVpd8P1WDM%2Fuploads%2FmHmS0olRGih7bJlmAySs%2Fgrafik.png?alt=media&#x26;token=dc6e4611-5f0b-4452-b545-6c0ee3eb9bf2" alt=""><figcaption></figcaption></figure>
