The Export to PDF feature collects the HTML generated with the tinymce.editor.getContent() method and combines it with the default editor content styles along with the styles provided in the plugin configuration. The combined content and styles are then processed by the included server-side converter service, which can be either self-hosted or cloud-based. Following this processing, a PDF file is generated, which is subsequently returned to the user’s browser, enabling them to save it onto their disk or drive.
To add the Export to PDF plugin to the editor, add exportpdf to the plugins option in the editor configuration.
For example:
tinymce.init({
selector: 'textarea',
plugins: 'exportpdf',
toolbar: 'exportpdf',
});|
Important
|
When using the Export to PDF plugin with the {companyname} Cloud service, JWT authentication is required to use the service. For more information on how to set up JWT authentication with Export to PDF, see examples: |
To use the self-hosted version of the Export to PDF plugin, you need to set the exportpdf_service_url option to the URL of the service.
For example:
tinymce.init({
selector: 'textarea',
plugins: 'exportpdf',
toolbar: 'exportpdf',
exportpdf_service_url: 'http://localhost:8080/' // Update with the URL of the service you are using such as 'http://myserver.com/'
});|
Important
|
The |
The following configuration options affect the behavior of the Export to PDF plugin.
The Export to PDF plugin provides the following {productname} commands.
Explore the comprehensive API documentation for the Export to PDF Premium plugin at Export to PDF API Reference Documentation.