@groupdocs/groupdocs.signature 23.6.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.

Potentially problematic release.


This version of @groupdocs/groupdocs.signature might be problematic. Click here for more details.

@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <title>GroupDocs - End User License Agreement (EULA)</title>
4
+ <meta http-equiv="refresh" content="0; url=https://company.groupdocs.com/legal/eula" />
5
+ </head>
6
+ <body>
7
+ <p>Please wait. You'll be redirected to the online version of EULA.</p>
8
+ <p>If it fails to redirect then please go the following link manually: <a href="https://company.groupdocs.com/legal/eula">https://company.groupdocs.com/legal/eula</a></p>
9
+ </body>
10
+ </html>
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ **GroupDocs.Signature for Node.js via Java** lets your app end-users sign the electronic documents from a wide range of file formats. Supports several types of e-signing methods.
2
+
3
+ ## Node.js Signature API Features
4
+ - Document Signature Processing Features
5
+ - Create and add signatures to documents of various file formats.
6
+ - Specify visual attributes of signatures, such as color, font, margins, etc.
7
+ - Search and fetch a list of signatures from a document.
8
+ - Determine if the document contains signatures meeting specified criteria.
9
+ - Extract basic information about the document.
10
+ - Generate image representation of document pages for preview.
11
+ - Distinguish created signatures from the actual document.
12
+ - Put encrypted text into the QR-code signature or embed custom data objects.
13
+
14
+ ## Supported File Formats
15
+ The following section lists the supported file formats for the barcode, image, QR-code, stamp, and text signature types:
16
+ **Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX
17
+ **Microsoft Excel:** XLSX, XLS, XLSB, XLSM, XLTX, XLTM
18
+ **Microsoft PowerPoint:** PPTX, PPTM, PPT, PPSX, PPSM, PPS, POTX, POTM
19
+ **OpenOffice:** ODT, OTT, ODS, OTS, ODP, OTP
20
+ **Image:** BMP, DJVU, GIF, JPG, JPEG, PNG, SVG, TIF, TIFF, WEBP
21
+ **CorelDraw:** CDR, CMX
22
+ **Photoshop:** PSD
23
+ **Metafile:** WMF
24
+ **Portable:** PDF
25
+
26
+ ## Digital Signature Supported Formats
27
+ **Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX
28
+ **Microsoft Excel:** XLSX, XLS, XLSB, XLSM, XLTX, XLTM
29
+ **Microsoft PowerPoint:** PPTX, PPTM
30
+ **OpenOffice:** ODS, OTS
31
+ **Portable:** PDF
32
+
33
+ ## Supported Signature Types
34
+ - Text stamps
35
+ - Text labels
36
+ - Text as an image signature
37
+ - Image signature
38
+ - Digital signature
39
+ - Barcode signature
40
+ - QR-code signature
41
+ - Metadata signature
42
+ - Form-field signature
43
+
44
+ ## Getting Started with GroupDocs.Signature for Node.js via Java
45
+ ### Installation
46
+
47
+ From the command line:
48
+
49
+ npm i @groupdocs/groupdocs.signature
50
+
51
+ ### Sign a PDF File using Node.js
52
+
53
+ ```js
54
+ const signature = new groupdocs.signature.Signature(pdfFilePath);
55
+
56
+ // Create QR code sign options
57
+ const options = new groupdocs.signature.QrCodeSignOptions('JohnSmith');
58
+
59
+ // Setup QR code encoding type
60
+ options.setEncodeType(groupdocs.signature.QrCodeTypes.QR);
61
+
62
+ // Set signature position
63
+ options.setLeft(100);
64
+ options.setTop(100);
65
+
66
+ // Sign document to file
67
+ signature.sign(outputFilePath, options);
68
+ ```
69
+
70
+ ### Search for Digital Signatures in Excel XLSX using Node.js
71
+
72
+ ```js
73
+ const signature = new groupdocs.signature.Signature('spreadsheet.xlsx');
74
+ const options = new groupdocs.signature.DigitalSearchOptions();
75
+
76
+ // Search for signatures in the document
77
+ const signatures = signature.search(options).toArray();
78
+
79
+ console.log('\nSource document contains the following signatures.');
80
+ for (const digitalSignature of signatures) {
81
+ console.log(`Digital signature found from ${digitalSignature.signTime} with validation flag ${digitalSignature.isValid}. Certificate SN ${digitalSignature.certificate.type}`);
82
+ }
83
+ ```
84
+
85
+ [Home](https://www.groupdocs.com/) | [Product Page](https://products.groupdocs.com/signature/nodejs-java) | [Documentation](https://docs.groupdocs.com/signature/nodejs-java/) | [Blog](https://blog.groupdocs.com/category/signature/) | [API Reference](https://apireference.groupdocs.com/signature/nodejs-java) | [Code Samples](https://github.com/groupdocs-signature/GroupDocs.signature-for-Node.js-via-Java) | [Free Support](forum.groupdocs.com/c/signature) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ (() => {
5
+ function checkFileExists(filePath) {
6
+ try {
7
+ fs.accessSync(filePath, fs.constants.F_OK);
8
+ return true;
9
+ } catch {
10
+ return false;
11
+ }
12
+ }
13
+
14
+ if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-signature-nodejs-23.6.1.jar'))) {
15
+ console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-signature-nodejs-23.6.1.jar not found in the lib directory.\nPlease navigate to the package directory:`);
16
+ console.log('\n cd node_modules/@groupdocs/groupdocs.signature\n');
17
+ console.warn('\x1b[33m%s\x1b[0m', `Then download the JAR file using the command:`);
18
+ console.log('\n npm run postinstall\n');
19
+ process.exit(0)
20
+ }
21
+ else {
22
+ module.exports = require("./lib/groupdocs.signature");
23
+ }
24
+ })()
@@ -0,0 +1,732 @@
1
+ const path = require('path')
2
+ const java = require('java')
3
+ const os = require('os')
4
+
5
+ if (os.platform() === 'darwin') {
6
+ java.options.push('-Djava.awt.headless=true')
7
+ }
8
+
9
+ java.asyncOptions = {
10
+ asyncSuffix: 'Async',
11
+ syncSuffix: '',
12
+ }
13
+
14
+ java.classpath.push(path.join(__dirname, '/groupdocs-signature-nodejs-23.6.1.jar'))
15
+
16
+ exports = module.exports
17
+
18
+ function __typeof__(objClass) {
19
+ if (objClass !== undefined && objClass.constructor) {
20
+ const strFun = objClass.constructor.toString()
21
+ let className = strFun.substr(0, strFun.indexOf('('))
22
+ className = className.replace('function', '')
23
+ return className.replace(/(^\s*)|(\s*$)/gi, '')
24
+ }
25
+ return typeof objClass
26
+ }
27
+
28
+ /** STREAM HELPERS * */
29
+ exports.readDataFromStream = function (readStream, callback) {
30
+ const inputStreamBuffer = new exports.StreamBuffer()
31
+ readStream.on('data', chunk => {
32
+ inputStreamBuffer.write(chunk)
33
+ })
34
+ readStream.on('end', () => {
35
+ callback(inputStreamBuffer.toInputStream())
36
+ })
37
+ }
38
+
39
+ exports.readBytesFromStream = function (readStream, callback) {
40
+ const inputStreamBuffer = new exports.StreamBuffer()
41
+ readStream.on('data', chunk => {
42
+ inputStreamBuffer.write(chunk)
43
+ })
44
+ readStream.on('end', () => {
45
+ const array = Array.from(inputStreamBuffer.toByteArray())
46
+ const javaArray = java.newArray('byte', array)
47
+ callback(javaArray)
48
+ })
49
+ }
50
+
51
+ exports.CodeTextAlignment = {
52
+ Above : 1,
53
+ Below : 2,
54
+ None : 0,
55
+ },
56
+ exports.DashStyle = {
57
+ Dash : 6,
58
+ DashDot : 8,
59
+ DashDotDot : 13,
60
+ DashLongDash : 14,
61
+ DashLongDashDot : 15,
62
+ Dot : 5,
63
+ LongDash : 7,
64
+ LongDashDot : 9,
65
+ LongDashDotDot : 10,
66
+ RoundDot : 11,
67
+ ShortDash : 1,
68
+ ShortDashDot : 3,
69
+ ShortDashDotDot : 4,
70
+ ShortDot : 2,
71
+ Solid : 0,
72
+ SquareDot : 12,
73
+ },
74
+ exports.DocumentType = {
75
+ Archive : 7,
76
+ Certificate : 6,
77
+ Image : 5,
78
+ Pdf : 1,
79
+ Presentation : 3,
80
+ Spreadsheet : 4,
81
+ Unknown : 0,
82
+ WordProcessing : 2,
83
+ },
84
+ exports.FormFieldType = {
85
+ Checkbox : 1,
86
+ Combobox : 2,
87
+ DigitalSignature : 3,
88
+ Radio : 4,
89
+ Text : 0,
90
+ },
91
+ exports.FormTextFieldType = {
92
+ AllTextTypes : 0,
93
+ PlainText : 1,
94
+ RichText : 2,
95
+ },
96
+ exports.MeasureType = {
97
+ Millimeters : 2,
98
+ Percents : 1,
99
+ Pixels : 0,
100
+ },
101
+ exports.ModifyMode = {
102
+ Delete : 2,
103
+ Unknown : 0,
104
+ Update : 1,
105
+ },
106
+ exports.PdfDigitalSignatureType = {
107
+ Certificate : 1,
108
+ Signature : 0,
109
+ },
110
+ exports.PdfSaveFileFormat = {
111
+ Default : 0,
112
+ Doc : 2,
113
+ DocX : 7,
114
+ Epub : 11,
115
+ Pdf : 1,
116
+ Pptx : 12,
117
+ Svg : 8,
118
+ Xps : 3,
119
+ },
120
+ exports.PdfTextAnnotationBorderEffect = {
121
+ Cloudy : 1,
122
+ None : 0,
123
+ },
124
+ exports.PdfTextStickerIcon = {
125
+ Check : 7,
126
+ Circle : 9,
127
+ Comment : 1,
128
+ Cross : 8,
129
+ Help : 3,
130
+ Insert : 6,
131
+ Key : 2,
132
+ NewParagraph : 4,
133
+ Note : 0,
134
+ Paragraph : 5,
135
+ Star : 10,
136
+ },
137
+ exports.PdfTextStickerState = {
138
+ Accepted : 3,
139
+ Cancelled : 5,
140
+ Completed : 6,
141
+ Marked : 1,
142
+ None : 7,
143
+ Rejected : 4,
144
+ Undefined : 0,
145
+ Unmarked : 2,
146
+ },
147
+ exports.PresentationSaveFileFormat = {
148
+ Default : 0,
149
+ Html : 14,
150
+ Odp : 8,
151
+ Otp : 17,
152
+ Pdf : 3,
153
+ Potm : 12,
154
+ Potx : 11,
155
+ Pps : 1,
156
+ Ppsm : 10,
157
+ Ppsx : 6,
158
+ Ppt : 2,
159
+ Pptm : 9,
160
+ Pptx : 5,
161
+ Tiff : 7,
162
+ Xps : 4,
163
+ },
164
+ exports.ProcessStatus = {
165
+ Completed : 2,
166
+ InProgress : 1,
167
+ None : 0,
168
+ Started : 0,
169
+ },
170
+ exports.ProcessType = {
171
+ Delete : 7,
172
+ Info : 1,
173
+ Preview : 2,
174
+ Search : 5,
175
+ Sign : 3,
176
+ Unknown : 0,
177
+ Update : 6,
178
+ Verify : 4,
179
+ },
180
+ exports.SpreadsheetSaveFileFormat = {
181
+ CSV : 1,
182
+ Default : 0,
183
+ Dif : 30,
184
+ Emf : 31,
185
+ Excel97To2003 : 5,
186
+ Jpg : 33,
187
+ ODS : 14,
188
+ Pdf : 13,
189
+ Png : 34,
190
+ SVG : 22,
191
+ TIFF : 21,
192
+ Xlam : 10,
193
+ Xlsb : 16,
194
+ Xlsm : 7,
195
+ Xlsx : 6,
196
+ Xltm : 9,
197
+ Xltx : 8,
198
+ XPS : 20,
199
+ },
200
+ exports.StretchMode = {
201
+ None : 0,
202
+ PageArea : 3,
203
+ PageHeight : 2,
204
+ PageWidth : 1,
205
+ },
206
+ exports.TextHorizontalAlignment = {
207
+ Center : 2,
208
+ Left : 1,
209
+ Right : 3,
210
+ },
211
+ exports.TextMatchType = {
212
+ Contains : 3,
213
+ EndsWith : 2,
214
+ Exact : 0,
215
+ StartsWith : 1,
216
+ },
217
+ exports.TextShapeType = {
218
+ AccentBorderCallout1 : 50,
219
+ AccentBorderCallout2 : 51,
220
+ AccentBorderCallout3 : 52,
221
+ AccentBorderCallout90 : 181,
222
+ AccentCallout1 : 44,
223
+ AccentCallout2 : 45,
224
+ AccentCallout3 : 46,
225
+ AccentCallout90 : 179,
226
+ ActionButtonBackPrevious : 194,
227
+ ActionButtonBeginning : 196,
228
+ ActionButtonBlank : 189,
229
+ ActionButtonDocument : 198,
230
+ ActionButtonEnd : 195,
231
+ ActionButtonForwardNext : 193,
232
+ ActionButtonHelp : 191,
233
+ ActionButtonHome : 190,
234
+ ActionButtonInformation : 192,
235
+ ActionButtonMovie : 200,
236
+ ActionButtonReturn : 197,
237
+ ActionButtonSound : 199,
238
+ Arc : 19,
239
+ Arrow : 13,
240
+ Balloon : 17,
241
+ BentArrow : 91,
242
+ BentConnector2 : 33,
243
+ BentConnector3 : 34,
244
+ BentConnector4 : 35,
245
+ BentConnector5 : 36,
246
+ BentUpArrow : 90,
247
+ Bevel : 84,
248
+ BlockArc : 95,
249
+ BorderCallout1 : 47,
250
+ BorderCallout2 : 48,
251
+ BorderCallout3 : 49,
252
+ BorderCallout90 : 180,
253
+ BracePair : 186,
254
+ BracketPair : 185,
255
+ Callout1 : 41,
256
+ Callout2 : 42,
257
+ Callout3 : 43,
258
+ Callout90 : 178,
259
+ Can : 22,
260
+ Chevron : 55,
261
+ CircularArrow : 99,
262
+ CloudCallout : 106,
263
+ Cube : 16,
264
+ CurvedConnector2 : 37,
265
+ CurvedConnector3 : 38,
266
+ CurvedConnector4 : 39,
267
+ CurvedConnector5 : 40,
268
+ CurvedDownArrow : 105,
269
+ CurvedLeftArrow : 103,
270
+ CurvedRightArrow : 102,
271
+ CurvedUpArrow : 104,
272
+ Diamond : 4,
273
+ Donut : 23,
274
+ DoubleWave : 188,
275
+ DownArrow : 67,
276
+ DownArrowCallout : 80,
277
+ Ellipse : 3,
278
+ EllipseRibbon : 107,
279
+ EllipseRibbon2 : 108,
280
+ FlowChartAlternateProcess : 176,
281
+ FlowChartCollate : 125,
282
+ FlowChartConnector : 120,
283
+ FlowChartDecision : 110,
284
+ FlowChartDelay : 135,
285
+ FlowChartDisplay : 134,
286
+ FlowChartDocument : 114,
287
+ FlowChartExtract : 127,
288
+ FlowChartInputOutput : 111,
289
+ FlowChartInternalStorage : 113,
290
+ FlowChartMagneticDisk : 132,
291
+ FlowChartMagneticDrum : 133,
292
+ FlowChartMagneticTape : 131,
293
+ FlowChartManualInput : 118,
294
+ FlowChartManualOperation : 119,
295
+ FlowChartMerge : 128,
296
+ FlowChartMultidocument : 115,
297
+ FlowChartOfflineStorage : 129,
298
+ FlowChartOffpageConnector : 177,
299
+ FlowChartOnlineStorage : 130,
300
+ FlowChartOr : 124,
301
+ FlowChartPredefinedProcess : 112,
302
+ FlowChartPreparation : 117,
303
+ FlowChartProcess : 109,
304
+ FlowChartPunchedCard : 121,
305
+ FlowChartPunchedTape : 122,
306
+ FlowChartSort : 126,
307
+ FlowChartSummingJunction : 123,
308
+ FlowChartTerminator : 116,
309
+ FoldedCorner : 65,
310
+ Heart : 74,
311
+ Hexagon : 9,
312
+ HomePlate : 15,
313
+ HorizontalScroll : 98,
314
+ Image : 75,
315
+ IrregularSeal1 : 71,
316
+ IrregularSeal2 : 72,
317
+ LeftArrow : 66,
318
+ LeftArrowCallout : 77,
319
+ LeftBrace : 87,
320
+ LeftBracket : 85,
321
+ LeftRightArrow : 69,
322
+ LeftRightArrowCallout : 81,
323
+ LeftRightUpArrow : 182,
324
+ LeftUpArrow : 89,
325
+ LightningBolt : 73,
326
+ Line : 20,
327
+ Moon : 184,
328
+ NoSmoking : 57,
329
+ NotchedRightArrow : 94,
330
+ Octagon : 10,
331
+ Parallelogram : 7,
332
+ Pentagon : 56,
333
+ Plaque : 21,
334
+ Plus : 11,
335
+ QuadArrow : 76,
336
+ QuadArrowCallout : 83,
337
+ Rectangle : 1,
338
+ Ribbon : 53,
339
+ Ribbon2 : 54,
340
+ RightArrowCallout : 78,
341
+ RightBrace : 88,
342
+ RightBracket : 86,
343
+ RightTriangle : 6,
344
+ RoundRectangle : 2,
345
+ Seal : 18,
346
+ Seal16 : 59,
347
+ Seal24 : 92,
348
+ Seal32 : 60,
349
+ Seal4 : 187,
350
+ Seal8 : 58,
351
+ SmileyFace : 96,
352
+ Star : 12,
353
+ StraightConnector1 : 32,
354
+ StripedRightArrow : 93,
355
+ Sun : 183,
356
+ TextArchDownCurve : 145,
357
+ TextArchDownPour : 149,
358
+ TextArchUpCurve : 144,
359
+ TextArchUpPour : 148,
360
+ TextBox : 202,
361
+ TextButtonCurve : 147,
362
+ TextButtonPour : 151,
363
+ TextCanDown : 175,
364
+ TextCanUp : 174,
365
+ TextCascadeDown : 155,
366
+ TextCascadeUp : 154,
367
+ TextChevron : 140,
368
+ TextChevronInverted : 141,
369
+ TextCircleCurve : 146,
370
+ TextCirclePour : 150,
371
+ TextCurve : 27,
372
+ TextCurveDown : 153,
373
+ TextCurveUp : 152,
374
+ TextDeflate : 161,
375
+ TextDeflateBottom : 163,
376
+ TextDeflateInflate : 166,
377
+ TextDeflateInflateDeflate : 167,
378
+ TextDeflateTop : 165,
379
+ TextFadeDown : 171,
380
+ TextFadeLeft : 169,
381
+ TextFadeRight : 168,
382
+ TextFadeUp : 170,
383
+ TextHexagon : 26,
384
+ TextInflate : 160,
385
+ TextInflateBottom : 162,
386
+ TextInflateTop : 164,
387
+ TextOctagon : 25,
388
+ TextOnCurve : 30,
389
+ TextOnRing : 31,
390
+ TextPlainText : 136,
391
+ TextRing : 29,
392
+ TextRingInside : 142,
393
+ TextRingOutside : 143,
394
+ TextSimple : 24,
395
+ TextSlantDown : 173,
396
+ TextSlantUp : 172,
397
+ TextStop : 137,
398
+ TextTriangle : 138,
399
+ TextTriangleInverted : 139,
400
+ TextWave : 28,
401
+ TextWave1 : 156,
402
+ TextWave2 : 157,
403
+ TextWave3 : 158,
404
+ TextWave4 : 159,
405
+ ThickArrow : 14,
406
+ Trapezoid : 8,
407
+ Triangle : 5,
408
+ UpArrow : 68,
409
+ UpArrowCallout : 79,
410
+ UpDownArrow : 70,
411
+ UpDownArrowCallout : 82,
412
+ UturnArrow : 101,
413
+ VerticalScroll : 97,
414
+ Wave : 64,
415
+ WedgeEllipseCallout : 63,
416
+ WedgeRectCallout : 61,
417
+ WedgeRRectCallout : 62,
418
+ },
419
+ exports.TextSignatureImplementation = {
420
+ Annotation : 3,
421
+ FormField : 5,
422
+ Image : 2,
423
+ Native : 1,
424
+ Sticker : 4,
425
+ Watermark : 6,
426
+ },
427
+ exports.TextVerticalAlignment = {
428
+ Bottom : 3,
429
+ Center : 2,
430
+ Top : 1,
431
+ },
432
+ exports.WordProcessingSaveFileFormat = {
433
+ Azw3 : 105,
434
+ Bmp : 102,
435
+ Default : 0,
436
+ Doc : 1,
437
+ Docm : 4,
438
+ Docx : 3,
439
+ Dot : 2,
440
+ Dotm : 6,
441
+ Dotx : 5,
442
+ Emf : 103,
443
+ Epub : 52,
444
+ FlatOpc : 24,
445
+ FlatOpcMacroEnabled : 25,
446
+ FlatOpcTemplate : 26,
447
+ FlatOpcTemplateMacroEnabled : 27,
448
+ Jpeg : 104,
449
+ Mhtml : 51,
450
+ Odt : 60,
451
+ Ott : 61,
452
+ Pdf : 40,
453
+ Png : 101,
454
+ Ps : 47,
455
+ Rtf : 30,
456
+ Text : 70,
457
+ Tiff : 100,
458
+ WordML : 31,
459
+ Xps : 41,
460
+ },
461
+ exports.WordProcessingTextSignatureImplementation = {
462
+ TextAsImage : 1,
463
+ TextStamp : 0,
464
+ TextToFormField : 2,
465
+ Watermark : 3,
466
+ },
467
+ exports.XAdESType = {
468
+ None : 0,
469
+ XAdES : 1,
470
+ },
471
+ exports.SymmetricAlgorithmType = {
472
+ AES : 4,
473
+ AESNew : 5,
474
+ DES : 0,
475
+ RC2 : 2,
476
+ Rijndael : 3,
477
+ TripleDES : 1,
478
+ },
479
+ exports.StampBackgroundCropType = {
480
+ InnerArea : 3,
481
+ MiddleArea : 2,
482
+ None : 0,
483
+ OuterArea : 1,
484
+ },
485
+ exports.StampTextRepeatType = {
486
+ FullTextRepeat : 1,
487
+ None : 0,
488
+ RepeatWithTruncation : 2,
489
+ },
490
+ exports.LogLevel = {
491
+ All : 7,
492
+ Error : 1,
493
+ None : 0,
494
+ Trace : 4,
495
+ Warning : 2,
496
+ },
497
+ exports.OutputType = {
498
+ FilePath : 1,
499
+ Stream : 0,
500
+ },
501
+ exports.BitmapCompression = {
502
+ Bitfields : 3,
503
+ Jpeg : 4,
504
+ Png : 5,
505
+ Rgb : 0,
506
+ Rle4 : 2,
507
+ Rle8 : 1,
508
+ },
509
+ exports.JpegCompressionColorMode = {
510
+ Cmyk : 2,
511
+ Grayscale : 0,
512
+ Rgb : 4,
513
+ YCbCr : 1,
514
+ Ycck : 3,
515
+ },
516
+ exports.JpegCompressionMode = {
517
+ Baseline : 0,
518
+ JpegLs : 3,
519
+ Lossless : 2,
520
+ Progressive : 1,
521
+ },
522
+ exports.JpegRoundingMode = {
523
+ Extrapolate : 0,
524
+ Truncate : 1,
525
+ },
526
+ exports.PngColorType = {
527
+ Grayscale : 0,
528
+ GrayscaleWithAlpha : 4,
529
+ IndexedColor : 3,
530
+ Truecolor : 2,
531
+ TruecolorWithAlpha : 6,
532
+ },
533
+ exports.PngFilterType = {
534
+ Adaptive : 5,
535
+ Avg : 3,
536
+ None : 0,
537
+ Paeth : 4,
538
+ Sub : 1,
539
+ Up : 2,
540
+ },
541
+ exports.TiffFormat = {
542
+ Default : 0,
543
+ TiffCcitRle : 8,
544
+ TiffCcittFax3 : 4,
545
+ TiffCcittFax4 : 5,
546
+ TiffDeflateBw : 6,
547
+ TiffDeflateRgb : 7,
548
+ TiffJpegRgb : 9,
549
+ TiffJpegYCbCr : 10,
550
+ TiffLzwBw : 1,
551
+ TiffLzwRgb : 2,
552
+ TiffLzwRgba : 3,
553
+ TiffNoCompressionBw : 11,
554
+ TiffNoCompressionRgb : 12,
555
+ TiffNoCompressionRgba : 13,
556
+ },
557
+
558
+ exports.Signature = java.import("com.groupdocs.signature.Signature");
559
+ exports.SignatureSettings = java.import("com.groupdocs.signature.SignatureSettings");
560
+ exports.AntiHackUtils = java.import("com.groupdocs.signature.antihack.AntiHackUtils");
561
+ exports.Background = java.import("com.groupdocs.signature.domain.Background");
562
+ exports.Border = java.import("com.groupdocs.signature.domain.Border");
563
+ exports.DeleteResult = java.import("com.groupdocs.signature.domain.DeleteResult");
564
+ exports.Padding = java.import("com.groupdocs.signature.domain.Padding");
565
+ exports.PageInfo = java.import("com.groupdocs.signature.domain.PageInfo");
566
+ exports.ProcessLog = java.import("com.groupdocs.signature.domain.ProcessLog");
567
+ exports.SearchResult = java.import("com.groupdocs.signature.domain.SearchResult");
568
+ exports.SignatureFont = java.import("com.groupdocs.signature.domain.SignatureFont");
569
+ exports.SignResult = java.import("com.groupdocs.signature.domain.SignResult");
570
+ exports.UpdateResult = java.import("com.groupdocs.signature.domain.UpdateResult");
571
+ exports.VerificationResult = java.import("com.groupdocs.signature.domain.VerificationResult");
572
+ exports.BarcodeTypes = java.import("com.groupdocs.signature.domain.barcodes.BarcodeTypes");
573
+ exports.DocumentInfo = java.import("com.groupdocs.signature.domain.documentpreview.DocumentInfo");
574
+ exports.LinearGradientBrush = java.import("com.groupdocs.signature.domain.extensions.LinearGradientBrush");
575
+ exports.RadialGradientBrush = java.import("com.groupdocs.signature.domain.extensions.RadialGradientBrush");
576
+ exports.SolidBrush = java.import("com.groupdocs.signature.domain.extensions.SolidBrush");
577
+ exports.SpreadsheetPosition = java.import("com.groupdocs.signature.domain.extensions.SpreadsheetPosition");
578
+ exports.TextShadow = java.import("com.groupdocs.signature.domain.extensions.TextShadow");
579
+ exports.TextureBrush = java.import("com.groupdocs.signature.domain.extensions.TextureBrush");
580
+ exports.SymmetricEncryption = java.import("com.groupdocs.signature.domain.extensions.encryption.SymmetricEncryption");
581
+ exports.Address = java.import("com.groupdocs.signature.domain.extensions.serialization.Address");
582
+ exports.CryptoCurrencyTransfer = java.import("com.groupdocs.signature.domain.extensions.serialization.CryptoCurrencyTransfer");
583
+ exports.Email = java.import("com.groupdocs.signature.domain.extensions.serialization.Email");
584
+ exports.EPC = java.import("com.groupdocs.signature.domain.extensions.serialization.EPC");
585
+ exports.Event = java.import("com.groupdocs.signature.domain.extensions.serialization.Event");
586
+ exports.MeCard = java.import("com.groupdocs.signature.domain.extensions.serialization.MeCard");
587
+ exports.SMS = java.import("com.groupdocs.signature.domain.extensions.serialization.SMS");
588
+ exports.VCard = java.import("com.groupdocs.signature.domain.extensions.serialization.VCard");
589
+ exports.WiFi = java.import("com.groupdocs.signature.domain.extensions.serialization.WiFi");
590
+ exports.QrCodeTypes = java.import("com.groupdocs.signature.domain.qrcodes.QrCodeTypes");
591
+ exports.SignatureMetaInfoJsonConverter = java.import("com.groupdocs.signature.domain.serialization.SignatureMetaInfoJsonConverter");
592
+ exports.BarcodeSignature = java.import("com.groupdocs.signature.domain.signatures.BarcodeSignature");
593
+ exports.DigitalSignature = java.import("com.groupdocs.signature.domain.signatures.DigitalSignature");
594
+ exports.DocumentResultSignature = java.import("com.groupdocs.signature.domain.signatures.DocumentResultSignature");
595
+ exports.ImageSignature = java.import("com.groupdocs.signature.domain.signatures.ImageSignature");
596
+ exports.PdfDigitalSignature = java.import("com.groupdocs.signature.domain.signatures.PdfDigitalSignature");
597
+ exports.QrCodeSignature = java.import("com.groupdocs.signature.domain.signatures.QrCodeSignature");
598
+ exports.TextSignature = java.import("com.groupdocs.signature.domain.signatures.TextSignature");
599
+ exports.CheckboxFormFieldSignature = java.import("com.groupdocs.signature.domain.signatures.formfield.CheckboxFormFieldSignature");
600
+ exports.ComboboxFormFieldSignature = java.import("com.groupdocs.signature.domain.signatures.formfield.ComboboxFormFieldSignature");
601
+ exports.DigitalFormFieldSignature = java.import("com.groupdocs.signature.domain.signatures.formfield.DigitalFormFieldSignature");
602
+ exports.RadioButtonFormFieldSignature = java.import("com.groupdocs.signature.domain.signatures.formfield.RadioButtonFormFieldSignature");
603
+ exports.TextFormFieldSignature = java.import("com.groupdocs.signature.domain.signatures.formfield.TextFormFieldSignature");
604
+ exports.ImageMetadataSignature = java.import("com.groupdocs.signature.domain.signatures.metadata.ImageMetadataSignature");
605
+ exports.InternalMetadata = java.import("com.groupdocs.signature.domain.signatures.metadata.InternalMetadata");
606
+ exports.MetadataSignatureCollection = java.import("com.groupdocs.signature.domain.signatures.metadata.MetadataSignatureCollection");
607
+ exports.PdfMetadataSignature = java.import("com.groupdocs.signature.domain.signatures.metadata.PdfMetadataSignature");
608
+ exports.PdfMetadataSignatures = java.import("com.groupdocs.signature.domain.signatures.metadata.PdfMetadataSignatures");
609
+ exports.PresentationMetadataSignature = java.import("com.groupdocs.signature.domain.signatures.metadata.PresentationMetadataSignature");
610
+ exports.SpreadsheetMetadataSignature = java.import("com.groupdocs.signature.domain.signatures.metadata.SpreadsheetMetadataSignature");
611
+ exports.WordProcessingMetadataSignature = java.import("com.groupdocs.signature.domain.signatures.metadata.WordProcessingMetadataSignature");
612
+ exports.ActionMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.ActionMetaInfo");
613
+ exports.BarcodeSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.BarcodeSignatureMetaInfo");
614
+ exports.DigitalSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.DigitalSignatureMetaInfo");
615
+ exports.DocumentMetainfoContainer = java.import("com.groupdocs.signature.domain.signatures.metainfo.DocumentMetainfoContainer");
616
+ exports.DocumentMetaInfoContext = java.import("com.groupdocs.signature.domain.signatures.metainfo.DocumentMetaInfoContext");
617
+ exports.FormFieldSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.FormFieldSignatureMetaInfo");
618
+ exports.ImageSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.ImageSignatureMetaInfo");
619
+ exports.LicenseMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.LicenseMetaInfo");
620
+ exports.QRCodeSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.QRCodeSignatureMetaInfo");
621
+ exports.SignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.SignatureMetaInfo");
622
+ exports.TextSignatureMetaInfo = java.import("com.groupdocs.signature.domain.signatures.metainfo.TextSignatureMetaInfo");
623
+ exports.Corners = java.import("com.groupdocs.signature.domain.stamps.Corners");
624
+ exports.SquareBorder = java.import("com.groupdocs.signature.domain.stamps.SquareBorder");
625
+ exports.StampLine = java.import("com.groupdocs.signature.domain.stamps.StampLine");
626
+ exports.StampTypes = java.import("com.groupdocs.signature.domain.stamps.StampTypes");
627
+ exports.TimeStamp = java.import("com.groupdocs.signature.domain.structs.TimeStamp");
628
+ exports.ArgumentNullException = java.import("com.groupdocs.signature.exception.ArgumentNullException");
629
+ exports.GroupDocsException = java.import("com.groupdocs.signature.exception.GroupDocsException");
630
+ exports.GroupDocsSignatureException = java.import("com.groupdocs.signature.exception.GroupDocsSignatureException");
631
+ exports.IncorrectPasswordException = java.import("com.groupdocs.signature.exception.IncorrectPasswordException");
632
+ exports.InvalidOperationException = java.import("com.groupdocs.signature.exception.InvalidOperationException");
633
+ exports.LicenseException = java.import("com.groupdocs.signature.exception.LicenseException");
634
+ exports.PasswordRequiredException = java.import("com.groupdocs.signature.exception.PasswordRequiredException");
635
+ exports.ProcessCompleteEventArgs = java.import("com.groupdocs.signature.handler.events.ProcessCompleteEventArgs");
636
+ exports.ProcessEventArgs = java.import("com.groupdocs.signature.handler.events.ProcessEventArgs");
637
+ exports.ProcessEvents = java.import("com.groupdocs.signature.handler.events.ProcessEvents");
638
+ exports.ProcessProgressEventArgs = java.import("com.groupdocs.signature.handler.events.ProcessProgressEventArgs");
639
+ exports.ProcessStartEventArgs = java.import("com.groupdocs.signature.handler.events.ProcessStartEventArgs");
640
+ exports.License = java.import("com.groupdocs.signature.licensing.License");
641
+ exports.ConsoleLogger = java.import("com.groupdocs.signature.logging.ConsoleLogger");
642
+ exports.FileLogger = java.import("com.groupdocs.signature.logging.FileLogger");
643
+ exports.Metered = java.import("com.groupdocs.signature.metered.Metered");
644
+ exports.PagesSetup = java.import("com.groupdocs.signature.options.PagesSetup");
645
+ exports.PreviewOptions = java.import("com.groupdocs.signature.options.PreviewOptions");
646
+ exports.PreviewSignatureOptions = java.import("com.groupdocs.signature.options.PreviewSignatureOptions");
647
+ exports.DigitalSignatureAppearance = java.import("com.groupdocs.signature.options.appearances.DigitalSignatureAppearance");
648
+ exports.ImageAppearance = java.import("com.groupdocs.signature.options.appearances.ImageAppearance");
649
+ exports.PdfDigitalSignatureAppearance = java.import("com.groupdocs.signature.options.appearances.PdfDigitalSignatureAppearance");
650
+ exports.PdfTextAnnotationAppearance = java.import("com.groupdocs.signature.options.appearances.PdfTextAnnotationAppearance");
651
+ exports.PdfTextStickerAppearance = java.import("com.groupdocs.signature.options.appearances.PdfTextStickerAppearance");
652
+ exports.LoadOptions = java.import("com.groupdocs.signature.options.loadoptions.LoadOptions");
653
+ exports.ExportImageSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.ExportImageSaveOptions");
654
+ exports.PdfSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.PdfSaveOptions");
655
+ exports.PresentationSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.PresentationSaveOptions");
656
+ exports.SaveOptions = java.import("com.groupdocs.signature.options.saveoptions.SaveOptions");
657
+ exports.SpreadsheetSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.SpreadsheetSaveOptions");
658
+ exports.WordProcessingSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.WordProcessingSaveOptions");
659
+ exports.BmpSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.BmpSaveOptions");
660
+ exports.GifSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.GifSaveOptions");
661
+ exports.ImageSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.ImageSaveOptions");
662
+ exports.JpegSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.JpegSaveOptions");
663
+ exports.PngSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.PngSaveOptions");
664
+ exports.TiffSaveOptions = java.import("com.groupdocs.signature.options.saveoptions.imagessaveoptions.TiffSaveOptions");
665
+ exports.BarcodeSearchOptions = java.import("com.groupdocs.signature.options.search.BarcodeSearchOptions");
666
+ exports.DigitalSearchOptions = java.import("com.groupdocs.signature.options.search.DigitalSearchOptions");
667
+ exports.FormFieldSearchOptions = java.import("com.groupdocs.signature.options.search.FormFieldSearchOptions");
668
+ exports.ImageSearchOptions = java.import("com.groupdocs.signature.options.search.ImageSearchOptions");
669
+ exports.MetadataSearchOptions = java.import("com.groupdocs.signature.options.search.MetadataSearchOptions");
670
+ exports.QrCodeSearchOptions = java.import("com.groupdocs.signature.options.search.QrCodeSearchOptions");
671
+ exports.TextSearchOptions = java.import("com.groupdocs.signature.options.search.TextSearchOptions");
672
+ exports.BarcodeSignOptions = java.import("com.groupdocs.signature.options.sign.BarcodeSignOptions");
673
+ exports.DigitalSignOptions = java.import("com.groupdocs.signature.options.sign.DigitalSignOptions");
674
+ exports.FormFieldSignOptions = java.import("com.groupdocs.signature.options.sign.FormFieldSignOptions");
675
+ exports.ImageSignOptions = java.import("com.groupdocs.signature.options.sign.ImageSignOptions");
676
+ exports.MetadataSignOptions = java.import("com.groupdocs.signature.options.sign.MetadataSignOptions");
677
+ exports.QrCodeSignOptions = java.import("com.groupdocs.signature.options.sign.QrCodeSignOptions");
678
+ exports.StampSignOptions = java.import("com.groupdocs.signature.options.sign.StampSignOptions");
679
+ exports.TextSignOptions = java.import("com.groupdocs.signature.options.sign.TextSignOptions");
680
+ exports.BarcodeVerifyOptions = java.import("com.groupdocs.signature.options.verify.BarcodeVerifyOptions");
681
+ exports.CertificateVerifyOptions = java.import("com.groupdocs.signature.options.verify.CertificateVerifyOptions");
682
+ exports.DigitalVerifyOptions = java.import("com.groupdocs.signature.options.verify.DigitalVerifyOptions");
683
+ exports.QrCodeVerifyOptions = java.import("com.groupdocs.signature.options.verify.QrCodeVerifyOptions");
684
+ exports.TextVerifyOptions = java.import("com.groupdocs.signature.options.verify.TextVerifyOptions");
685
+ exports.VerifyOptionsCollection = java.import("com.groupdocs.signature.options.verify.VerifyOptionsCollection");
686
+ exports.PdfTextAnnotationVerifyExtensions = java.import("com.groupdocs.signature.options.verifyextensions.PdfTextAnnotationVerifyExtensions");
687
+ exports.PdfTextStickerVerifyExtensions = java.import("com.groupdocs.signature.options.verifyextensions.PdfTextStickerVerifyExtensions");
688
+ exports.CultureInfo = java.import("com.groupdocs.signature.utils.CultureInfo");
689
+
690
+ exports.AntiHackController = java.import("com.groupdocs.signature.antihack.AntiHackController");
691
+ exports.FileType = java.import("com.groupdocs.signature.domain.documentpreview.FileType");
692
+ exports.HorizontalAlignment = java.import("com.groupdocs.signature.domain.enums.HorizontalAlignment");
693
+ exports.ImageSaveFileFormat = java.import("com.groupdocs.signature.domain.enums.ImageSaveFileFormat");
694
+ exports.SignatureType = java.import("com.groupdocs.signature.domain.enums.SignatureType");
695
+ exports.VerticalAlignment = java.import("com.groupdocs.signature.domain.enums.VerticalAlignment");
696
+ exports.CryptoCurrencyType = java.import("com.groupdocs.signature.domain.extensions.serialization.CryptoCurrencyType");
697
+ exports.DataMatrixEncodeMode = java.import("com.groupdocs.signature.domain.extensions.serialization.DataMatrixEncodeMode");
698
+ exports.WiFiEncryptionType = java.import("com.groupdocs.signature.domain.extensions.serialization.WiFiEncryptionType");
699
+ exports.PreviewFormats = java.import("com.groupdocs.signature.options.PreviewFormats");
700
+ exports.PathUtils = java.import("com.groupdocs.signature.utils.PathUtils");
701
+ exports.Path = java.import("com.groupdocs.signature.utils.common.Path");
702
+
703
+
704
+ exports.StreamBuffer = class StreamBuffer {
705
+ constructor() {
706
+ const self = java.newInstanceSync('com.groupdocs.signature.contracts.StreamBuffer')
707
+
708
+ self.write = function (chunk) {
709
+ const array = Array.from(chunk)
710
+ const javaArray = java.newArray('byte', array)
711
+ self.__proto__.write.call(self, javaArray, 0, javaArray.length)
712
+ }
713
+ return self
714
+ }
715
+ }
716
+
717
+ /** STREAM METHODS * */
718
+ exports.License.setLicenseFromStream = function (license, licenseStream, callback) {
719
+ const inputStreamBuffer = new exports.StreamBuffer()
720
+ licenseStream.on('data', chunk => {
721
+ inputStreamBuffer.write(chunk)
722
+ })
723
+ licenseStream.on('end', () => {
724
+ let error
725
+ try {
726
+ license.setLicense(inputStreamBuffer.toInputStream())
727
+ } catch (err) {
728
+ error = err
729
+ }
730
+ callback(error)
731
+ })
732
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@groupdocs/groupdocs.signature",
3
+ "version": "23.6.1",
4
+ "description": "Powerful signer for PDF, Word, Excel, PowerPoint and image files.",
5
+ "scripts": {
6
+ "postinstall": "curl -H 'Cache-Control:no-cache' https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-signature-nodejs/23.6.1/groupdocs-signature-nodejs-23.6.1.jar > lib/groupdocs-signature-nodejs-23.6.1.jar"
7
+ },
8
+ "main": "index.js",
9
+ "keywords": [
10
+ "PDF",
11
+ "Word",
12
+ "DOCX",
13
+ "DOC",
14
+ "PowerPoint",
15
+ "PPT",
16
+ "PPTX",
17
+ "Excel",
18
+ "XLS",
19
+ "XLSX",
20
+ "CSV",
21
+ "to",
22
+ "JPG",
23
+ "PNG",
24
+ "Spreadsheet",
25
+ "SVG"
26
+ ],
27
+ "author": "Aspose",
28
+ "license": "End User License Agreement.html",
29
+ "dependencies": {
30
+ "java": "^0.13.0"
31
+ },
32
+ "directories": {
33
+ "lib": "lib"
34
+ }
35
+ }