@ckeditor/ckeditor5-export-pdf 47.4.0 → 47.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/export-pdf.js +1 -1
- package/dist/index.js +1 -1
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/exportpdf.d.ts +83 -2
- package/src/exportpdf.js +1 -1
- package/src/exportpdfcommand.js +1 -1
- package/src/exportpdfui.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
package/src/exportpdf.d.ts
CHANGED
|
@@ -54,6 +54,12 @@ export declare class ExportPdf extends Plugin {
|
|
|
54
54
|
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
55
55
|
*/
|
|
56
56
|
export interface ExportPdfConfig {
|
|
57
|
+
/**
|
|
58
|
+
* The version of the HTML to PDF converter API.
|
|
59
|
+
*
|
|
60
|
+
* @default '1'
|
|
61
|
+
*/
|
|
62
|
+
version?: 1 | 2;
|
|
57
63
|
/**
|
|
58
64
|
* Paths to the `.css` files containing additional styling for the editor's content (**the order of provided items matters**).
|
|
59
65
|
*
|
|
@@ -177,7 +183,7 @@ export interface ExportPdfConfig {
|
|
|
177
183
|
* wait_time: 0
|
|
178
184
|
* }`
|
|
179
185
|
*/
|
|
180
|
-
converterOptions?: ExportPdfConverterOptions;
|
|
186
|
+
converterOptions?: ExportPdfConverterOptions | ExportPdfConverterOptionsV2;
|
|
181
187
|
/**
|
|
182
188
|
* A function to gather the HTML to be converted to PDF.
|
|
183
189
|
*
|
|
@@ -218,8 +224,11 @@ export interface ExportPdfConfig {
|
|
|
218
224
|
*/
|
|
219
225
|
appID?: string;
|
|
220
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* The HTML to PDF converter options for V1 of the converter API.
|
|
229
|
+
*/
|
|
221
230
|
export type ExportPdfConverterOptions = {
|
|
222
|
-
format?:
|
|
231
|
+
format?: ExportPdfPageFormat;
|
|
223
232
|
margin_top?: string;
|
|
224
233
|
margin_bottom?: string;
|
|
225
234
|
margin_right?: string;
|
|
@@ -236,3 +245,75 @@ export type ExportPdfConverterOptions = {
|
|
|
236
245
|
data: Record<string, string>;
|
|
237
246
|
};
|
|
238
247
|
};
|
|
248
|
+
/**
|
|
249
|
+
* Predefined page formats used in the HTML to PDF converter.
|
|
250
|
+
* Supported in both V1 and V2 APIs.
|
|
251
|
+
*/
|
|
252
|
+
export type ExportPdfPageFormat = 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6' | string & Record<never, never>;
|
|
253
|
+
/**
|
|
254
|
+
* The HTML to PDF converter options for V2 of the converter API.
|
|
255
|
+
*/
|
|
256
|
+
export type ExportPdfConverterOptionsV2 = {
|
|
257
|
+
document?: {
|
|
258
|
+
size?: ExportPdfPageFormat | {
|
|
259
|
+
height: string;
|
|
260
|
+
width: string;
|
|
261
|
+
};
|
|
262
|
+
orientation?: 'portrait' | 'landscape';
|
|
263
|
+
outline?: boolean;
|
|
264
|
+
margins?: {
|
|
265
|
+
top?: string;
|
|
266
|
+
bottom?: string;
|
|
267
|
+
left?: string;
|
|
268
|
+
right?: string;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
headers?: {
|
|
272
|
+
default?: ExportPdfSectionDefinitionV2;
|
|
273
|
+
first?: ExportPdfSectionDefinitionV2;
|
|
274
|
+
odd?: ExportPdfSectionDefinitionV2;
|
|
275
|
+
even?: ExportPdfSectionDefinitionV2;
|
|
276
|
+
};
|
|
277
|
+
footers?: {
|
|
278
|
+
default?: ExportPdfSectionDefinitionV2;
|
|
279
|
+
first?: ExportPdfSectionDefinitionV2;
|
|
280
|
+
odd?: ExportPdfSectionDefinitionV2;
|
|
281
|
+
even?: ExportPdfSectionDefinitionV2;
|
|
282
|
+
};
|
|
283
|
+
rendering?: {
|
|
284
|
+
wait_for_selector?: string;
|
|
285
|
+
wait_for_network?: boolean;
|
|
286
|
+
wait_time?: number;
|
|
287
|
+
};
|
|
288
|
+
base_url?: string;
|
|
289
|
+
extra_http_headers?: Record<string, Record<string, string>>;
|
|
290
|
+
merge_fields?: {
|
|
291
|
+
prefix: string;
|
|
292
|
+
suffix: string;
|
|
293
|
+
data: Record<string, string>;
|
|
294
|
+
};
|
|
295
|
+
disable_compression?: boolean;
|
|
296
|
+
security?: {
|
|
297
|
+
owner_password: string;
|
|
298
|
+
};
|
|
299
|
+
signature?: {
|
|
300
|
+
certificate: string;
|
|
301
|
+
certificate_password: string;
|
|
302
|
+
reason?: string;
|
|
303
|
+
location?: string;
|
|
304
|
+
};
|
|
305
|
+
metadata?: {
|
|
306
|
+
title?: string;
|
|
307
|
+
author?: string;
|
|
308
|
+
subject?: string;
|
|
309
|
+
keywords?: Array<string>;
|
|
310
|
+
custom_fields?: Record<string, string>;
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Definition of a section (header or footer) in V2 of the HTML to PDF converter.
|
|
315
|
+
*/
|
|
316
|
+
export type ExportPdfSectionDefinitionV2 = {
|
|
317
|
+
html: string;
|
|
318
|
+
css?: string;
|
|
319
|
+
};
|
package/src/exportpdf.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x2d7325=_0x2526;(function(_0x2dfa50,_0x22fb9f){const _0x197886=_0x2526,_0x595524=_0x2dfa50();while(!![]){try{const _0x167fb4=parseInt(_0x197886(0x1e2))/0x1+-parseInt(_0x197886(0x1de))/0x2+parseInt(_0x197886(0x1cf))/0x3*(-parseInt(_0x197886(0x1d4))/0x4)+parseInt(_0x197886(0x1eb))/0x5+-parseInt(_0x197886(0x1d2))/0x6*(parseInt(_0x197886(0x1dc))/0x7)+parseInt(_0x197886(0x1d9))/0x8*(-parseInt(_0x197886(0x1d6))/0x9)+-parseInt(_0x197886(0x1d0))/0xa*(-parseInt(_0x197886(0x1e3))/0xb);if(_0x167fb4===_0x22fb9f)break;else _0x595524['push'](_0x595524['shift']());}catch(_0x10a052){_0x595524['push'](_0x595524['shift']());}}}(_0x264c,0xea2db));import{Plugin as _0x537c}from'ckeditor5/src/core.js';function _0x2526(_0x363104,_0xa0d460){const _0x264ca3=_0x264c();return _0x2526=function(_0x25262e,_0x47f3e9){_0x25262e=_0x25262e-0x1cf;let _0x4cc898=_0x264ca3[_0x25262e];return _0x4cc898;},_0x2526(_0x363104,_0xa0d460);}import{Notification as _0x572b1d}from'ckeditor5/src/ui.js';import{ExportPdfCommand as _0x767842}from'./exportpdfcommand.js';import{ExportPdfUI as _0x530bbc}from'./exportpdfui.js';export class ExportPdf extends _0x537c{[_0x2d7325(0x1d3)];static get[_0x2d7325(0x1e6)](){const _0x17a573=_0x2d7325;return _0x17a573(0x1e0);}static get[_0x2d7325(0x1ec)](){return!0x0;}static get[_0x2d7325(0x1ea)](){return!0x0;}static get[_0x2d7325(0x1da)](){const _0x66526=_0x2d7325;return[_0x66526(0x1db),_0x572b1d,_0x530bbc];}[_0x2d7325(0x1e7)](){const _0x13613d=_0x2d7325,_0x2388d1=this[_0x13613d(0x1d7)],_0x8dc6fe=_0x2388d1[_0x13613d(0x1d1)][_0x13613d(0x1e8)](_0x13613d(0x1d5))||{};_0x2388d1[_0x13613d(0x1e5)][_0x13613d(0x1e1)](_0x13613d(0x1d5),new _0x767842(_0x2388d1));const _0x21dddb=_0x2388d1[_0x13613d(0x1dd)][_0x13613d(0x1e8)](_0x13613d(0x1db));!0x1===_0x8dc6fe[_0x13613d(0x1d8)]?this[_0x13613d(0x1d3)]=null:_0x8dc6fe[_0x13613d(0x1d8)]?_0x21dddb[_0x13613d(0x1e9)](_0x8dc6fe[_0x13613d(0x1d8)])[_0x13613d(0x1e4)](_0x1e7f73=>{const _0x287273=_0x13613d;this[_0x287273(0x1d3)]=_0x1e7f73;}):this[_0x13613d(0x1d3)]=_0x21dddb[_0x13613d(0x1df)];}}function _0x264c(){const _0x297ad3=['pluginName','init','get','registerTokenUrl','isPremiumPlugin','7825900IReHJj','isOfficialPlugin','5331147uAQVqp','10UudxWf','config','8097258YFgFav','_token','4LSavsU','exportPdf','3879VmqEtg','editor','tokenUrl','6376ADnkSx','requires','CloudServices','7HTKkrD','plugins','723934msIzAB','token','ExportPdf','add','1311270sLCwZZ','21062921PWcQrE','then','commands'];_0x264c=function(){return _0x297ad3;};return _0x264c();}
|
package/src/exportpdfcommand.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x574974=_0x3174;function _0x522f(){const _0x122bf7=['PDF\x20export\x20failed','announce','click','Notification','isBusy','merge_fields','cke5','options','14.8cm','118.9cm','document','showWarning','7745232MdiEsI','21288ogVqyC','entries','wrapInAffixes','59.4cm','MergeFieldsEditing','affectsData','token','finally','getDefaultValues','execute','\x0a\x09\x09\x09\x09\x09\x09\x09</div>\x0a\x09\x09\x09\x09\x09\x09</body>\x0a\x09\x09\x09\x09\x09</html>\x0a\x09\x09\x09\x09','getMergeFieldType','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP88B8AAuUB8e2ujYwAAAAASUVORK5CYII=','20151zGxkVC','21.0cm','createObjectURL','fetch','value','1jFIvmX','43.2cm','object','set','1380602BOFYDa','3790QYRuKV','has','margins','data','application/json','catch','isEnabled','35.6cm','width','appID','PDF\x20export\x20successful','previewMode','$labels','config','remove','assertive','656178OMOtvB','mergeFields','PDF\x20export\x20started','29.7cm','stringify','EDITOR_STYLES','margin_left','document.pdf','URL','stylesheets','\x0a\x09\x09\x09\x09\x09<!DOCTYPE\x20html>\x0a\x09\x09\x09\x09\x09<html>\x0a\x09\x09\x09\x09\x09\x09<head>\x0a\x09\x09\x09\x09\x09\x09\x09<title>CKEditor\x205\x20PDF\x20document</title>\x0a\x09\x09\x09\x09\x09\x09\x09<meta\x20charset=\x22utf-8\x22>\x0a\x09\x09\x09\x09\x09\x09</head>\x0a\x09\x09\x09\x09\x09\x09<body>\x0a\x09\x09\x09\x09\x09\x09\x09<div\x20class=\x22ck-content\x22\x20dir=\x22','22kBidZO','dataCallback','_token','ExportPdf','then','format','contentLanguageDirection','16fxzybE','$defaultValues','An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.','getDataSetValues','width:calc(','locale','fileName','plugins','href','ariaLiveAnnouncer','size','MergeFields','10.5cm','status','createElement','84.1cm','converterOptions','\x20-\x20','getLabel','\x22\x20style=\x22','\x22>\x0a\x09\x09\x09\x09\x09\x09\x09\x09','21.6cm','pending','4977165sxATjX','POST','_downloadFile','version','1771008wUqTGk','27.9cm','toLowerCase','right','converterUrl','image','application/pdf','get','function','editor','filter','refresh','getMergeFieldsIds','margin_right','blob','join','https://pdf-converter.cke-cs.com/v1/convert/','download','left','trim','42.0cm','1673PfTjIH'];_0x522f=function(){return _0x122bf7;};return _0x522f();}(function(_0x53b7cc,_0x45f475){const _0x143fb5=_0x3174,_0x2f5703=_0x53b7cc();while(!![]){try{const _0x199c39=parseInt(_0x143fb5(0xb4))/0x1*(-parseInt(_0x143fb5(0xb8))/0x2)+-parseInt(_0x143fb5(0xc9))/0x3*(-parseInt(_0x143fb5(0xdb))/0x4)+parseInt(_0x143fb5(0x7b))/0x5+parseInt(_0x143fb5(0xa2))/0x6*(parseInt(_0x143fb5(0x94))/0x7)+-parseInt(_0x143fb5(0xa1))/0x8+parseInt(_0x143fb5(0xaf))/0x9*(-parseInt(_0x143fb5(0xb9))/0xa)+parseInt(_0x143fb5(0xd4))/0xb*(parseInt(_0x143fb5(0x7f))/0xc);if(_0x199c39===_0x45f475)break;else _0x2f5703['push'](_0x2f5703['shift']());}catch(_0x4ae268){_0x2f5703['push'](_0x2f5703['shift']());}}}(_0x522f,0x7ba49));function _0x3174(_0x2cd697,_0x5d0d2d){const _0x522f45=_0x522f();return _0x3174=function(_0x317426,_0x2b322c){_0x317426=_0x317426-0x6a;let _0x1e2432=_0x522f45[_0x317426];return _0x1e2432;},_0x3174(_0x2cd697,_0x5d0d2d);}import{Command as _0x1fa427}from'ckeditor5/src/core.js';import{collectStylesheets as _0xd1c91}from'ckeditor5/src/utils.js';import{getTranslation as _0x52dcc1}from'./utils/common-translations.js';export class ExportPdfCommand extends _0x1fa427{constructor(_0x3418a2){const _0x393b09=_0x3174;super(_0x3418a2),this[_0x393b09(0xb7)](_0x393b09(0x99),!0x1),this[_0x393b09(0xa7)]=!0x1;}[_0x574974(0x8a)](){const _0x1ec1a6=_0x574974;this[_0x1ec1a6(0xbf)]=!this[_0x1ec1a6(0x99)],this[_0x1ec1a6(0xb3)]=this[_0x1ec1a6(0x99)]?_0x1ec1a6(0x7a):void 0x0;}[_0x574974(0xab)](_0x1e6e93={}){const _0xcb065c=_0x574974,_0x4adb75=this[_0xcb065c(0x88)],_0x2b906d=_0x1e6e93[_0xcb065c(0x83)]||_0xcb065c(0x8f),_0x3bd2ee=_0x1e6e93[_0xcb065c(0xd5)]||(_0x362ccf=>_0x362ccf[_0xcb065c(0xbc)][_0xcb065c(0x86)]()),_0x10a164=_0x4adb75[_0xcb065c(0x6b)][_0xcb065c(0x86)](_0xcb065c(0xd7)),_0x4f95d0=_0x1e6e93[_0xcb065c(0xa8)]||_0x10a164[_0xcb065c(0xd6)];return this[_0xcb065c(0x99)]=!0x0,this[_0xcb065c(0x8a)](),_0xd1c91(_0x1e6e93[_0xcb065c(0xd2)]||[_0xcb065c(0xce)])[_0xcb065c(0xd8)](async _0x108727=>{const _0x1de947=_0xcb065c;if(_0x4adb75['ui'][_0x1de947(0x6d)][_0x1de947(0x96)](_0x52dcc1(_0x4adb75[_0x1de947(0xe0)],_0x1de947(0xcb))),_0x4adb75[_0x1de947(0x6b)][_0x1de947(0xba)](_0x1de947(0x6f))){_0x1e6e93[_0x1de947(0x74)]||(_0x1e6e93[_0x1de947(0x74)]={});const _0x15dfc5=_0x4adb75[_0x1de947(0x6b)][_0x1de947(0x86)](_0x1de947(0xa6)),_0x18cec4=_0x15dfc5[_0x1de947(0xc4)],{prefix:_0x4b096d,suffix:_0x191c9c}=_0x4adb75[_0x1de947(0xc6)][_0x1de947(0x86)](_0x1de947(0xca)),_0xd61dd8=_0x1de947(0xae),_0x4c392a={'prefix':_0x4b096d,'suffix':_0x191c9c,'data':{}};if(_0x1de947(0xc5)===_0x18cec4){for(const _0x54e619 of _0x15dfc5[_0x1de947(0x8b)]())_0x1de947(0x84)===_0x15dfc5[_0x1de947(0xad)](_0x54e619)?_0x4c392a[_0x1de947(0xbc)][_0x54e619]=_0xd61dd8:_0x4c392a[_0x1de947(0xbc)][_0x54e619]=_0x15dfc5[_0x1de947(0xa4)](_0x15dfc5[_0x1de947(0x76)](_0x54e619)||_0x54e619);}else{const _0x2785b8=_0x1de947(0xdc)===_0x18cec4?_0x15dfc5[_0x1de947(0xaa)]():_0x15dfc5[_0x1de947(0xde)](_0x18cec4,!0x0);for(const _0x3a1edc of Object[_0x1de947(0xa3)](_0x2785b8)){const [_0x3b29ec,_0x4e5ed8]=_0x3a1edc;_0x1de947(0x84)===_0x15dfc5[_0x1de947(0xad)](_0x3b29ec)?_0x4c392a[_0x1de947(0xbc)][_0x3b29ec]=null!==_0x4e5ed8?_0x4e5ed8:_0xd61dd8:_0x4c392a[_0x1de947(0xbc)][_0x3b29ec]=null!==_0x4e5ed8?_0x4e5ed8:_0x15dfc5[_0x1de947(0x76)](_0x3b29ec)||_0x3b29ec;}}_0x1e6e93[_0x1de947(0x74)][_0x1de947(0x9a)]=_0x4c392a;}const _0x187603=0x2===_0x1e6e93[_0x1de947(0x7e)]?function(_0x6e8db2){const _0x482732=_0x1de947,_0x2fb382=_0x6e8db2?.[_0x482732(0x9f)]?.[_0x482732(0xbb)];return a({'pageWidth':m(_0x6e8db2?.[_0x482732(0x9f)]?.[_0x482732(0x6e)]||'A4'),'marginLeft':_0x2fb382?.[_0x482732(0x91)],'marginRight':_0x2fb382?.[_0x482732(0x82)]});}(_0x1e6e93[_0x1de947(0x74)]):(_0x59cd13=_0x1e6e93[_0x1de947(0x74)],a({'pageWidth':m(_0x59cd13?.[_0x1de947(0xd9)]||'A4'),'marginLeft':_0x59cd13?.[_0x1de947(0xcf)],'marginRight':_0x59cd13?.[_0x1de947(0x8c)]}));var _0x59cd13;const _0x56fe6a={'html':(_0x1de947(0xd3)+_0x4adb75[_0x1de947(0xe0)][_0x1de947(0xda)]+_0x1de947(0x77)+_0x187603+_0x1de947(0x78)+await _0x3bd2ee(_0x4adb75)+_0x1de947(0xac))[_0x1de947(0x92)](),'css':_0x108727,[0x2===_0x1e6e93[_0x1de947(0x7e)]?_0x1de947(0xc6):_0x1de947(0x9c)]:_0x1e6e93[_0x1de947(0x74)]},_0x100355={'method':_0x1de947(0x7c),'headers':{'Content-Type':_0x1de947(0xbd),'Accept':_0x1de947(0x85),..._0x4f95d0?{'Authorization':_0x4f95d0[_0x1de947(0xb3)]}:null,'x-cs-app-id':_0x1e6e93[_0x1de947(0xc2)]||_0x1de947(0x9b)},'body':JSON[_0x1de947(0xcd)](_0x56fe6a)};return window[_0x1de947(0xb2)](_0x2b906d,_0x100355)[_0x1de947(0xd8)](_0x440657=>{const _0x21c38e=_0x1de947;if(0xc8!==_0x440657[_0x21c38e(0x71)])throw _0x440657;return _0x440657[_0x21c38e(0x8d)]();})[_0x1de947(0xd8)](_0x321e97=>{const _0x5cf819=_0x1de947;_0x4adb75['ui'][_0x5cf819(0x6d)][_0x5cf819(0x96)](_0x52dcc1(_0x4adb75[_0x5cf819(0xe0)],_0x5cf819(0xc3)));const _0x658646=_0x5cf819(0x87)==typeof _0x1e6e93[_0x5cf819(0x6a)]?_0x1e6e93[_0x5cf819(0x6a)]():_0x1e6e93[_0x5cf819(0x6a)];this[_0x5cf819(0x7d)](_0x321e97,_0x658646||_0x5cf819(0xd0));});})[_0xcb065c(0xbe)](_0x2337da=>{const _0x3e4380=_0xcb065c,_0x3406dc=_0x4adb75[_0x3e4380(0x6b)][_0x3e4380(0x86)](_0x3e4380(0x98));throw _0x4adb75['ui'][_0x3e4380(0x6d)][_0x3e4380(0x96)](_0x52dcc1(_0x4adb75[_0x3e4380(0xe0)],_0x3e4380(0x95)),{'politeness':_0x3e4380(0xc8)}),_0x3406dc[_0x3e4380(0xa0)](_0x52dcc1(_0x4adb75[_0x3e4380(0xe0)],_0x3e4380(0xdd))),_0x2337da;})[_0xcb065c(0xa9)](()=>{const _0x3ee2e8=_0xcb065c;this[_0x3ee2e8(0x99)]=!0x1,this[_0x3ee2e8(0x8a)]();});}[_0x574974(0x7d)](_0x13e8ac,_0x3fed95){const _0x2a24b8=_0x574974,_0x2d1f5c=document[_0x2a24b8(0x72)]('a');_0x2d1f5c[_0x2a24b8(0x6c)]=window[_0x2a24b8(0xd1)][_0x2a24b8(0xb1)](_0x13e8ac),_0x2d1f5c[_0x2a24b8(0x90)]=_0x3fed95,_0x2d1f5c[_0x2a24b8(0x97)](),_0x2d1f5c[_0x2a24b8(0xc7)]();}}function a({pageWidth:_0x173cf6,marginLeft:_0x48b271,marginRight:_0x45f197}){const _0x6cced5=_0x574974;return _0x6cced5(0xdf)+[_0x173cf6,_0x48b271,_0x45f197][_0x6cced5(0x89)](Boolean)[_0x6cced5(0x8e)](_0x6cced5(0x75))+');';}function m(_0x283e54){const _0x3b390c=_0x574974;if(_0x3b390c(0xb6)==typeof _0x283e54&&_0x3b390c(0xc1)in _0x283e54)return _0x283e54[_0x3b390c(0xc1)];return{'letter':[_0x3b390c(0x79),_0x3b390c(0x80)],'legal':[_0x3b390c(0x79),_0x3b390c(0xc0)],'tabloid':[_0x3b390c(0x80),_0x3b390c(0xb5)],'ledger':[_0x3b390c(0xb5),_0x3b390c(0x80)],'a0':[_0x3b390c(0x73),_0x3b390c(0x9e)],'a1':[_0x3b390c(0xa5),_0x3b390c(0x73)],'a2':[_0x3b390c(0x93),_0x3b390c(0xa5)],'a3':[_0x3b390c(0xcc),_0x3b390c(0x93)],'a4':[_0x3b390c(0xb0),_0x3b390c(0xcc)],'a5':[_0x3b390c(0x9d),_0x3b390c(0xb0)],'a6':[_0x3b390c(0x70),_0x3b390c(0x9d)]}[_0x283e54[_0x3b390c(0x81)]()][0x0];}
|
package/src/exportpdfui.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
function _0x3fb6(){const _0x20c622=['label','get','543723oBIxRC','isOn','pluginName','isOfficialPlugin','Exporting\x20PDF\x20document','focus','Export\x20to\x20PDF','2111148kkTYqj','editing','22569968dxIsRH','isEnabled','menuBar:exportPdf','24npcCwZ','config','locale','bind','82399OSfmAj','isPremiumPlugin','children','isBusy','componentFactory','view','listenTo','57099zXNFlY','add','ExportPdfUI','873605oyQYbI','exportPdf','init','isVisible','commands','iconView','execute','_createButton','set','editor','2100218qyWHxb'];_0x3fb6=function(){return _0x20c622;};return _0x3fb6();}function _0x3511(_0x20fe8f,_0x242fe2){const _0x3fb6d0=_0x3fb6();return _0x3511=function(_0x3511c7,_0x1a46ff){_0x3511c7=_0x3511c7-0x1a8;let _0x2ce7ab=_0x3fb6d0[_0x3511c7];return _0x2ce7ab;},_0x3511(_0x20fe8f,_0x242fe2);}const _0x3ad3de=_0x3511;(function(_0x477310,_0x129eda){const _0x46524f=_0x3511,_0x32cdac=_0x477310();while(!![]){try{const _0x25e5c5=parseInt(_0x46524f(0x1b1))/0x1+-parseInt(_0x46524f(0x1c5))/0x2+parseInt(_0x46524f(0x1c8))/0x3+parseInt(_0x46524f(0x1ad))/0x4*(-parseInt(_0x46524f(0x1bb))/0x5)+-parseInt(_0x46524f(0x1a8))/0x6+-parseInt(_0x46524f(0x1b8))/0x7+parseInt(_0x46524f(0x1aa))/0x8;if(_0x25e5c5===_0x129eda)break;else _0x32cdac['push'](_0x32cdac['shift']());}catch(_0x2e1a0f){_0x32cdac['push'](_0x32cdac['shift']());}}}(_0x3fb6,0x98f04));import{Plugin as _0x50e1b3}from'ckeditor5/src/core.js';import{IconExportPdf as _0x6d217f}from'ckeditor5/src/icons.js';import{ButtonView as _0x58d8db,MenuBarMenuListItemButtonView as _0x3e9b2c,SpinnerView as _0x4ebd02}from'ckeditor5/src/ui.js';import{getTranslation as _0x4decd8}from'./utils/common-translations.js';export class ExportPdfUI extends _0x50e1b3{static get[_0x3ad3de(0x1ca)](){const _0x48a5c7=_0x3ad3de;return _0x48a5c7(0x1ba);}static get[_0x3ad3de(0x1cb)](){return!0x0;}static get[_0x3ad3de(0x1b2)](){return!0x0;}[_0x3ad3de(0x1bd)](){const _0x4a952e=_0x3ad3de,_0x5eec74=this[_0x4a952e(0x1c4)];_0x5eec74['ui'][_0x4a952e(0x1b5)][_0x4a952e(0x1b9)](_0x4a952e(0x1bc),()=>{const _0x1ac2ce=_0x4a952e,_0xe8aff3=this[_0x1ac2ce(0x1c2)](_0x58d8db),_0x235c2d=_0x5eec74[_0x1ac2ce(0x1bf)][_0x1ac2ce(0x1c7)](_0x1ac2ce(0x1bc));return _0xe8aff3[_0x1ac2ce(0x1c3)]({'tooltip':!0x0}),_0xe8aff3[_0x1ac2ce(0x1b0)](_0x1ac2ce(0x1c9))['to'](_0x235c2d,_0x1ac2ce(0x1b4)),_0xe8aff3;}),_0x5eec74['ui'][_0x4a952e(0x1b5)][_0x4a952e(0x1b9)](_0x4a952e(0x1ac),()=>this[_0x4a952e(0x1c2)](_0x3e9b2c));}[_0x3ad3de(0x1c2)](_0x505a81){const _0x285c24=_0x3ad3de,_0x2a7379=this[_0x285c24(0x1c4)],_0x4869a8=_0x2a7379[_0x285c24(0x1ae)][_0x285c24(0x1c7)](_0x285c24(0x1bc))||{},_0x4fd242=_0x2a7379[_0x285c24(0x1bf)][_0x285c24(0x1c7)](_0x285c24(0x1bc)),_0x117bed=new _0x505a81(_0x2a7379[_0x285c24(0x1af)]),_0x45a5b7=new _0x4ebd02();return _0x117bed[_0x285c24(0x1b3)][_0x285c24(0x1b9)](_0x45a5b7),_0x45a5b7[_0x285c24(0x1b0)](_0x285c24(0x1be))['to'](_0x4fd242,_0x285c24(0x1b4)),_0x117bed[_0x285c24(0x1c0)][_0x285c24(0x1b0)](_0x285c24(0x1be))['to'](_0x4fd242,_0x285c24(0x1b4),_0x495ae9=>!_0x495ae9),_0x117bed[_0x285c24(0x1c3)]({'icon':_0x6d217f}),_0x117bed[_0x285c24(0x1b0)](_0x285c24(0x1ab))['to'](_0x4fd242,_0x285c24(0x1ab)),_0x117bed[_0x285c24(0x1b0)](_0x285c24(0x1c6))['to'](_0x4fd242,_0x285c24(0x1b4),_0x226403=>_0x4decd8(_0x2a7379[_0x285c24(0x1af)],_0x226403?_0x285c24(0x1cc):_0x285c24(0x1ce))),this[_0x285c24(0x1b7)](_0x117bed,_0x285c24(0x1c1),()=>{const _0x44ab3b=_0x285c24;_0x2a7379[_0x44ab3b(0x1c1)](_0x44ab3b(0x1bc),_0x4869a8),_0x2a7379[_0x44ab3b(0x1a9)][_0x44ab3b(0x1b6)][_0x44ab3b(0x1cd)]();}),_0x117bed;}}
|
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module export-pdf
|
|
7
7
|
*/
|
|
8
|
-
export { ExportPdf, type ExportPdfConfig, type ExportPdfConverterOptions } from './exportpdf.js';
|
|
9
8
|
export { ExportPdfCommand } from './exportpdfcommand.js';
|
|
9
|
+
export { ExportPdf, type ExportPdfConfig, type ExportPdfConverterOptions, type ExportPdfPageFormat, type ExportPdfConverterOptionsV2, type ExportPdfSectionDefinitionV2 } from './exportpdf.js';
|
|
10
10
|
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
(function(_0x1b931e,_0x438096){var _0x4d7084=_0x183e,_0x537fbd=_0x1b931e();while(!![]){try{var _0x1d043d=parseInt(_0x4d7084(0x19f))/0x1+parseInt(_0x4d7084(0x19d))/0x2+-parseInt(_0x4d7084(0x19b))/0x3+parseInt(_0x4d7084(0x1a1))/0x4+parseInt(_0x4d7084(0x19c))/0x5*(parseInt(_0x4d7084(0x19e))/0x6)+parseInt(_0x4d7084(0x199))/0x7+parseInt(_0x4d7084(0x1a0))/0x8*(-parseInt(_0x4d7084(0x19a))/0x9);if(_0x1d043d===_0x438096)break;else _0x537fbd['push'](_0x537fbd['shift']());}catch(_0x49350c){_0x537fbd['push'](_0x537fbd['shift']());}}}(_0x35a6,0x8646c));export{ExportPdfCommand}from'./exportpdfcommand.js';function _0x35a6(){var _0x4ca032=['578732TqyODk','769416bdJQGZ','3255ECqcVw','62440AumvNC','3343984bhScjz','948549PBjkOB','576fDIPpe','1413240HNfVOx','10wVauFd'];_0x35a6=function(){return _0x4ca032;};return _0x35a6();}export{ExportPdf}from'./exportpdf.js';function _0x183e(_0x29cc3e,_0x18ca78){var _0x35a6ea=_0x35a6();return _0x183e=function(_0x183e19,_0x4ac837){_0x183e19=_0x183e19-0x199;var _0x46fb39=_0x35a6ea[_0x183e19];return _0x46fb39;},_0x183e(_0x29cc3e,_0x18ca78);}import'./augmentation.js';
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x21934e,_0x150c51){const t=_0x21934e['t'];switch(_0x150c51){case'Export\x20to\x20PDF':return t('Export\x20to\x20PDF');case'An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.':return t('An\x20error\x20occurred\x20while\x20generating\x20the\x20PDF.');case'PDF\x20export\x20started':return t('PDF\x20export\x20started');case'PDF\x20export\x20failed':return t('PDF\x20export\x20failed');case'PDF\x20export\x20successful':return t('PDF\x20export\x20successful');case'Exporting\x20PDF\x20document':return t('Exporting\x20PDF\x20document');default:return _0x150c51;}}
|