# CKEditor 4 Export to PDF Plugin
The **Export to PDF** CKEditor 4 plugin allows you to easily print the WYSIWYG editor content to a PDF file. When enabled, this feature sends the content of your editor together with the styles that are used to display it to the CKEditor Cloud Services HTML to PDF converter service. The service then generates a PDF document that can be downloaded by the user.
Thanks to this plugin, it takes exactly one button click to get a PDF file with content formatted in the same way as the one visible in CKEditor 4.
CKEditor 4 **Export to PDF** also allows various customizations like changing the page size and margin, setting additional styling, adding custom headers and footers and pre-processing content. This gives great flexibility and control over the PDF output and allows to keep all the PDF documents consistent when it comes to styling.
This is a premium feature. Please [contact us](https://ckeditor.com/contact/) if you would like to purchase a license. Let us know if you have any feedback or questions! You can also sign up for the [CKEditor Premium Features 30-day Free Trial](https://orders.ckeditor.com/trial/premium-features).
If this feature is used without authorization, the resulting documents will be watermarked.
![](https://c.cksource.com/a/1/img/npm/ckeditor4-pdf-export.gif)
## Getting Started
### Using with official CKEditor 4 presets
Starting with CKEditor 4 version `4.15.0`, **Export to PDF** plugin is included in `standard-all`, `full` and `full-all` official presets. The `full` and `full-all` presets have the plugin active by default while for `standard-all` it needs to be enabled with the [`config.extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins) configuration option:
```js
CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf'
} );
```
### Installation from npm
To instal the plugin via npm, simply run:
```bash
npm i ckeditor4-plugin-exportpdf
```
Then add the plugin to your CKEditor 4 instance with the [`addExternal()` method](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins.html#method-addExternal):
```js
CKEDITOR.plugins.addExternal( 'exportpdf', './node_modules/ckeditor4-plugin-exportpdf/' );
```
If you prefer not to link to the `node_modules` folder directly, you may simply copy the entire `./node_modules/ckeditor4-plugin-exportpdf/` directory as `ckeditor/plugins/exportpdf/` and add it with the [`config.extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins) configuration option:
```js
CKEDITOR.replace( 'editor', {
extraPlugins: 'exportpdf'
} );
```
### Other Installation Methods
You can also use the [CKEditor 4 Add-ons repository](https://ckeditor.com/cke4/addons/plugins/all) to obtain the plugin via:
* [Custom build with online builder](https://ckeditor.com/cke4/builder)
* [Manual download](https://ckeditor.com/cke4/addon/exportpdf)
Refer to [Export to PDF installation documentation](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#installation) for more details. If you are having trouble setting up the Export to PDF plugin, please [contact us](https://ckeditor.com/contact/).
### Setting up a license key
If you have a commercial license for **Export to PDF** plugin, [exportPdf_tokenUrl](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-exportPdf_tokenUrl) configuration option should be set to remove watermark from generated documents:
```js
CKEDITOR.replace( 'editor', {
exportPdf_tokenUrl: 'https://example.com/cs-token-endpoint'
} );
```
This value is unique for each customer and can be found in the [CKEditor Ecosystem dashboard](https://dashboard.ckeditor.com).
This is all. If you are having trouble in setting up Export to PDF plugin, please [contact us](https://ckeditor.com/contact/).
## Features
The CKEditor 4 Export to PDF plugin is really simple to use and works out-of-the-box. It does not require any additional configuration and due to its flexible nature, it covers a lot of cases internally while also providing an easy way to [customize output PDF files](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#configuration).
The most important features are:
* Exporting HTML content from CKEditor 4 WYSIWYG editor to PDF with a single click.
* [Setting a custom name](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#setting-dynamic-file-name) for the generated PDF file.
* [Handling relative image paths](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#relative-vs-absolute-urls).
* [Changing the appearance of the PDF document](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#custom-css-rules) (like margins, text styling, custom headers and footers etc.) with custom CSS styles.
* [Pre-processing HTML content](https://ckeditor.com/docs/ckeditor4/latest/features/exporttopdf.html#data-preprocessing) via synchronous and asynchronous code before the generation of the PDF file.
## Browser and CKEditor 4 Support
The CKEditor 4 Export to PDF plugin works in all the browsers [supported by CKEditor 4](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html) except for Internet Explorer versions older than version 11. The plugin is compatible with CKEditor 4 versions starting from `4.6.1`.
## Demo
See the working ["Exporting editor content to PDF"](https://ckeditor.com/docs/ckeditor4/latest/examples/exporttopdf.html) sample that showcases printing your HTML content to a PDF file.
## License
**CKEditor 4 Export to PDF plugin** (https://ckeditor.com/ckeditor-4/)<br>
Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
CKEditor 4 export to PDF plugin is licensed under a commercial license and is protected by copyright law.
For more details about available licensing options please contact us at sales@cksource.com.
### Trademarks
**CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
没有合适的资源?快使用搜索试试~ 我知道了~
基于PHP+MySQL的简易新闻文章管理系统源码
共1152个文件
php:590个
tpl:130个
txt:129个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
4星 · 超过85%的资源 4 下载量 151 浏览量
2021-10-15
01:10:23
上传
评论 1
收藏 3.73MB ZIP 举报
温馨提示
基于PHP+MySQL的简易新闻文章管理系统源码
资源推荐
资源详情
资源评论
收起资源包目录
基于PHP+MySQL的简易新闻文章管理系统源码 (1152个子文件)
editor_ie8.css 49KB
editor_iequirks.css 49KB
editor_ie.css 48KB
editor_gecko.css 47KB
editor.css 47KB
dialog_ie8.css 15KB
dialog_iequirks.css 14KB
dialog_ie.css 14KB
dialog.css 13KB
theme.css 3KB
theme.css 2KB
templates.css 1KB
copyformatting.css 1KB
wsc.css 1KB
toolbar.css 1KB
wsc.css 1KB
tableselection.css 1KB
base.css 772B
colordialog.css 772B
contents.css 543B
dialog.css 396B
scayt.css 356B
ConfigForm.css 301B
screen.css 232B
dialog.css 231B
theme.css 208B
theme.css 142B
theme.css 32B
theme.css 30B
theme.css 25B
theme.css 23B
#daicuo.db3 94KB
#cache.db3 4KB
hiddeninput.exe 9KB
spinner.gif 3KB
angel_smile.gif 1KB
devil_smile.gif 1KB
shades_smile.gif 1KB
angry_smile.gif 1KB
tongue_smile.gif 1KB
tounge_smile.gif 1KB
regular_smile.gif 1KB
wink_smile.gif 1KB
confused_smile.gif 1KB
teeth_smile.gif 1KB
omg_smile.gif 820B
cry_smile.gif 795B
embarrassed_smile.gif 786B
embaressed_smile.gif 786B
sad_smile.gif 782B
whatchutalkingabout_smile.gif 775B
broken_heart.gif 732B
thumbs_down.gif 715B
thumbs_up.gif 714B
heart.gif 692B
kiss.gif 683B
lightbulb.gif 660B
template3.gif 557B
template1.gif 539B
envelope.gif 506B
template2.gif 497B
x.gif 437B
y.gif 346B
hiddenfield.gif 178B
pagebreak.gif 99B
pagebreak.gif 99B
.gitignore 39B
.gitignore 29B
.gitignore 28B
.htaccess 206B
.htaccess 13B
integration.html 5KB
tmpFrameset.html 2KB
ciframe.html 2KB
paperformat.html 1KB
stylesheets.html 1KB
tokentwoeditorswrong.html 1KB
tokentwoeditorscorrect.html 1KB
notificationsasync.html 1002B
easyimage.html 787B
configfilename.html 667B
tokenfetching.html 545B
wrongendpoint.html 467B
tokenwithouturl.html 456B
emptyeditor.html 414B
readonly.html 393B
notifications.html 377B
preview.html 246B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
index.html 0B
favicon.ico 1KB
Template.php.in 2KB
info.ini 45B
3.jpg 31KB
6.jpg 31KB
1.jpg 30KB
7.jpg 30KB
共 1152 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
- 丢不起的幸福2022-06-30里面就一个模拟器执行档,大骗子,退钱 #标题与内容不符 #内容缺失 #引导二次消费 #毫无价值
- Lucus_Taylor2021-11-07用户下载后在一定时间内未进行评价,系统默认好评。
- 阑珊几曾。2021-12-25用户下载后在一定时间内未进行评价,系统默认好评。
- baidu_389651152021-11-12用户下载后在一定时间内未进行评价,系统默认好评。
mYlEaVeiSmVp
- 粉丝: 1882
- 资源: 19万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功