Export to PDF
This demo illustrates the ease with which you can generate PDF output directly from the Bootstrap Rich Text Editor. Rich Text Editor exposes the ExportToPdf
server method which exports data to a file or stream in PDF format.
Make any changes to the document and click the Export to PDF button to export the editor's contents.
<dx:BootstrapButton runat="server" Text="Export to PDF" ID="ButtonPDF" OnClick="ButtonPDF_Click">
<CssClasses Icon="far fa-file-pdf" Control="mb-2" />
</dx:BootstrapButton>
<dx:BootstrapRichEdit ID="RichEditExportToPDF" runat="server" ActiveTabIndex="0" ShowConfirmOnLosingChanges="false">
</dx:BootstrapRichEdit>
protected void ButtonPDF_Click(object sender, EventArgs e) {
using(MemoryStream stream = new MemoryStream()) {
RichEditExportToPDF.ExportToPdf(stream);
DevExpress.Web.Internal.HttpUtils.WriteFileToResponse(Page, stream, "ExportedDocument", true, "pdf");
}
}
Screen Size
Color Themes
Demo QR Code