# 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.66/nedyx/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://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-3de2d552482815548a2324922b2b902aeddd33a8%2Fgrafik.png?alt=media" 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://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-de5b1a9690da55d14375029128227bf7494ed416%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>
