All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ASPxClientRichEdit.DownloadPdf Method

Downloads the current document as a PDF file.

Declaration

DownloadPdf(fileName?: string, options?: ((pdfDocument: any) => void) | {
    modifyPdfDocument?: (pdfDocument: any) => void;
    modifyPdfPage?: (pdfDocument: any) => void;
}): void

Parameters

Name Type Description
fileName string

The name of the downloaded document.

options (pdfDocument: any) => void | {modifyPdfDocument: (pdfDocument: any) => void, modifyPdfPage: (pdfDocument: any) => void}

A function that allows you to modify the PDF document before it is downloaded; or an object that contains modifyPdfDocument and modifyPdfPage functions.

Remarks

The downloadPdf method exports the document to the Portable Document Format (PDF) and downloads it to a local machine.

You can write a function to modify each page after it is exported (modifyPdfPage), or modify the document after the export is completed (modifyPdfDocument). The pdfDocument parameter is an object of the PDFKit library. If an export fails, the parameter returns null.

IMPORTANT

If you use the DownloadPdf method, you should provide a list of available fonts and their sources to be uploaded to the client.

See Also