pd4ml 0.0.0-stage → 1.0.1

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/docs/api.md ADDED
@@ -0,0 +1,546 @@
1
+ # PD4ML API reference (Node.js)
2
+
3
+ _Generated by `tools/gen-types.js` from the PD4ML Java classes - do not edit._
4
+
5
+ Every public PD4ML class is exported under its own name. Java methods keep their Java names; public fields are read with `obj.$get(name)`, static ones as properties (`PageSize.A4`). Java types appear as JavaScript types: `number` for numbers (`Java.float(10)` forces a float), `Buffer` for `byte[]` and `InputStream`, a path or `URL` for `URL`/`File`, `JavaObject` for any other Java object. Descriptions of each method are in the [PD4ML manual](https://pd4ml.com/docs/pd4ml-manual.html).
6
+
7
+ ## PD4ML
8
+
9
+ `com.pd4ml.PD4ML` — the `PD4ML` class adds Node I/O methods: see the guide
10
+
11
+ | Field | Type | |
12
+ |---|---|---|
13
+ | `PD4ML.disableBatik` | `boolean` | static |
14
+ | `PD4ML.disableMathML` | `boolean` | static |
15
+
16
+ ```ts
17
+ applyLicense(license: string): boolean
18
+ isDemoMode(): boolean
19
+ isPro(): boolean
20
+ PD4ML.getVersion(): string
21
+ PD4ML.getVersionBuildDate(): JavaObject
22
+ merge(pdf: PdfDocument, fromPage: number | JavaFloat, toPage: number | JavaFloat, append: boolean): void
23
+ terminate(): void
24
+ setLogLevel(level: number | JavaFloat): void
25
+ setErrorPolicy(policy: ErrorPolicy): void
26
+ useTTF(pathToFontDirs: string): void
27
+ useTTF(pathToFontDirs: string, generateFontMappingFileIfMissing: boolean): void
28
+ useTTF(pathToFontDirs: string, fontFileNameFilter: string): void
29
+ embedTTFs(embed: boolean, allGlyphs: boolean): void
30
+ generateForms(enable: boolean, useTtfFont: string): void
31
+ generateForms(enable: boolean, useTtfFont: string, formFontCharRange: string): void
32
+ isGenerateForms(): boolean
33
+ getFormFont(): string
34
+ getFormFontCharRange(): string
35
+ generateMulticolumn(columns: number | JavaFloat, span: number | JavaFloat, millimeters: boolean): void
36
+ useHttpRequest(httpRequest: unknown, httpResponse: unknown): void
37
+ addCustomResourceProvider(customProviderClassName: string): void
38
+ addCustomTagHandler(customTagName: string, implementation: CustomTag): void
39
+ generateBookmarksFromHeadings(enable: boolean): void
40
+ generateBookmarksFromAnchors(enable: boolean): void
41
+ generateBookmarksFromHeadings(): boolean
42
+ generateBookmarksFromAnchors(): boolean
43
+ setSessionID(sessionID: string): void
44
+ overrideDocumentEncoding(encoding: string): void
45
+ enableHyperlinks(enable: boolean): void
46
+ isHyperlinksDisabled(): boolean
47
+ isGenerateTooltips(): boolean
48
+ setPageHeader(htmlCode: string, heightPx: number | JavaFloat): void
49
+ setPageHeader(htmlCode: string, heightPx: number | JavaFloat, scope: string): void
50
+ setPageFooter(htmlCode: string, heightPx: number | JavaFloat): void
51
+ setPageFooter(htmlCode: string, heightPx: number | JavaFloat, scope: string): void
52
+ setWatermark(htmlCode: string, left: number | JavaFloat, top: number | JavaFloat, opacity: number | JavaFloat, angle: number | JavaFloat, scale: number | JavaFloat, screen: boolean, print: boolean, scope: string): void
53
+ setPageBackground(htmlCode: string): void
54
+ setPageBackground(htmlCode: string, scope: string): void
55
+ setPermissions(password: string, permissions: number | JavaFloat): void
56
+ setPermissions(password: string, permissions: number | JavaFloat, encryptionMethod: number | JavaFloat): void
57
+ setCookie(name: string, value: string): void
58
+ setHttpOptions(proxy: string, basicAuthentication: string): void
59
+ addDocumentActionHandler(actionType: string, javaScript: string): void
60
+ getActionHandlers(): JavaObject
61
+ setPageSize(d: PageSize, scope: string): void
62
+ setPageSize(d: PageSize): void
63
+ getPageSize(pageNum: number | JavaFloat): PageSize
64
+ setPageMargins(margins: PageMargins): void
65
+ setPageMargins(margins: PageMargins, scope: string): void
66
+ getPageMargins(pageNum: number | JavaFloat, imageGeneration: boolean): PageMargins
67
+ setHtmlWidth(width: number | JavaFloat): void
68
+ adjustHtmlWidth(adjust: boolean): void
69
+ fitPageVertically(align: number | JavaFloat): void
70
+ getFitPageVertically(): number
71
+ setAuthorName(name: string): void
72
+ setDocumentTitle(title: string): void
73
+ setInitialPageNumber(initialPageNumber: number | JavaFloat): void
74
+ addStyle(stylesheet: string | URL | JavaObject, overrideDocumentStyles: boolean): void
75
+ addStyle(stylesheet: string, overrideDocumentStyles: boolean): void
76
+ injectHtml(htmlSnippet: string, prependBodyContent: boolean): void
77
+ isKeepTrailingBlankPages(): boolean
78
+ testTermination(): void
79
+ getHeight(width: number | JavaFloat): number
80
+ getDocumentTitle(): string
81
+ setRenderingHints(hints: Record<string, string>): void
82
+ dump(mode: number | JavaFloat): string
83
+ protectPhysicalUnitDimensions(keepPhysicalUnitDimensions: boolean): void
84
+ PD4ML.translateToPt(mm: number | JavaFloat): number
85
+ PD4ML.predictScale(pageMargins: PageMargins, pageSize: PageSize, userSpace: number | JavaFloat): number
86
+ PD4ML.predictPageHeight(pageMargins: PageMargins, pageSize: PageSize, userSpace: number | JavaFloat): number
87
+ setDynamicData(map: Record<string, string>): void
88
+ setParam(key: string, value: string): void
89
+ getLastRenderInfo(key: string): unknown
90
+ outputRange(description: string): void
91
+ addMetadata(key: string, value: string, hide: boolean): void
92
+ applyKerning(enable: boolean): void
93
+ enableLigatures(enable: boolean): void
94
+ getCache(): unknown
95
+ setCache(fontCache: unknown): void
96
+ asyncResourceLoader(threadPoolSize: number | JavaFloat): void
97
+ ```
98
+
99
+ ## Constants
100
+
101
+ `com.pd4ml.Constants`
102
+
103
+ | Field | Type | |
104
+ |---|---|---|
105
+ | `Constants.TRANSLATE_FACTOR` | `number` | static read-only |
106
+ | `Constants.DefaultPermissions` | `number` | static read-only |
107
+ | `Constants.AllowDegradedPrint` | `number` | static read-only |
108
+ | `Constants.AllowModify` | `number` | static read-only |
109
+ | `Constants.AllowCopy` | `number` | static read-only |
110
+ | `Constants.AllowAnnotate` | `number` | static read-only |
111
+ | `Constants.AllowFillingForms` | `number` | static read-only |
112
+ | `Constants.AllowContentExtraction` | `number` | static read-only |
113
+ | `Constants.AllowAssembly` | `number` | static read-only |
114
+ | `Constants.AllowPrint` | `number` | static read-only |
115
+ | `Constants.PD4ML_MAX_CACHE_ENTRIES` | `string` | static read-only |
116
+ | `Constants.PD4ML_MAX_CACHE_SIZE` | `string` | static read-only |
117
+ | `Constants.PD4ML_MAX_CACHE_VOLUME` | `string` | static read-only |
118
+ | `Constants.PD4ML_IDS_AS_DESTINATIONS` | `string` | static read-only |
119
+ | `Constants.PD4ML_EXTRA_RESOURCE_LOADERS` | `string` | static read-only |
120
+ | `Constants.PD4ML_DOCUMENT_VIEW_MODE` | `string` | static read-only |
121
+ | `Constants.PD4ML_DOCUMENT_DATE` | `string` | static read-only |
122
+ | `Constants.PD4ML_WORD_EDITABLE` | `string` | static read-only |
123
+ | `Constants.PD4ML_DOCUMENT_XMP_DATE` | `string` | static read-only |
124
+ | `Constants.PD4ML_FAKE_BROWSER` | `string` | static read-only |
125
+ | `Constants.PD4ML_CACHE_ENABLE` | `string` | static read-only |
126
+ | `Constants.PD4ML_SESSIONID_APPEND` | `string` | static read-only |
127
+ | `Constants.PD4ML_SOCKET_TIMEOUT` | `string` | static read-only |
128
+ | `Constants.PD4ML_PRINT_DIALOG_POPUP` | `string` | static read-only |
129
+ | `Constants.PD4ML_MEDIA_TYPE_PRINT` | `string` | static read-only |
130
+ | `Constants.PD4ML_CSS_IMPORT_DIRECTIVE` | `string` | static read-only |
131
+ | `Constants.PD4ML_SESSIONID_VARNAME` | `string` | static read-only |
132
+ | `Constants.PD4ML_INITIAL_PAGE_NUMBER` | `string` | static read-only |
133
+ | `Constants.PD4ML_HTML_IN_DYNAMIC_DATA` | `string` | static read-only |
134
+ | `Constants.PD4ML_ALLOWED_RESOURCE_LOCATION` | `string` | static read-only |
135
+ | `Constants.PD4ML_DISABLE_EXTERNAL_ATTACHMENTS` | `string` | static read-only |
136
+ | `Constants.PD4ML_GENERATE_TOOLTIPS` | `string` | static read-only |
137
+ | `Constants.PD4ML_CACHE_IMAGES_IN_TMP_DIR` | `string` | static read-only |
138
+ | `Constants.PD4ML_HTTP_REQUEST_DISPATCHER` | `string` | static read-only |
139
+ | `Constants.PD4ML_PDFA_STATUS` | `string` | static read-only |
140
+ | `Constants.PD4ML_DOCUMENT_HEIGHT_PX` | `string` | static read-only |
141
+ | `Constants.PD4ML_RIGHT_EDGE_PX` | `string` | static read-only |
142
+ | `Constants.PD4ML_TOTAL_PAGES` | `string` | static read-only |
143
+ | `Constants.PD4ML_INFO_AUTHOR` | `string` | static read-only |
144
+ | `Constants.PD4ML_INFO_TITLE` | `string` | static read-only |
145
+ | `Constants.PD4ML_FORCE_RTL` | `string` | static read-only |
146
+ | `Constants.PD4ML_BACKGROUND_AS_PATTERNS` | `string` | static read-only |
147
+ | `Constants.PD4ML_CONFIG_FILE` | `string` | static read-only |
148
+ | `Constants.PD4ML_CONFIG_HANDLER_CLASS` | `string` | static read-only |
149
+ | `Constants.PD4ML_IMAGE_REPOSITORY` | `string` | static read-only |
150
+ | `Constants.PD4ML_FIX20130116` | `string` | static read-only |
151
+ | `Constants.PD4ML_STYLESHEETS_TO_OMIT` | `string` | static read-only |
152
+ | `Constants.PD4ML_ENABLE_HTTP_ERRORS` | `string` | static read-only |
153
+ | `Constants.PD4ML_OMIT_DEFAULT_STYLE` | `string` | static read-only |
154
+ | `Constants.PD4ML_DUMP_DEFAULT_STYLE` | `string` | static read-only |
155
+ | `Constants.PD4ML_HEADER_HEIGHT_LIMIT` | `string` | static read-only |
156
+ | `Constants.PD4ML_KEEP_TRAILING_BLANK_PAGES` | `string` | static read-only |
157
+ | `Constants.PD4ML_DISABLE_WOFF` | `string` | static read-only |
158
+ | `Constants.PD4ML_DISABLE_WOFF2` | `string` | static read-only |
159
+ | `Constants.PD4ML_PDF_BROTLI` | `string` | static read-only |
160
+ | `Constants.PDF` | `string` | static read-only |
161
+ | `Constants.PDFA` | `string` | static read-only |
162
+ | `Constants.PDFUA` | `string` | static read-only |
163
+ | `Constants.DOCX` | `string` | static read-only |
164
+ | `Constants.RTF` | `string` | static read-only |
165
+ | `Constants.RTF_WMF` | `string` | static read-only |
166
+ | `Constants.PNG8` | `string` | static read-only |
167
+ | `Constants.PNG24` | `string` | static read-only |
168
+ | `Constants.TIFF` | `string` | static read-only |
169
+ | `Constants.TIFF_COMPRESSED` | `string` | static read-only |
170
+ | `Constants.MULTIPAGE_TIFF` | `string` | static read-only |
171
+ | `Constants.MULTIPAGE_TIFF_COMPRESSED` | `string` | static read-only |
172
+ | `Constants.LEFT_ALIGN` | `number` | static read-only |
173
+ | `Constants.CENTER_ALIGN` | `number` | static read-only |
174
+ | `Constants.RIGHT_ALIGN` | `number` | static read-only |
175
+ | `Constants.RC4_40BIT` | `number` | static read-only |
176
+ | `Constants.RC4_128BIT` | `number` | static read-only |
177
+ | `Constants.AES_128BIT` | `number` | static read-only |
178
+ | `Constants.AES_256BIT` | `number` | static read-only |
179
+ | `Constants.ISO8859_1` | `string` | static read-only |
180
+ | `Constants.WINDOWS_1252` | `string` | static read-only |
181
+ | `Constants.UTF8` | `string` | static read-only |
182
+
183
+ ```ts
184
+ new Constants()
185
+ ```
186
+
187
+ ## LayoutEngine
188
+
189
+ `com.pd4ml.Constants.LayoutEngine`
190
+
191
+ | Field | Type | |
192
+ |---|---|---|
193
+ | `LayoutEngine.v40` | `LayoutEngine` | static read-only |
194
+ | `LayoutEngine.v42` | `LayoutEngine` | static read-only |
195
+
196
+ ```ts
197
+ LayoutEngine.values(): LayoutEngine[]
198
+ LayoutEngine.valueOf(name: string): LayoutEngine
199
+ ```
200
+
201
+ ## ErrorPolicy
202
+
203
+ `com.pd4ml.Constants.ErrorPolicy`
204
+
205
+ | Field | Type | |
206
+ |---|---|---|
207
+ | `ErrorPolicy.NONE` | `ErrorPolicy` | static read-only |
208
+ | `ErrorPolicy.RELAXED` | `ErrorPolicy` | static read-only |
209
+ | `ErrorPolicy.NORMAL` | `ErrorPolicy` | static read-only |
210
+ | `ErrorPolicy.PEDANTIC` | `ErrorPolicy` | static read-only |
211
+ | `ErrorPolicy.STRICT` | `ErrorPolicy` | static read-only |
212
+
213
+ ```ts
214
+ ErrorPolicy.values(): ErrorPolicy[]
215
+ ErrorPolicy.valueOf(name: string): ErrorPolicy
216
+ ```
217
+
218
+ ## PageSize
219
+
220
+ `com.pd4ml.PageSize`
221
+
222
+ | Field | Type | |
223
+ |---|---|---|
224
+ | `PageSize.B5` | `PageSize` | static read-only |
225
+ | `PageSize.B4` | `PageSize` | static read-only |
226
+ | `PageSize.JIS_B5` | `PageSize` | static read-only |
227
+ | `PageSize.JIS_B4` | `PageSize` | static read-only |
228
+ | `PageSize.A10` | `PageSize` | static read-only |
229
+ | `PageSize.A9` | `PageSize` | static read-only |
230
+ | `PageSize.A8` | `PageSize` | static read-only |
231
+ | `PageSize.A7` | `PageSize` | static read-only |
232
+ | `PageSize.A6` | `PageSize` | static read-only |
233
+ | `PageSize.A5` | `PageSize` | static read-only |
234
+ | `PageSize.A4` | `PageSize` | static read-only |
235
+ | `PageSize.A3` | `PageSize` | static read-only |
236
+ | `PageSize.A2` | `PageSize` | static read-only |
237
+ | `PageSize.A1` | `PageSize` | static read-only |
238
+ | `PageSize.A0` | `PageSize` | static read-only |
239
+ | `PageSize.ISOB5` | `PageSize` | static read-only |
240
+ | `PageSize.ISOB4` | `PageSize` | static read-only |
241
+ | `PageSize.ISOB3` | `PageSize` | static read-only |
242
+ | `PageSize.ISOB2` | `PageSize` | static read-only |
243
+ | `PageSize.ISOB1` | `PageSize` | static read-only |
244
+ | `PageSize.ISOB0` | `PageSize` | static read-only |
245
+ | `PageSize.HALFLETTER` | `PageSize` | static read-only |
246
+ | `PageSize.LETTER` | `PageSize` | static read-only |
247
+ | `PageSize.TABLOID` | `PageSize` | static read-only |
248
+ | `PageSize.LEDGER` | `PageSize` | static read-only |
249
+ | `PageSize.NOTE` | `PageSize` | static read-only |
250
+ | `PageSize.LEGAL` | `PageSize` | static read-only |
251
+ | `PageSize.ArchA` | `PageSize` | static read-only |
252
+ | `PageSize.ArchB` | `PageSize` | static read-only |
253
+ | `PageSize.ArchC` | `PageSize` | static read-only |
254
+ | `PageSize.ArchD` | `PageSize` | static read-only |
255
+ | `PageSize.ArchE` | `PageSize` | static read-only |
256
+ | `PageSize.ArchE1` | `PageSize` | static read-only |
257
+ | `obj.$get('width')` | `number` | |
258
+ | `obj.$get('height')` | `number` | |
259
+ | `obj.$get('rotated')` | `boolean` | |
260
+
261
+ ```ts
262
+ new PageSize(width: number | JavaFloat, height: number | JavaFloat, units: Units)
263
+ new PageSize(width: number | JavaFloat, height: number | JavaFloat)
264
+ rotate(): PageSize
265
+ mmWidth(): number
266
+ mmHeight(): number
267
+ PageSize.getInstance(name: string): PageSize
268
+ ```
269
+
270
+ ## PageMargins
271
+
272
+ `com.pd4ml.PageMargins`
273
+
274
+ | Field | Type | |
275
+ |---|---|---|
276
+ | `PageMargins.DEFAULT_PAGE_MARGINS` | `PageMargins` | static read-only |
277
+ | `obj.$get('left')` | `number` | |
278
+ | `obj.$get('top')` | `number` | |
279
+ | `obj.$get('right')` | `number` | |
280
+ | `obj.$get('bottom')` | `number` | |
281
+
282
+ ```ts
283
+ new PageMargins(left: number | JavaFloat, top: number | JavaFloat, right: number | JavaFloat, bottom: number | JavaFloat)
284
+ new PageMargins(left: number | JavaFloat, top: number | JavaFloat, right: number | JavaFloat, bottom: number | JavaFloat, units: Units)
285
+ flipHorizontal(): PageMargins
286
+ flipVertical(): PageMargins
287
+ rotate(): PageMargins
288
+ ```
289
+
290
+ ## Dimensions
291
+
292
+ `com.pd4ml.Dimensions` (interface)
293
+
294
+ | Field | Type | |
295
+ |---|---|---|
296
+ | `Dimensions.MM_PER_INCH` | `number` | static read-only |
297
+ | `Dimensions.POINTS_PER_MM` | `number` | static read-only |
298
+ | `Dimensions.POINTS_PER_INCH` | `number` | static read-only |
299
+ | `Dimensions.PIXELS_PER_POINT` | `number` | static read-only |
300
+
301
+ ## Units
302
+
303
+ `com.pd4ml.Dimensions.Units`
304
+
305
+ | Field | Type | |
306
+ |---|---|---|
307
+ | `Units.MM` | `Units` | static read-only |
308
+ | `Units.PT` | `Units` | static read-only |
309
+ | `Units.PX` | `Units` | static read-only |
310
+
311
+ ```ts
312
+ Units.values(): Units[]
313
+ Units.valueOf(name: string): Units
314
+ ```
315
+
316
+ ## PdfSpec
317
+
318
+ `com.pd4ml.PdfSpec`
319
+
320
+ | Field | Type | |
321
+ |---|---|---|
322
+ | `PdfSpec.PDF_1_0` | `PdfSpec` | static read-only |
323
+ | `PdfSpec.PDF_1_1` | `PdfSpec` | static read-only |
324
+ | `PdfSpec.PDF_1_2` | `PdfSpec` | static read-only |
325
+ | `PdfSpec.PDF_1_3` | `PdfSpec` | static read-only |
326
+ | `PdfSpec.PDF_1_4` | `PdfSpec` | static read-only |
327
+ | `PdfSpec.PDF_1_5` | `PdfSpec` | static read-only |
328
+ | `PdfSpec.PDF_1_6` | `PdfSpec` | static read-only |
329
+ | `PdfSpec.PDF_1_7` | `PdfSpec` | static read-only |
330
+ | `PdfSpec.PDF_1_7_1` | `PdfSpec` | static read-only |
331
+ | `PdfSpec.PDF_1_7_2` | `PdfSpec` | static read-only |
332
+ | `PdfSpec.PDF_1_7_3` | `PdfSpec` | static read-only |
333
+ | `PdfSpec.PDF_1_7_4` | `PdfSpec` | static read-only |
334
+ | `PdfSpec.PDF_1_7_5` | `PdfSpec` | static read-only |
335
+ | `PdfSpec.PDF_1_7_6` | `PdfSpec` | static read-only |
336
+ | `PdfSpec.PDF_1_7_7` | `PdfSpec` | static read-only |
337
+ | `PdfSpec.PDF_1_7_8` | `PdfSpec` | static read-only |
338
+ | `PdfSpec.PDF_1_7_9` | `PdfSpec` | static read-only |
339
+ | `PdfSpec.PDF_1_7_10` | `PdfSpec` | static read-only |
340
+ | `PdfSpec.PDF_1_7_11` | `PdfSpec` | static read-only |
341
+ | `PdfSpec.PDF_2_0` | `PdfSpec` | static read-only |
342
+ | `PdfSpec.PDFA_1A` | `PdfSpec` | static read-only |
343
+ | `PdfSpec.PDFA_1B` | `PdfSpec` | static read-only |
344
+ | `PdfSpec.PDFA_2A` | `PdfSpec` | static read-only |
345
+ | `PdfSpec.PDFA_2B` | `PdfSpec` | static read-only |
346
+ | `PdfSpec.PDFA_2U` | `PdfSpec` | static read-only |
347
+ | `PdfSpec.PDFA_3A` | `PdfSpec` | static read-only |
348
+ | `PdfSpec.PDFA_3B` | `PdfSpec` | static read-only |
349
+ | `PdfSpec.PDFA_3U` | `PdfSpec` | static read-only |
350
+ | `PdfSpec.PDFA_4` | `PdfSpec` | static read-only |
351
+ | `PdfSpec.PDFA_4E` | `PdfSpec` | static read-only |
352
+ | `PdfSpec.PDFUA_1` | `PdfSpec` | static read-only |
353
+ | `PdfSpec.PDFUA_2` | `PdfSpec` | static read-only |
354
+ | `PdfSpec.ZUGFeRD` | `PdfSpec` | static read-only |
355
+ | `PdfSpec.ZUGFeRD_a` | `PdfSpec` | static read-only |
356
+ | `PdfSpec.FacturX` | `PdfSpec` | static read-only |
357
+ | `PdfSpec.FacturX_a` | `PdfSpec` | static read-only |
358
+ | `obj.$get('name')` | `string` | |
359
+ | `obj.$get('id')` | `number` | |
360
+ | `obj.$get('xid')` | `number` | |
361
+
362
+ ```ts
363
+ new PdfSpec(spec: PdfSpec)
364
+ combine(spec: PdfSpec): PdfSpec
365
+ withMinimumVersion(version: PdfSpec): PdfSpec
366
+ isPdfa(): boolean
367
+ isPdfa1(): boolean
368
+ isPdfa1a(): boolean
369
+ isPdfa1b(): boolean
370
+ isPdfa2(): boolean
371
+ isPdfa3(): boolean
372
+ isPdfa12(): boolean
373
+ isPdfa12a(): boolean
374
+ isPdfa2u(): boolean
375
+ isPdfa123(): boolean
376
+ isPdfa123a(): boolean
377
+ isPdfa23(): boolean
378
+ isPdfa23a(): boolean
379
+ isPdfa23b(): boolean
380
+ isPdfa23u(): boolean
381
+ isPdfa123b(): boolean
382
+ isPdfa4e(): boolean
383
+ isPdfa4f(): boolean
384
+ isPdfa4(): boolean
385
+ isPdfa1234(): boolean
386
+ isPdfa234(): boolean
387
+ isPdfua(): boolean
388
+ isPdfua1(): boolean
389
+ isPdfua2(): boolean
390
+ allowsTransparency(): boolean
391
+ allowsAttachments(): boolean
392
+ allowsDocLevelAttachments(): boolean
393
+ allowsEncryption(): boolean
394
+ allowsPdfForms(): boolean
395
+ requiresTagging(): boolean
396
+ requiresColorspace(): boolean
397
+ requiresMetadata(): boolean
398
+ requiresOutputInternet(): boolean
399
+ allowsExternalHyperlinking(): boolean
400
+ requiresReliableUnicodeSemantics(): boolean
401
+ getPdfVersionLabel(): string
402
+ getPdfExtLevel(): number
403
+ getPdfaVersion(): number
404
+ getPdfuaVersion(): number
405
+ PdfSpec.areCompatible(pdf: PdfSpec, pdfa1: PdfSpec, pdfa2: PdfSpec): boolean
406
+ PdfSpec.getByLabel(label: string): PdfSpec
407
+ PdfSpec.getInstance(label: string): PdfSpec
408
+ PdfSpec.getByID(id: number | JavaFloat): PdfSpec
409
+ PdfSpec.listKeywords(): string
410
+ ```
411
+
412
+ ## PdfDocumentBase
413
+
414
+ `com.pd4ml.pdf.PdfDocumentBase`
415
+
416
+ ```ts
417
+ write(out: JavaObject): void
418
+ write(out: JavaObject, password: string, permissions: number | JavaFloat): void
419
+ append(toMerge: PdfDocumentBase): void
420
+ overlay(anotherDoc: PdfDocumentBase, opacity: number | JavaFloat): void
421
+ overlay(anotherDoc: PdfDocumentBase, srcScope: string, destScope: string, opacity: number | JavaFloat): void
422
+ underlay(anotherDoc: PdfDocumentBase, opacity: number | JavaFloat): void
423
+ underlay(anotherDoc: PdfDocumentBase, srcScope: string, destScope: string, opacity: number | JavaFloat): void
424
+ getNumberOfPages(): number
425
+ getPermissions(): number
426
+ getTitle(): string
427
+ setTitle(title: string): void
428
+ getAuthor(): string
429
+ setAuthor(author: string): void
430
+ getPdfFormatVersion(): string
431
+ getMetadata(): string
432
+ getCreationDate(): string
433
+ dumpOutlines(): string
434
+ getKeywords(): string
435
+ setKeywords(keywords: string): void
436
+ getCreator(): string
437
+ setCreator(creator: string): void
438
+ getProducer(): string
439
+ getSubject(): string
440
+ setSubject(subject: string): void
441
+ setModDate(): void
442
+ getModDate(): string
443
+ getPageSize(pageIndex: number | JavaFloat): PageSize
444
+ getPageBox(pageIndex: number | JavaFloat, boxName: string): number[]
445
+ read(): void
446
+ getPageContent(pageIndex: number | JavaFloat): string
447
+ deletePage(pageNumber: number | JavaFloat): number
448
+ PdfDocumentBase.computeScope(scope: string, pageNum: number | JavaFloat): boolean[]
449
+ ```
450
+
451
+ ## PdfDocument
452
+
453
+ `com.pd4ml.PdfDocument`
454
+
455
+ ```ts
456
+ new PdfDocument(bytes: Buffer | Uint8Array, password: string)
457
+ new PdfDocument(stream: Buffer | Uint8Array | JavaObject, password: string)
458
+ new PdfDocument(url: string | URL | JavaObject, password: string)
459
+ new PdfDocument(writer: JavaObject)
460
+ PdfDocument.mergePDFs(pdf1: Buffer | Uint8Array | JavaObject, pdf2: Buffer | Uint8Array | JavaObject, result: JavaObject): void
461
+ ```
462
+
463
+ ## ProgressListener
464
+
465
+ `com.pd4ml.ProgressListener` (interface)
466
+
467
+ | Field | Type | |
468
+ |---|---|---|
469
+ | `ProgressListener.CONVERSION_BEGIN` | `number` | static read-only |
470
+ | `ProgressListener.MAIN_DOC_READ` | `number` | static read-only |
471
+ | `ProgressListener.HTML_PARSED` | `number` | static read-only |
472
+ | `ProgressListener.RENDERER_TREE_BUILT` | `number` | static read-only |
473
+ | `ProgressListener.HTML_LAYOUT_IN_PROGRESS` | `number` | static read-only |
474
+ | `ProgressListener.HTML_LAYOUT_DONE` | `number` | static read-only |
475
+ | `ProgressListener.PAGEBREAKS_ALIGNED` | `number` | static read-only |
476
+ | `ProgressListener.TOC_GENERATED` | `number` | static read-only |
477
+ | `ProgressListener.DOC_RENDER_IN_PROGRESS` | `number` | static read-only |
478
+ | `ProgressListener.DOC_WRITE_BEGIN` | `number` | static read-only |
479
+ | `ProgressListener.CONVERSION_END` | `number` | static read-only |
480
+ | `ProgressListener.RTF_PRE_RENDER_DONE` | `number` | static read-only |
481
+ | `ProgressListener.DOCX_PRE_RENDER_DONE` | `number` | static read-only |
482
+
483
+ ```ts
484
+ progressUpdate(arg0: number | JavaFloat, arg1: number | JavaFloat, arg2: string, arg3: number | JavaFloat): void
485
+ ```
486
+
487
+ ## ResourceProvider
488
+
489
+ `com.pd4ml.ResourceProvider`
490
+
491
+ | Field | Type | |
492
+ |---|---|---|
493
+ | `obj.$get('mime')` | `string` | |
494
+ | `obj.$get('redirected')` | `JavaObject` | |
495
+
496
+ ```ts
497
+ getResourceAsStream(arg0: string, arg1: JavaObject): JavaObject
498
+ canLoad(arg0: string, arg1: JavaObject): boolean
499
+ dontCache(): boolean
500
+ localFile(): JavaObject
501
+ closeResourceStream(): void
502
+ getResourceAsBytes(resource: string, cache: JavaObject): Buffer
503
+ getMime(): string
504
+ getEncoding(): string
505
+ isDirectory(): boolean
506
+ ```
507
+
508
+ ## CustomTag
509
+
510
+ `com.pd4ml.CustomTag`
511
+
512
+ ```ts
513
+ new CustomTag()
514
+ new CustomTag(code: string, fontCache: JavaObject, prime: CustomTag)
515
+ getInstance(code: string, fontCache: JavaObject): CustomTag
516
+ setElement(element: JavaObject): void
517
+ getInnerCode(): string
518
+ setInnerCode(code: string): void
519
+ getWidth(base: number | JavaFloat): number
520
+ getHeight(base: number | JavaFloat): number
521
+ setWidth(width: number | JavaFloat): void
522
+ setHeight(height: number | JavaFloat): void
523
+ paint(x: number | JavaFloat, y: number | JavaFloat, width: number | JavaFloat, height: number | JavaFloat, containerWidth: number | JavaFloat, containerHeight: number | JavaFloat, g: JavaObject): void
524
+ paint(x: number | JavaFloat, y: number | JavaFloat, g: JavaObject): void
525
+ isEmptyTag(): boolean
526
+ ```
527
+
528
+ ## StatusMessage
529
+
530
+ `com.pd4ml.StatusMessage`
531
+
532
+ | Field | Type | |
533
+ |---|---|---|
534
+ | `StatusMessage.WARNING` | `number` | static read-only |
535
+ | `StatusMessage.ERROR` | `number` | static read-only |
536
+
537
+ ```ts
538
+ new StatusMessage(type: number | JavaFloat, id: number | JavaFloat, message: string)
539
+ StatusMessage.getMessage(id: number | JavaFloat, details: string): StatusMessage
540
+ StatusMessage.addUniqueMessage(statusMessages: JavaObject, message: StatusMessage): boolean
541
+ getDetails(): string
542
+ setDetails(details: string): void
543
+ isError(): boolean
544
+ isWarning(): boolean
545
+ getMessage(): string
546
+ ```