Skip to main content
All docs
V25.1
  • 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