chromiumly 2.9.0 → 3.0.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.
Files changed (46) hide show
  1. package/README.md +46 -26
  2. package/dist/libre-office/index.d.ts +1 -2
  3. package/dist/libre-office/index.js +3 -3
  4. package/dist/libre-office/index.js.map +1 -1
  5. package/dist/libre-office/interfaces/libre-office.types.d.ts +9 -0
  6. package/dist/libre-office/libre-office.d.ts +27 -0
  7. package/dist/libre-office/libre-office.js +41 -0
  8. package/dist/libre-office/libre-office.js.map +1 -0
  9. package/dist/libre-office/utils/constants.js +102 -53
  10. package/dist/libre-office/utils/constants.js.map +1 -1
  11. package/dist/libre-office/utils/libre-office.utils.d.ts +9 -1
  12. package/dist/libre-office/utils/libre-office.utils.js +29 -0
  13. package/dist/libre-office/utils/libre-office.utils.js.map +1 -1
  14. package/dist/main.d.ts +2 -1
  15. package/dist/main.js +4 -2
  16. package/dist/main.js.map +1 -1
  17. package/dist/pdf-engines/index.d.ts +1 -1
  18. package/dist/pdf-engines/index.js +3 -3
  19. package/dist/pdf-engines/index.js.map +1 -1
  20. package/dist/pdf-engines/interfaces/pdf-engines.types.d.ts +8 -0
  21. package/dist/pdf-engines/interfaces/pdf-engines.types.js +3 -0
  22. package/dist/pdf-engines/interfaces/pdf-engines.types.js.map +1 -0
  23. package/dist/pdf-engines/{pdf.engine.d.ts → pdf-engines.d.ts} +9 -15
  24. package/dist/pdf-engines/{pdf.engine.js → pdf-engines.js} +22 -28
  25. package/dist/pdf-engines/pdf-engines.js.map +1 -0
  26. package/dist/pdf-engines/utils/{engine.utils.d.ts → pdf-engines.utils.d.ts} +10 -1
  27. package/dist/pdf-engines/utils/{engine.utils.js → pdf-engines.utils.js} +24 -4
  28. package/dist/pdf-engines/utils/pdf-engines.utils.js.map +1 -0
  29. package/package.json +5 -5
  30. package/src/chromium/interfaces/common.types.ts +1 -1
  31. package/src/libre-office/index.ts +1 -2
  32. package/src/libre-office/interfaces/libre-office.types.ts +11 -0
  33. package/src/libre-office/libre-office.ts +58 -0
  34. package/src/libre-office/tests/libre-office.test.ts +56 -0
  35. package/src/libre-office/utils/constants.ts +102 -53
  36. package/src/libre-office/utils/libre-office.utils.ts +43 -1
  37. package/src/libre-office/utils/tests/libre-office.utils.test.ts +15 -0
  38. package/src/main.ts +2 -1
  39. package/src/pdf-engines/index.ts +1 -1
  40. package/src/pdf-engines/interfaces/pdf-engines.types.ts +10 -0
  41. package/src/pdf-engines/{pdf.engine.ts → pdf-engines.ts} +27 -39
  42. package/src/pdf-engines/tests/pdf.engine.test.ts +20 -19
  43. package/src/pdf-engines/utils/{engine.utils.ts → pdf-engines.utils.ts} +29 -1
  44. package/src/pdf-engines/utils/tests/{engine.utils.test.ts → pdf-engines.utils.test.ts} +6 -7
  45. package/dist/pdf-engines/pdf.engine.js.map +0 -1
  46. package/dist/pdf-engines/utils/engine.utils.js.map +0 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [![downloads](https://img.shields.io/npm/dt/chromiumly.svg?color=brightgreen&style=flat-square)](https://npm-stat.com/charts.html?package=chromiumly)
9
9
  ![licence](https://img.shields.io/github/license/cherfia/chromiumly?style=flat-square)
10
10
 
11
- A lightweight Typescript library that interacts with [Gotenberg](https://gotenberg.dev/)'s different modules to convert
11
+ A lightweight Typescript library that interacts with [Gotenberg](https://gotenberg.dev/)'s different routes to convert
12
12
  a variety of document formats to PDF files.
13
13
 
14
14
  # Table of Contents
@@ -21,6 +21,7 @@ a variety of document formats to PDF files.
21
21
  - [dotenv](#dotenv)
22
22
  - [config](#config)
23
23
  3. [Modules](#modules)
24
+
24
25
  - [Chromium](#chromium)
25
26
  - [URL](#url)
26
27
  - [HTML](#html)
@@ -28,10 +29,14 @@ a variety of document formats to PDF files.
28
29
  - [Customization](#customization)
29
30
  - [Conversion](#conversion)
30
31
  - [Screenshot](#screenshot)
31
- - [PDF Engine](#pdf-engine)
32
+ - [LibreOffice](#libreoffice)
33
+ - [PDFEngines](#pdfengines)
32
34
  - [convert](#convert)
33
35
  - [merge](#merge)
36
+ - [readMetadata](#readmetadata)
37
+ - [writeMetadata](#writemetadata)
34
38
  - [generate](#generate)
39
+
35
40
  4. [Snippet](#snippet)
36
41
 
37
42
  ## Install
@@ -243,44 +248,59 @@ type ScreenshotOptions = {
243
248
  };
244
249
  ```
245
250
 
246
- ### PDF Engine
247
-
248
- The `PDFEngine` combines the functionality of
249
- Gotenberg's [PDF Engines](https://gotenberg.dev/docs/routes#convert-into-pdfa--pdfua-route)
250
- and [LibreOffice](https://gotenberg.dev/docs/routes#convert-with-libreoffice) modules to manipulate different file formats.
251
-
252
- #### convert
251
+ ### LibreOffice
253
252
 
254
- This method interacts with [LibreOffice](https://gotenberg.dev/docs/routes#convert-with-libreoffice) module to convert different
255
- documents to PDF files. You can find the file extensions
253
+ The `LibreOffice` class comes with a single method `convert`. This method interacts with [LibreOffice](https://gotenberg.dev/docs/routes#convert-with-libreoffice) route to convert different documents to PDF files. You can find the file extensions
256
254
  accepted [here](https://gotenberg.dev/docs/routes#convert-with-libreoffice#route).
257
255
 
258
256
  ```typescript
259
- import { PDFEngine } from "chromiumly";
257
+ import { LibreOffice } from "chromiumly";
260
258
 
261
- const buffer = await PDFEngine.convert({
259
+ const buffer = await LibreOffice.convert({
262
260
  files: ["path/to/file.docx", "path/to/file.png"],
263
261
  });
264
262
  ```
265
263
 
266
- Similarly to Chromium's module `convert` method, this method takes the following optional parameters :
264
+ Similarly to Chromium's route `convert` method, this method takes the following optional parameters :
267
265
 
268
266
  - `properties`: changes how the PDF generated file will look like.
269
- - `pdfFormat`: PDF format of the conversion resulting file (i.e. `PDF/A-1a`, `PDF/A-2b`, `PDF/A-3b`).
270
- - `merge`: merge all the resulting files from the conversion into an individual PDF file.
267
+ - `pdfa`: PDF format of the conversion resulting file (i.e. `PDF/A-1a`, `PDF/A-2b`, `PDF/A-3b`).
268
+ - `pdfUA`: enables PDF for Universal Access for optimal accessibility.
269
+ - `merge`: merges all the resulting files from the conversion into an individual PDF file.
270
+ - `metadata`: writes metadata to the generated PDF file.
271
+
272
+ ### PDFEngines
273
+
274
+ The `PDFEngines` class interacts with Gotenberg's [PDF Engines](https://gotenberg.dev/docs/routes#convert-into-pdfa--pdfua-route) routes to manupilate PDF files.
275
+
276
+ #### convert
277
+
278
+ This method interacts with [PDF Engines](https://gotenberg.dev/docs/routes#convert-into-pdfa--pdfua-route) convertion route to transform PDF files into the requested PDF/A format and/or PDF/UA.
279
+
280
+ ```typescript
281
+ import { PDFEngines } from "chromiumly";
282
+
283
+ const buffer = await PDFEngines.convert({
284
+ files: ["path/to/file_1.pdf", "path/to/file_2.pdf"],
285
+ pdfa: PdfFormat.A_2b,
286
+ pdfUA: true,
287
+ });
288
+ ```
271
289
 
272
290
  #### merge
273
291
 
274
- This method interacts with [PDF Engines](https://gotenberg.dev/docs/routes#merge-pdfs-route) module which gathers different
292
+ This method interacts with [PDF Engines](https://gotenberg.dev/docs/routes#merge-pdfs-route) merge route which gathers different
275
293
  engines that can manipulate and merge PDF files such
276
294
  as: [PDFtk](https://gitlab.com/pdftk-java/pdftk), [PDFcpu](https://github.com/pdfcpu/pdfcpu), [QPDF](https://github.com/qpdf/qpdf),
277
295
  and [UNO](https://github.com/unoconv/unoconv).
278
296
 
279
297
  ```typescript
280
- import { PDFEngine } from "chromiumly";
298
+ import { PDFEngines } from "chromiumly";
281
299
 
282
- const buffer = await PDFEngine.merge({
283
- files: ["path/to/file.docx", "path/to/file.png"],
300
+ const buffer = await PDFEngines.merge({
301
+ files: ["path/to/file_1.pdf", "path/to/file_2.pdf"],
302
+ pdfa: PdfFormat.A_2b,
303
+ pdfUA: true,
284
304
  });
285
305
  ```
286
306
 
@@ -289,9 +309,9 @@ const buffer = await PDFEngine.merge({
289
309
  This method reads metadata from the provided PDF files.
290
310
 
291
311
  ```typescript
292
- import { PDFEngine } from "chromiumly";
312
+ import { PDFEngines } from "chromiumly";
293
313
 
294
- const metadataBuffer = await PDFEngine.readMetadata([
314
+ const metadataBuffer = await PDFEngines.readMetadata([
295
315
  "path/to/file_1.pdf",
296
316
  "path/to/file_2.pdf",
297
317
  ]);
@@ -302,9 +322,9 @@ const metadataBuffer = await PDFEngine.readMetadata([
302
322
  This method writes metadata to the provided PDF files.
303
323
 
304
324
  ```typescript
305
- import { PDFEngine } from "chromiumly";
325
+ import { PDFEngines } from "chromiumly";
306
326
 
307
- const buffer = await PDFEngine.writeMetadata({
327
+ const buffer = await PDFEngines.writeMetadata({
308
328
  files: [
309
329
  "path/to/file_1.pdf",
310
330
  "path/to/file_2.pdf",
@@ -331,7 +351,7 @@ Please note that all the PDF files can be found `__generated__` folder in the ro
331
351
  The following is a short snippet of how to use the library.
332
352
 
333
353
  ```typescript
334
- import { PDFEngine, UrlConverter } from "chromiumly";
354
+ import { PDFEngines, UrlConverter } from "chromiumly";
335
355
 
336
356
  async function run() {
337
357
  const urlConverter = new UrlConverter();
@@ -339,7 +359,7 @@ async function run() {
339
359
  url: "https://gotenberg.dev/",
340
360
  });
341
361
 
342
- await PDFEngine.generate("gotenberg.pdf", buffer);
362
+ await PDFEngines.generate("gotenberg.pdf", buffer);
343
363
  }
344
364
 
345
365
  run();
@@ -1,2 +1 @@
1
- export { PageProperties } from './interfaces/libre-office.types';
2
- export { LibreOfficeUtils } from './utils/libre-office.utils';
1
+ export { LibreOffice } from './libre-office';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LibreOfficeUtils = void 0;
4
- var libre_office_utils_1 = require("./utils/libre-office.utils");
5
- Object.defineProperty(exports, "LibreOfficeUtils", { enumerable: true, get: function () { return libre_office_utils_1.LibreOfficeUtils; } });
3
+ exports.LibreOffice = void 0;
4
+ var libre_office_1 = require("./libre-office");
5
+ Object.defineProperty(exports, "LibreOffice", { enumerable: true, get: function () { return libre_office_1.LibreOffice; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/libre-office/index.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAArD,sHAAA,gBAAgB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/libre-office/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
@@ -1,7 +1,16 @@
1
+ import { Metadata, PdfFormat } from '../../common';
1
2
  export type PageProperties = {
2
3
  landscape?: boolean;
3
4
  nativePageRanges?: {
4
5
  from: number;
5
6
  to: number;
6
7
  };
8
+ exportFormFields?: boolean;
9
+ };
10
+ export type ConversionOptions = {
11
+ properties?: PageProperties;
12
+ merge?: boolean;
13
+ pdfa?: PdfFormat;
14
+ pdfUA?: boolean;
15
+ metadata?: Metadata;
7
16
  };
@@ -0,0 +1,27 @@
1
+ /// <reference types="node" />
2
+ import { PathLikeOrReadStream, PdfFormat, Metadata } from '../common';
3
+ import { PageProperties } from './interfaces/libre-office.types';
4
+ /**
5
+ * Class representing a LibreOffice for various operations such as merging and conversion.
6
+ */
7
+ export declare class LibreOffice {
8
+ /**
9
+ * Converts various document formats to PDF.
10
+ *
11
+ * @param {Object} options - Options for the conversion operation.
12
+ * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the files to be converted to PDF.
13
+ * @param {PageProperties} [options.properties] - Page properties for the conversion.
14
+ * @param {pdfa} [options.pdfFormat] - PDF format options.
15
+ * @param {boolean} [options.pdfUA] - Indicates whether to generate PDF/UA compliant output.
16
+ * @param {boolean} [options.merge] - Indicates whether to merge the resulting PDFs.
17
+ * @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a Buffer.
18
+ */
19
+ static convert({ files, properties, pdfa, pdfUA, merge, metadata }: {
20
+ files: PathLikeOrReadStream[];
21
+ properties?: PageProperties;
22
+ pdfa?: PdfFormat;
23
+ pdfUA?: boolean;
24
+ merge?: boolean;
25
+ metadata?: Metadata;
26
+ }): Promise<Buffer>;
27
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LibreOffice = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const form_data_1 = tslib_1.__importDefault(require("form-data"));
6
+ const main_config_1 = require("../main.config");
7
+ const common_1 = require("../common");
8
+ const libre_office_utils_1 = require("./utils/libre-office.utils");
9
+ /**
10
+ * Class representing a LibreOffice for various operations such as merging and conversion.
11
+ */
12
+ class LibreOffice {
13
+ /**
14
+ * Converts various document formats to PDF.
15
+ *
16
+ * @param {Object} options - Options for the conversion operation.
17
+ * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the files to be converted to PDF.
18
+ * @param {PageProperties} [options.properties] - Page properties for the conversion.
19
+ * @param {pdfa} [options.pdfFormat] - PDF format options.
20
+ * @param {boolean} [options.pdfUA] - Indicates whether to generate PDF/UA compliant output.
21
+ * @param {boolean} [options.merge] - Indicates whether to merge the resulting PDFs.
22
+ * @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a Buffer.
23
+ */
24
+ static convert(_a) {
25
+ return tslib_1.__awaiter(this, arguments, void 0, function* ({ files, properties, pdfa, pdfUA, merge, metadata }) {
26
+ const data = new form_data_1.default();
27
+ yield libre_office_utils_1.LibreOfficeUtils.addFiles(files, data);
28
+ yield libre_office_utils_1.LibreOfficeUtils.customize(data, {
29
+ properties,
30
+ merge,
31
+ pdfa,
32
+ pdfUA,
33
+ metadata
34
+ });
35
+ const endpoint = `${main_config_1.Chromiumly.GOTENBERG_ENDPOINT}/${main_config_1.Chromiumly.LIBRE_OFFICE_PATH}/${main_config_1.Chromiumly.LIBRE_OFFICE_ROUTES.convert}`;
36
+ return common_1.GotenbergUtils.fetch(endpoint, data);
37
+ });
38
+ }
39
+ }
40
+ exports.LibreOffice = LibreOffice;
41
+ //# sourceMappingURL=libre-office.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"libre-office.js","sourceRoot":"","sources":["../../src/libre-office/libre-office.ts"],"names":[],"mappings":";;;;AAAA,kEAAiC;AAEjC,gDAA4C;AAC5C,sCAKmB;AAEnB,mEAA8D;AAE9D;;GAEG;AACH,MAAa,WAAW;IACpB;;;;;;;;;;OAUG;IACI,MAAM,CAAO,OAAO;qEAAC,EACxB,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EAQX;YACG,MAAM,IAAI,GAAG,IAAI,mBAAQ,EAAE,CAAC;YAE5B,MAAM,qCAAgB,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC7C,MAAM,qCAAgB,CAAC,SAAS,CAAC,IAAI,EAAE;gBACnC,UAAU;gBACV,KAAK;gBACL,IAAI;gBACJ,KAAK;gBACL,QAAQ;aACX,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,GAAG,wBAAU,CAAC,kBAAkB,IAAI,wBAAU,CAAC,iBAAiB,IAAI,wBAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;YAE9H,OAAO,uBAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAChD,CAAC;KAAA;CACJ;AA1CD,kCA0CC"}
@@ -2,86 +2,135 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LIBRE_OFFICE_EXTENSIONS = void 0;
4
4
  exports.LIBRE_OFFICE_EXTENSIONS = [
5
+ '123',
6
+ '602',
7
+ 'abw',
5
8
  'bib',
9
+ 'bmp',
10
+ 'cdr',
11
+ 'cgm',
12
+ 'cmx',
13
+ 'csv',
14
+ 'cwk',
15
+ 'dbf',
16
+ 'dif',
6
17
  'doc',
7
- 'xml',
18
+ 'docm',
8
19
  'docx',
9
- 'fodt',
10
- 'html',
11
- 'ltx',
12
- 'txt',
13
- 'odt',
14
- 'ott',
15
- 'pdb',
16
- 'pdf',
17
- 'psw',
18
- 'rtf',
19
- 'sdw',
20
- 'stw',
21
- 'sxw',
22
- 'uot',
23
- 'vor',
24
- 'wps',
25
- 'epub',
26
- 'png',
27
- 'bmp',
20
+ 'dot',
21
+ 'dotm',
22
+ 'dotx',
23
+ 'dxf',
28
24
  'emf',
29
25
  'eps',
26
+ 'epub',
30
27
  'fodg',
28
+ 'fodp',
29
+ 'fods',
30
+ 'fodt',
31
+ 'fopd',
31
32
  'gif',
33
+ 'htm',
34
+ 'html',
35
+ 'hwp',
36
+ 'jpeg',
32
37
  'jpg',
38
+ 'key',
39
+ 'ltx',
40
+ 'lwp',
41
+ 'mcw',
33
42
  'met',
43
+ 'mml',
44
+ 'mw',
45
+ 'numbers',
34
46
  'odd',
47
+ 'odg',
48
+ 'odm',
49
+ 'odp',
50
+ 'ods',
51
+ 'odt',
35
52
  'otg',
53
+ 'oth',
54
+ 'otp',
55
+ 'ots',
56
+ 'ott',
57
+ 'pages',
36
58
  'pbm',
59
+ 'pcd',
37
60
  'pct',
61
+ 'pcx',
62
+ 'pdb',
63
+ 'pdf',
38
64
  'pgm',
65
+ 'png',
66
+ 'pot',
67
+ 'potm',
68
+ 'potx',
39
69
  'ppm',
70
+ 'pps',
71
+ 'ppt',
72
+ 'pptm',
73
+ 'pptx',
74
+ 'psd',
75
+ 'psw',
76
+ 'pub',
77
+ 'pwp',
78
+ 'pxl',
40
79
  'ras',
80
+ 'rtf',
81
+ 'sda',
82
+ 'sdc',
83
+ 'sdd',
84
+ 'sdp',
85
+ 'sdw',
86
+ 'sgl',
87
+ 'slk',
88
+ 'smf',
89
+ 'stc',
41
90
  'std',
91
+ 'sti',
92
+ 'stw',
42
93
  'svg',
43
94
  'svm',
44
95
  'swf',
96
+ 'sxc',
45
97
  'sxd',
98
+ 'sxg',
99
+ 'sxi',
100
+ 'sxm',
46
101
  'sxw',
102
+ 'tga',
103
+ 'tif',
47
104
  'tiff',
48
- 'xhtml',
49
- 'xpm',
50
- 'fodp',
51
- 'pages',
52
- 'potm',
53
- 'pot',
54
- 'pptx',
55
- 'pps',
56
- 'ppt',
57
- 'pwp',
58
- 'sda',
59
- 'sdd',
60
- 'sti',
61
- 'sxi',
105
+ 'txt',
106
+ 'uof',
62
107
  'uop',
63
- 'wmf',
64
- 'csv',
65
- 'dbf',
66
- 'dif',
67
- 'fods',
68
- 'ods',
69
- 'ots',
70
- 'pxl',
71
- 'sdc',
72
- 'slk',
73
- 'stc',
74
- 'sxc',
75
108
  'uos',
109
+ 'uot',
110
+ 'vdx',
111
+ 'vor',
112
+ 'vsd',
113
+ 'vsdm',
114
+ 'vsdx',
115
+ 'wb2',
116
+ 'wk1',
117
+ 'wks',
118
+ 'wmf',
119
+ 'wpd',
120
+ 'wpg',
121
+ 'wps',
122
+ 'xbm',
123
+ 'xhtml',
76
124
  'xls',
77
- 'xlt',
125
+ 'xlsb',
126
+ 'xlsm',
78
127
  'xlsx',
79
- 'tif',
80
- 'jpeg',
81
- 'odp',
82
- 'odg',
83
- 'dotx',
128
+ 'xlt',
129
+ 'xltm',
84
130
  'xltx',
85
- 'key'
131
+ 'xlw',
132
+ 'xml',
133
+ 'xpm',
134
+ 'zabw'
86
135
  ];
87
136
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/libre-office/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACnC,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;CACR,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/libre-office/utils/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;IACnC,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,IAAI;IACJ,SAAS;IACT,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;CACT,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import FormData from 'form-data';
2
2
  import { PathLikeOrReadStream } from '../../common';
3
- import { PageProperties } from '../interfaces/libre-office.types';
3
+ import { ConversionOptions, PageProperties } from '../interfaces/libre-office.types';
4
4
  /**
5
5
  * Utility class for handling common tasks related to LibreOffice conversions.
6
6
  */
@@ -20,4 +20,12 @@ export declare class LibreOfficeUtils {
20
20
  * @param {PageProperties} pageProperties - The page properties to be added to the FormData.
21
21
  */
22
22
  static addPageProperties(data: FormData, pageProperties: PageProperties): void;
23
+ /**
24
+ * Customizes the FormData object based on the provided conversion options.
25
+ *
26
+ * @param {FormData} data - The FormData object to be customized.
27
+ * @param {ConversionOptions} options - The conversion options to apply to the FormData.
28
+ * @returns {Promise<void>} A Promise that resolves once the customization is complete.
29
+ */
30
+ static customize(data: FormData, options: ConversionOptions): Promise<void>;
23
31
  }
@@ -65,6 +65,35 @@ class LibreOfficeUtils {
65
65
  pageProperties.nativePageRanges.from, 'page ranges syntax error');
66
66
  data.append('nativePageRanges', `${pageProperties.nativePageRanges.from}-${pageProperties.nativePageRanges.to}`);
67
67
  }
68
+ if (pageProperties.exportFormFields === false) {
69
+ data.append('exportFormFields', String(pageProperties.exportFormFields));
70
+ }
71
+ }
72
+ /**
73
+ * Customizes the FormData object based on the provided conversion options.
74
+ *
75
+ * @param {FormData} data - The FormData object to be customized.
76
+ * @param {ConversionOptions} options - The conversion options to apply to the FormData.
77
+ * @returns {Promise<void>} A Promise that resolves once the customization is complete.
78
+ */
79
+ static customize(data, options) {
80
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
81
+ if (options.pdfa) {
82
+ data.append('pdfa', options.pdfa);
83
+ }
84
+ if (options.pdfUA) {
85
+ data.append('pdfUA', String(options.pdfUA));
86
+ }
87
+ if (options.merge) {
88
+ data.append('merge', String(options.merge));
89
+ }
90
+ if (options.metadata) {
91
+ data.append('metadata', JSON.stringify(options.metadata));
92
+ }
93
+ if (options.properties) {
94
+ LibreOfficeUtils.addPageProperties(data, options.properties);
95
+ }
96
+ });
68
97
  }
69
98
  }
70
99
  exports.LibreOfficeUtils = LibreOfficeUtils;
@@ -1 +1 @@
1
- {"version":3,"file":"libre-office.utils.js","sourceRoot":"","sources":["../../../src/libre-office/utils/libre-office.utils.ts"],"names":[],"mappings":";;;;AAAA,2BAAuE;AACvE,wDAAwB;AAExB,yCAAmD;AAInD,yCAAoE;AACpE,2CAAsD;AAGtD;;GAEG;AACH,MAAa,gBAAgB;IACzB;;;;;;OAMG;IACI,MAAM,CAAO,QAAQ,CACxB,KAA6B,EAC7B,IAAc;;YAEd,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;gBACzC,IAAI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D,4CA6GC"}
package/dist/main.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { PdfFormat } from './common/constants';
2
2
  export { HtmlConverter, HtmlScreenshot, MarkdownConverter, MarkdownScreenshot, UrlConverter, UrlScreenshot } from './chromium';
3
- export { PDFEngine } from './pdf-engines';
3
+ export { PDFEngines } from './pdf-engines';
4
+ export { LibreOffice } from './libre-office';
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PDFEngine = exports.UrlScreenshot = exports.UrlConverter = exports.MarkdownScreenshot = exports.MarkdownConverter = exports.HtmlScreenshot = exports.HtmlConverter = exports.PdfFormat = void 0;
3
+ exports.LibreOffice = exports.PDFEngines = exports.UrlScreenshot = exports.UrlConverter = exports.MarkdownScreenshot = exports.MarkdownConverter = exports.HtmlScreenshot = exports.HtmlConverter = exports.PdfFormat = void 0;
4
4
  var constants_1 = require("./common/constants");
5
5
  Object.defineProperty(exports, "PdfFormat", { enumerable: true, get: function () { return constants_1.PdfFormat; } });
6
6
  var chromium_1 = require("./chromium");
@@ -11,5 +11,7 @@ Object.defineProperty(exports, "MarkdownScreenshot", { enumerable: true, get: fu
11
11
  Object.defineProperty(exports, "UrlConverter", { enumerable: true, get: function () { return chromium_1.UrlConverter; } });
12
12
  Object.defineProperty(exports, "UrlScreenshot", { enumerable: true, get: function () { return chromium_1.UrlScreenshot; } });
13
13
  var pdf_engines_1 = require("./pdf-engines");
14
- Object.defineProperty(exports, "PDFEngine", { enumerable: true, get: function () { return pdf_engines_1.PDFEngine; } });
14
+ Object.defineProperty(exports, "PDFEngines", { enumerable: true, get: function () { return pdf_engines_1.PDFEngines; } });
15
+ var libre_office_1 = require("./libre-office");
16
+ Object.defineProperty(exports, "LibreOffice", { enumerable: true, get: function () { return libre_office_1.LibreOffice; } });
15
17
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,sGAAA,SAAS,OAAA;AAClB,uCAOoB;AANhB,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AACZ,yGAAA,aAAa,OAAA;AAEjB,6CAA0C;AAAjC,wGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAAtC,sGAAA,SAAS,OAAA;AAClB,uCAOoB;AANhB,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,6GAAA,iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AACZ,yGAAA,aAAa,OAAA;AAEjB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,+CAA6C;AAApC,2GAAA,WAAW,OAAA"}
@@ -1 +1 @@
1
- export { PDFEngine } from './pdf.engine';
1
+ export { PDFEngines } from './pdf-engines';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PDFEngine = void 0;
4
- var pdf_engine_1 = require("./pdf.engine");
5
- Object.defineProperty(exports, "PDFEngine", { enumerable: true, get: function () { return pdf_engine_1.PDFEngine; } });
3
+ exports.PDFEngines = void 0;
4
+ var pdf_engines_1 = require("./pdf-engines");
5
+ Object.defineProperty(exports, "PDFEngines", { enumerable: true, get: function () { return pdf_engines_1.PDFEngines; } });
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pdf-engines/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,uGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pdf-engines/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA"}
@@ -0,0 +1,8 @@
1
+ import { Metadata, PdfFormat } from '../../common';
2
+ export type ConversionOptions = {
3
+ pdfa?: PdfFormat;
4
+ pdfUA?: boolean;
5
+ };
6
+ export type MergeOptions = ConversionOptions & {
7
+ metadata?: Metadata;
8
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pdf-engines.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pdf-engines.types.js","sourceRoot":"","sources":["../../../src/pdf-engines/interfaces/pdf-engines.types.ts"],"names":[],"mappings":""}
@@ -1,10 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { PathLikeOrReadStream, PdfFormat, Metadata } from '../common';
3
- import { PageProperties } from '../libre-office';
4
3
  /**
5
- * Class representing a PDF engine for various operations such as merging and conversion.
4
+ * Class uses PDF engines for various operations such as merging and conversion.
6
5
  */
7
- export declare class PDFEngine {
6
+ export declare class PDFEngines {
8
7
  /**
9
8
  * Merges multiple PDF files into a single PDF document.
10
9
  *
@@ -12,30 +11,25 @@ export declare class PDFEngine {
12
11
  * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the PDF files to be merged.
13
12
  * @returns {Promise<Buffer>} A Promise resolving to the merged PDF content as a Buffer.
14
13
  */
15
- static merge({ files }: {
14
+ static merge({ files, pdfa, pdfUA, metadata }: {
16
15
  files: PathLikeOrReadStream[];
16
+ pdfa?: PdfFormat;
17
+ pdfUA?: boolean;
18
+ metadata?: Metadata;
17
19
  }): Promise<Buffer>;
18
20
  /**
19
21
  * Converts various document formats to PDF.
20
22
  *
21
23
  * @param {Object} options - Options for the conversion operation.
22
24
  * @param {PathLikeOrReadStream[]} options.files - An array of PathLikes or ReadStreams to the files to be converted to PDF.
23
- * @param {PageProperties} [options.properties] - Page properties for the conversion.
24
- * @param {PdfFormat} [options.pdfFormat] - PDF format options.
25
+ * @param {pdfa} [options.pdfa] - PDF format options.
25
26
  * @param {boolean} [options.pdfUA] - Indicates whether to generate PDF/UA compliant output.
26
- * @param {boolean} [options.merge] - Indicates whether to merge the resulting PDFs.
27
27
  * @returns {Promise<Buffer>} A Promise resolving to the converted PDF content as a Buffer.
28
28
  */
29
- static convert({ files, properties, pdfFormat, pdfUA, merge }: {
29
+ static convert({ files, pdfa, pdfUA }: {
30
30
  files: PathLikeOrReadStream[];
31
- properties?: PageProperties;
32
- /**
33
- * @deprecated Starting from Gotenberg version 8.0.0, LibreOffice no longer provides support for pdfFormat.
34
- * @see {@link https://github.com/gotenberg/gotenberg/releases/tag/v8.0.0}
35
- */
36
- pdfFormat?: PdfFormat;
31
+ pdfa?: PdfFormat;
37
32
  pdfUA?: boolean;
38
- merge?: boolean;
39
33
  }): Promise<Buffer>;
40
34
  /**
41
35
  * Reads metadata from the provided files.