@ironsoftware/ironpdf 2026.2.1 → 2026.4.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/package.json +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.d.ts.map +1 -1
- package/src/index.js +4 -2
- package/src/index.js.map +1 -1
- package/src/index.ts +2 -2
- package/src/internal/IronPdfEngine.ProtoFiles/iron_pdf_service.proto +2 -0
- package/src/internal/IronPdfEngine.ProtoFiles/qpdf.proto +17 -0
- package/src/internal/generated_proto/iron_pdf_service.d.ts +2 -0
- package/src/internal/generated_proto/iron_pdf_service.d.ts.map +1 -1
- package/src/internal/generated_proto/iron_pdf_service.ts +2 -0
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts +14 -0
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.d.ts.map +1 -1
- package/src/internal/generated_proto/ironpdfengineproto/IronPdfService.ts +18 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.d.ts +10 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.d.ts.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.js +4 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.js.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.ts +13 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.d.ts +18 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.d.ts.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.js +4 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.js.map +1 -0
- package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.ts +21 -0
- package/src/internal/grpc_layer/pdfium/compress.d.ts +7 -0
- package/src/internal/grpc_layer/pdfium/compress.d.ts.map +1 -1
- package/src/internal/grpc_layer/pdfium/compress.js +81 -1
- package/src/internal/grpc_layer/pdfium/compress.js.map +1 -1
- package/src/internal/grpc_layer/pdfium/compress.ts +121 -0
- package/src/internal/grpc_layer/pdfium/pdfa.d.ts +1 -0
- package/src/internal/grpc_layer/pdfium/pdfa.d.ts.map +1 -1
- package/src/internal/grpc_layer/pdfium/pdfa.js +22 -1
- package/src/internal/grpc_layer/pdfium/pdfa.js.map +1 -1
- package/src/internal/grpc_layer/pdfium/pdfa.ts +26 -0
- package/src/internal/grpc_layer/pdfium/signing.d.ts +2 -1
- package/src/internal/grpc_layer/pdfium/signing.d.ts.map +1 -1
- package/src/internal/grpc_layer/pdfium/signing.js +38 -1
- package/src/internal/grpc_layer/pdfium/signing.js.map +1 -1
- package/src/internal/grpc_layer/pdfium/signing.ts +44 -1
- package/src/public/pdfDocument.d.ts +57 -2
- package/src/public/pdfDocument.d.ts.map +1 -1
- package/src/public/pdfDocument.js +118 -1
- package/src/public/pdfDocument.js.map +1 -1
- package/src/public/pdfDocument.ts +2226 -2074
- package/src/public/signature.d.ts +33 -0
- package/src/public/signature.d.ts.map +1 -1
- package/src/public/signature.ts +34 -0
|
@@ -186,6 +186,8 @@ import type { QPdfCompleteSavingAsPdfA4RequestP as _ironpdfengineproto_QPdfCompl
|
|
|
186
186
|
import type { QPdfCompleteSavingAsPdfUA2RequestP as _ironpdfengineproto_QPdfCompleteSavingAsPdfUA2RequestP, QPdfCompleteSavingAsPdfUA2RequestP__Output as _ironpdfengineproto_QPdfCompleteSavingAsPdfUA2RequestP__Output } from '../ironpdfengineproto/QPdfCompleteSavingAsPdfUA2RequestP';
|
|
187
187
|
import type { QPdfCompressAndSaveAsFromBytesRequestStreamP as _ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP, QPdfCompressAndSaveAsFromBytesRequestStreamP__Output as _ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP__Output } from '../ironpdfengineproto/QPdfCompressAndSaveAsFromBytesRequestStreamP';
|
|
188
188
|
import type { QPdfCompressAndSaveAsRequestP as _ironpdfengineproto_QPdfCompressAndSaveAsRequestP, QPdfCompressAndSaveAsRequestP__Output as _ironpdfengineproto_QPdfCompressAndSaveAsRequestP__Output } from '../ironpdfengineproto/QPdfCompressAndSaveAsRequestP';
|
|
189
|
+
import type { QPdfCompressInMemoryRequestIdP as _ironpdfengineproto_QPdfCompressInMemoryRequestIdP, QPdfCompressInMemoryRequestIdP__Output as _ironpdfengineproto_QPdfCompressInMemoryRequestIdP__Output } from '../ironpdfengineproto/QPdfCompressInMemoryRequestIdP';
|
|
190
|
+
import type { QPdfCompressInMemoryRequestStreamP as _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, QPdfCompressInMemoryRequestStreamP__Output as _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP__Output } from '../ironpdfengineproto/QPdfCompressInMemoryRequestStreamP';
|
|
189
191
|
import type { QPdfIsLinearizedRequestStreamP as _ironpdfengineproto_QPdfIsLinearizedRequestStreamP, QPdfIsLinearizedRequestStreamP__Output as _ironpdfengineproto_QPdfIsLinearizedRequestStreamP__Output } from '../ironpdfengineproto/QPdfIsLinearizedRequestStreamP';
|
|
190
192
|
import type { QPdfSaveAsJsonRequestStreamP as _ironpdfengineproto_QPdfSaveAsJsonRequestStreamP, QPdfSaveAsJsonRequestStreamP__Output as _ironpdfengineproto_QPdfSaveAsJsonRequestStreamP__Output } from '../ironpdfengineproto/QPdfSaveAsJsonRequestStreamP';
|
|
191
193
|
import type { QPdfSaveAsLinearizedFromBytesRequestStreamP as _ironpdfengineproto_QPdfSaveAsLinearizedFromBytesRequestStreamP, QPdfSaveAsLinearizedFromBytesRequestStreamP__Output as _ironpdfengineproto_QPdfSaveAsLinearizedFromBytesRequestStreamP__Output } from '../ironpdfengineproto/QPdfSaveAsLinearizedFromBytesRequestStreamP';
|
|
@@ -1382,6 +1384,16 @@ export interface IronPdfServiceClient extends grpc.Client {
|
|
|
1382
1384
|
qPdfCompressionCompressAndSaveAsFromBytes(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1383
1385
|
qPdfCompressionCompressAndSaveAsFromBytes(options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1384
1386
|
|
|
1387
|
+
QPdf_Compression_CompressInMemory(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1388
|
+
QPdf_Compression_CompressInMemory(options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1389
|
+
qPdfCompressionCompressInMemory(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1390
|
+
qPdfCompressionCompressInMemory(options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1391
|
+
|
|
1392
|
+
QPdf_Compression_CompressInMemoryFromId(argument: _ironpdfengineproto_QPdfCompressInMemoryRequestIdP, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1393
|
+
QPdf_Compression_CompressInMemoryFromId(argument: _ironpdfengineproto_QPdfCompressInMemoryRequestIdP, options?: grpc.CallOptions): grpc.ClientReadableStream<_ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1394
|
+
qPdfCompressionCompressInMemoryFromId(argument: _ironpdfengineproto_QPdfCompressInMemoryRequestIdP, metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientReadableStream<_ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1395
|
+
qPdfCompressionCompressInMemoryFromId(argument: _ironpdfengineproto_QPdfCompressInMemoryRequestIdP, options?: grpc.CallOptions): grpc.ClientReadableStream<_ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1396
|
+
|
|
1385
1397
|
QPdf_Json_SaveAsJson(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfSaveAsJsonRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1386
1398
|
QPdf_Json_SaveAsJson(options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfSaveAsJsonRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
1387
1399
|
qPdfJsonSaveAsJson(metadata: grpc.Metadata, options?: grpc.CallOptions): grpc.ClientDuplexStream<_ironpdfengineproto_QPdfSaveAsJsonRequestStreamP, _ironpdfengineproto_BytesResultStreamP__Output>;
|
|
@@ -1736,6 +1748,10 @@ export interface IronPdfServiceHandlers extends grpc.UntypedServiceImplementatio
|
|
|
1736
1748
|
|
|
1737
1749
|
QPdf_Compression_CompressAndSaveAsFromBytes: grpc.handleBidiStreamingCall<_ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP>;
|
|
1738
1750
|
|
|
1751
|
+
QPdf_Compression_CompressInMemory: grpc.handleBidiStreamingCall<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP>;
|
|
1752
|
+
|
|
1753
|
+
QPdf_Compression_CompressInMemoryFromId: grpc.handleServerStreamingCall<_ironpdfengineproto_QPdfCompressInMemoryRequestIdP__Output, _ironpdfengineproto_BytesResultStreamP>;
|
|
1754
|
+
|
|
1739
1755
|
QPdf_Json_SaveAsJson: grpc.handleBidiStreamingCall<_ironpdfengineproto_QPdfSaveAsJsonRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP>;
|
|
1740
1756
|
|
|
1741
1757
|
QPdf_Json_ToJson: grpc.handleClientStreamingCall<_ironpdfengineproto_QPdfToJsonRequestStreamP__Output, _ironpdfengineproto_StringResultP>;
|
|
@@ -1897,6 +1913,8 @@ export interface IronPdfServiceDefinition extends grpc.ServiceDefinition {
|
|
|
1897
1913
|
Pdfium_Text_ReplaceText: MethodDefinition<_ironpdfengineproto_PdfiumReplaceTextRequestP, _ironpdfengineproto_EmptyResultP, _ironpdfengineproto_PdfiumReplaceTextRequestP__Output, _ironpdfengineproto_EmptyResultP__Output>
|
|
1898
1914
|
QPdf_Compression_CompressAndSaveAs: MethodDefinition<_ironpdfengineproto_QPdfCompressAndSaveAsRequestP, _ironpdfengineproto_BytesResultStreamP, _ironpdfengineproto_QPdfCompressAndSaveAsRequestP__Output, _ironpdfengineproto_BytesResultStreamP__Output>
|
|
1899
1915
|
QPdf_Compression_CompressAndSaveAsFromBytes: MethodDefinition<_ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP, _ironpdfengineproto_BytesResultStreamP, _ironpdfengineproto_QPdfCompressAndSaveAsFromBytesRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP__Output>
|
|
1916
|
+
QPdf_Compression_CompressInMemory: MethodDefinition<_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP, _ironpdfengineproto_BytesResultStreamP, _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP__Output>
|
|
1917
|
+
QPdf_Compression_CompressInMemoryFromId: MethodDefinition<_ironpdfengineproto_QPdfCompressInMemoryRequestIdP, _ironpdfengineproto_BytesResultStreamP, _ironpdfengineproto_QPdfCompressInMemoryRequestIdP__Output, _ironpdfengineproto_BytesResultStreamP__Output>
|
|
1900
1918
|
QPdf_Json_SaveAsJson: MethodDefinition<_ironpdfengineproto_QPdfSaveAsJsonRequestStreamP, _ironpdfengineproto_BytesResultStreamP, _ironpdfengineproto_QPdfSaveAsJsonRequestStreamP__Output, _ironpdfengineproto_BytesResultStreamP__Output>
|
|
1901
1919
|
QPdf_Json_ToJson: MethodDefinition<_ironpdfengineproto_QPdfToJsonRequestStreamP, _ironpdfengineproto_StringResultP, _ironpdfengineproto_QPdfToJsonRequestStreamP__Output, _ironpdfengineproto_StringResultP__Output>
|
|
1902
1920
|
QPdf_Linearization_IsLinearized: MethodDefinition<_ironpdfengineproto_QPdfIsLinearizedRequestStreamP, _ironpdfengineproto_BooleanResultP, _ironpdfengineproto_QPdfIsLinearizedRequestStreamP__Output, _ironpdfengineproto_BooleanResultP__Output>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PdfDocumentP as _ironpdfengineproto_PdfDocumentP, PdfDocumentP__Output as _ironpdfengineproto_PdfDocumentP__Output } from '../ironpdfengineproto/PdfDocumentP';
|
|
2
|
+
export interface QPdfCompressInMemoryRequestIdP {
|
|
3
|
+
'document'?: (_ironpdfengineproto_PdfDocumentP | null);
|
|
4
|
+
'password'?: (string);
|
|
5
|
+
}
|
|
6
|
+
export interface QPdfCompressInMemoryRequestIdP__Output {
|
|
7
|
+
'document'?: (_ironpdfengineproto_PdfDocumentP__Output);
|
|
8
|
+
'password'?: (string);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=QPdfCompressInMemoryRequestIdP.d.ts.map
|
package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestIdP.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QPdfCompressInMemoryRequestIdP.d.ts","sourceRoot":"","sources":["QPdfCompressInMemoryRequestIdP.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,IAAI,gCAAgC,EAAE,oBAAoB,IAAI,wCAAwC,EAAE,MAAM,oCAAoC,CAAC;AAE7K,MAAM,WAAW,8BAA8B;IAC7C,UAAU,CAAC,EAAE,CAAC,gCAAgC,GAAG,IAAI,CAAC,CAAC;IACvD,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,sCAAsC;IACrD,UAAU,CAAC,EAAE,CAAC,wCAAwC,CAAC,CAAC;IACxD,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QPdfCompressInMemoryRequestIdP.js","sourceRoot":"","sources":["QPdfCompressInMemoryRequestIdP.ts"],"names":[],"mappings":";AAAA,kEAAkE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Original file: src/internal/IronPdfEngine.ProtoFiles/qpdf.proto
|
|
2
|
+
|
|
3
|
+
import type { PdfDocumentP as _ironpdfengineproto_PdfDocumentP, PdfDocumentP__Output as _ironpdfengineproto_PdfDocumentP__Output } from '../ironpdfengineproto/PdfDocumentP';
|
|
4
|
+
|
|
5
|
+
export interface QPdfCompressInMemoryRequestIdP {
|
|
6
|
+
'document'?: (_ironpdfengineproto_PdfDocumentP | null);
|
|
7
|
+
'password'?: (string);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface QPdfCompressInMemoryRequestIdP__Output {
|
|
11
|
+
'document'?: (_ironpdfengineproto_PdfDocumentP__Output);
|
|
12
|
+
'password'?: (string);
|
|
13
|
+
}
|
package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
export interface _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP {
|
|
4
|
+
'password'?: (string);
|
|
5
|
+
}
|
|
6
|
+
export interface _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP__Output {
|
|
7
|
+
'password'?: (string);
|
|
8
|
+
}
|
|
9
|
+
export interface QPdfCompressInMemoryRequestStreamP {
|
|
10
|
+
'info'?: (_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP | null);
|
|
11
|
+
'pdfBytesChunk'?: (Buffer | Uint8Array | string);
|
|
12
|
+
'request'?: "info" | "pdfBytesChunk";
|
|
13
|
+
}
|
|
14
|
+
export interface QPdfCompressInMemoryRequestStreamP__Output {
|
|
15
|
+
'info'?: (_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP__Output);
|
|
16
|
+
'pdfBytesChunk'?: (Buffer);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=QPdfCompressInMemoryRequestStreamP.d.ts.map
|
package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QPdfCompressInMemoryRequestStreamP.d.ts","sourceRoot":"","sources":["QPdfCompressInMemoryRequestStreamP.ts"],"names":[],"mappings":";;AAGA,MAAM,WAAW,4DAA4D;IAC3E,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,oEAAoE;IACnF,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;CACvB;AAED,MAAM,WAAW,kCAAkC;IACjD,MAAM,CAAC,EAAE,CAAC,4DAA4D,GAAG,IAAI,CAAC,CAAC;IAC/E,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;CACpC;AAED,MAAM,WAAW,0CAA0C;IACzD,MAAM,CAAC,EAAE,CAAC,oEAAoE,CAAC,CAAC;IAChF,eAAe,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;CAC5B"}
|
package/src/internal/generated_proto/ironpdfengineproto/QPdfCompressInMemoryRequestStreamP.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QPdfCompressInMemoryRequestStreamP.js","sourceRoot":"","sources":["QPdfCompressInMemoryRequestStreamP.ts"],"names":[],"mappings":";AAAA,kEAAkE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Original file: src/internal/IronPdfEngine.ProtoFiles/qpdf.proto
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP {
|
|
5
|
+
'password'?: (string);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface _ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP__Output {
|
|
9
|
+
'password'?: (string);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface QPdfCompressInMemoryRequestStreamP {
|
|
13
|
+
'info'?: (_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP | null);
|
|
14
|
+
'pdfBytesChunk'?: (Buffer | Uint8Array | string);
|
|
15
|
+
'request'?: "info"|"pdfBytesChunk";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface QPdfCompressInMemoryRequestStreamP__Output {
|
|
19
|
+
'info'?: (_ironpdfengineproto_QPdfCompressInMemoryRequestStreamP_InfoP__Output);
|
|
20
|
+
'pdfBytesChunk'?: (Buffer);
|
|
21
|
+
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import { Readable } from "stream";
|
|
1
5
|
export declare function compressImage(id: string, imageQuality: number, scaleToVisibleSize?: boolean): Promise<void>;
|
|
2
6
|
export declare function compressStructTree(id: string): Promise<void>;
|
|
7
|
+
export declare function compressAndSaveAs(id: string, outputPath: string, imageQuality?: number): Promise<void>;
|
|
8
|
+
export declare function compressInMemory(id: string, imageQuality?: number): Promise<Buffer>;
|
|
9
|
+
export declare function compressInMemoryStream(id: string, imageQuality?: number): Promise<Readable>;
|
|
3
10
|
//# sourceMappingURL=compress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["compress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compress.d.ts","sourceRoot":"","sources":["compress.ts"],"names":[],"mappings":";;;AAOA,OAAO,EAAc,QAAQ,EAAC,MAAM,QAAQ,CAAC;AAG7C,wBAAsB,aAAa,CAClC,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,kBAAkB,UAAQ,GACxB,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,kBAAkB,CACvC,EAAE,EAAE,MAAM,GACR,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED,wBAAsB,iBAAiB,CACtC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAmCf;AAED,wBAAsB,gBAAgB,CACrC,EAAE,EAAE,MAAM,EACV,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,CAAC,CAkCjB;AAED,wBAAsB,sBAAsB,CAC3C,EAAE,EAAE,MAAM,EACV,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,QAAQ,CAAC,CAiCnB"}
|
|
@@ -8,10 +8,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.compressStructTree = exports.compressImage = void 0;
|
|
15
|
+
exports.compressInMemoryStream = exports.compressInMemory = exports.compressAndSaveAs = exports.compressStructTree = exports.compressImage = void 0;
|
|
13
16
|
const access_1 = require("../../access");
|
|
14
17
|
const util_1 = require("../util");
|
|
18
|
+
const stream_1 = require("stream");
|
|
19
|
+
const fs_1 = __importDefault(require("fs"));
|
|
15
20
|
function compressImage(id, imageQuality, scaleToVisibleSize = false) {
|
|
16
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
22
|
const client = yield access_1.Access.ensureConnection();
|
|
@@ -52,4 +57,79 @@ function compressStructTree(id) {
|
|
|
52
57
|
});
|
|
53
58
|
}
|
|
54
59
|
exports.compressStructTree = compressStructTree;
|
|
60
|
+
function compressAndSaveAs(id, outputPath, imageQuality) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const client = yield access_1.Access.ensureConnection();
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
const request = Object.assign({ document: { documentId: id }, outputPath: "", password: "" }, (imageQuality !== undefined ? { jpeg: imageQuality } : {}));
|
|
65
|
+
const stream = client.QPdf_Compression_CompressAndSaveAs(request);
|
|
66
|
+
const buffers = [];
|
|
67
|
+
stream.on("data", (data) => {
|
|
68
|
+
if (data.exception) {
|
|
69
|
+
reject(`${data.exception.message}/n${data.exception.remoteStackTrace}`);
|
|
70
|
+
}
|
|
71
|
+
else if (data.resultChunk) {
|
|
72
|
+
buffers.push(data.resultChunk);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
stream.on("error", (err) => {
|
|
76
|
+
reject(`${err.name}/n${err.message}`);
|
|
77
|
+
});
|
|
78
|
+
stream.on("end", () => {
|
|
79
|
+
fs_1.default.writeFileSync(outputPath, Buffer.concat(buffers));
|
|
80
|
+
resolve();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
exports.compressAndSaveAs = compressAndSaveAs;
|
|
86
|
+
function compressInMemory(id, imageQuality) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
const client = yield access_1.Access.ensureConnection();
|
|
89
|
+
return new Promise((resolve, reject) => {
|
|
90
|
+
const request = Object.assign({ document: { documentId: id }, outputPath: "", password: "" }, (imageQuality !== undefined ? { jpeg: imageQuality } : {}));
|
|
91
|
+
const stream = client.QPdf_Compression_CompressAndSaveAs(request);
|
|
92
|
+
const buffers = [];
|
|
93
|
+
stream.on("data", (data) => {
|
|
94
|
+
if (data.exception) {
|
|
95
|
+
reject(`${data.exception.message}/n${data.exception.remoteStackTrace}`);
|
|
96
|
+
}
|
|
97
|
+
else if (data.resultChunk) {
|
|
98
|
+
buffers.push(data.resultChunk);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
stream.on("error", (err) => {
|
|
102
|
+
reject(`${err.name}/n${err.message}`);
|
|
103
|
+
});
|
|
104
|
+
stream.on("end", () => {
|
|
105
|
+
resolve(Buffer.concat(buffers));
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
exports.compressInMemory = compressInMemory;
|
|
111
|
+
function compressInMemoryStream(id, imageQuality) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
const client = yield access_1.Access.ensureConnection();
|
|
114
|
+
const passThrough = new stream_1.PassThrough();
|
|
115
|
+
const request = Object.assign({ document: { documentId: id }, outputPath: "", password: "" }, (imageQuality !== undefined ? { jpeg: imageQuality } : {}));
|
|
116
|
+
const stream = client.QPdf_Compression_CompressAndSaveAs(request);
|
|
117
|
+
stream.on("data", (data) => {
|
|
118
|
+
if (data.exception) {
|
|
119
|
+
passThrough.destroy(new Error(`${data.exception.message}/n${data.exception.remoteStackTrace}`));
|
|
120
|
+
}
|
|
121
|
+
else if (data.resultChunk) {
|
|
122
|
+
passThrough.write(data.resultChunk);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
stream.on("error", (err) => {
|
|
126
|
+
passThrough.destroy(err);
|
|
127
|
+
});
|
|
128
|
+
stream.on("end", () => {
|
|
129
|
+
passThrough.end();
|
|
130
|
+
});
|
|
131
|
+
return passThrough;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
exports.compressInMemoryStream = compressInMemoryStream;
|
|
55
135
|
//# sourceMappingURL=compress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress.js","sourceRoot":"","sources":["compress.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compress.js","sourceRoot":"","sources":["compress.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,yCAAoC;AAGpC,kCAAmD;AACnD,mCAA6C;AAC7C,4CAAoB;AAEpB,SAAsB,aAAa,CAClC,EAAU,EACV,YAAoB,EACpB,kBAAkB,GAAG,KAAK;;QAE1B,MAAM,MAAM,GAAyB,MAAM,eAAM,CAAC,gBAAgB,EAAE,CAAC;QACrE,OAAO,IAAI,OAAO,CACjB,CAAC,OAAmB,EAAE,MAAkC,EAAE,EAAE;YAC3D,MAAM,CAAC,8BAA8B,CACpC;gBACC,QAAQ,EAAE,EAAC,UAAU,EAAE,EAAE,EAAC;gBAC1B,kBAAkB,EAAE,kBAAkB;gBACtC,OAAO,EAAE,YAAY;aACrB,EACD,CACC,GAAwB,EACxB,KAAuC,EACtC,EAAE;gBACH,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;iBACtC;qBAAM,IAAI,KAAK,EAAE;oBACjB,IAAA,iCAA0B,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;oBAC1C,OAAO,EAAE,CAAC;iBACV;YACF,CAAC,CACD,CAAC;QACH,CAAC,CACD,CAAC;IACH,CAAC;CAAA;AA5BD,sCA4BC;AAED,SAAsB,kBAAkB,CACvC,EAAU;;QAEV,MAAM,MAAM,GAAyB,MAAM,eAAM,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,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC,CAC1E,CAAC;aACF;iBAAM,IAAI,IAAI,CAAC,WAAW,EAAE;gBAC5B,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aACpC;QACF,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;YACjC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;YACrB,WAAW,CAAC,GAAG,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACpB,CAAC;CAAA;AApCD,wDAoCC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import * as grpc from "@grpc/grpc-js";
|
|
1
2
|
import {ServiceError} from "@grpc/grpc-js";
|
|
2
3
|
import {IronPdfServiceClient} from "../../generated_proto/ironpdfengineproto/IronPdfService";
|
|
3
4
|
import {Access} from "../../access";
|
|
4
5
|
import {EmptyResultP__Output} from "../../generated_proto/ironpdfengineproto/EmptyResultP";
|
|
6
|
+
import {BytesResultStreamP__Output} from "../../generated_proto/ironpdfengineproto/BytesResultStreamP";
|
|
5
7
|
import {handleEmptyResultP__Output} from "../util";
|
|
8
|
+
import {PassThrough, Readable} from "stream";
|
|
9
|
+
import fs from "fs";
|
|
6
10
|
|
|
7
11
|
export async function compressImage(
|
|
8
12
|
id: string,
|
|
@@ -60,3 +64,120 @@ export async function compressStructTree(
|
|
|
60
64
|
);
|
|
61
65
|
}
|
|
62
66
|
|
|
67
|
+
export async function compressAndSaveAs(
|
|
68
|
+
id: string,
|
|
69
|
+
outputPath: string,
|
|
70
|
+
imageQuality?: number
|
|
71
|
+
): Promise<void> {
|
|
72
|
+
const client: IronPdfServiceClient = await Access.ensureConnection();
|
|
73
|
+
|
|
74
|
+
return new Promise(
|
|
75
|
+
(resolve: () => void, reject: (errorMsg: string) => void) => {
|
|
76
|
+
const request = {
|
|
77
|
+
document: {documentId: id},
|
|
78
|
+
outputPath: "",
|
|
79
|
+
password: "",
|
|
80
|
+
...(imageQuality !== undefined ? {jpeg: imageQuality} : {}),
|
|
81
|
+
};
|
|
82
|
+
const stream: grpc.ClientReadableStream<BytesResultStreamP__Output> =
|
|
83
|
+
client.QPdf_Compression_CompressAndSaveAs(request);
|
|
84
|
+
|
|
85
|
+
const buffers: Buffer[] = [];
|
|
86
|
+
stream.on("data", (data: BytesResultStreamP__Output) => {
|
|
87
|
+
if (data.exception) {
|
|
88
|
+
reject(
|
|
89
|
+
`${data.exception.message}/n${data.exception.remoteStackTrace}`
|
|
90
|
+
);
|
|
91
|
+
} else if (data.resultChunk) {
|
|
92
|
+
buffers.push(data.resultChunk);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
stream.on("error", (err: Error) => {
|
|
97
|
+
reject(`${err.name}/n${err.message}`);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
stream.on("end", () => {
|
|
101
|
+
fs.writeFileSync(outputPath, Buffer.concat(buffers));
|
|
102
|
+
resolve();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export async function compressInMemory(
|
|
109
|
+
id: string,
|
|
110
|
+
imageQuality?: number
|
|
111
|
+
): Promise<Buffer> {
|
|
112
|
+
const client: IronPdfServiceClient = await Access.ensureConnection();
|
|
113
|
+
|
|
114
|
+
return new Promise(
|
|
115
|
+
(resolve: (_: Buffer) => void, reject: (errorMsg: string) => void) => {
|
|
116
|
+
const request = {
|
|
117
|
+
document: {documentId: id},
|
|
118
|
+
outputPath: "",
|
|
119
|
+
password: "",
|
|
120
|
+
...(imageQuality !== undefined ? {jpeg: imageQuality} : {}),
|
|
121
|
+
};
|
|
122
|
+
const stream: grpc.ClientReadableStream<BytesResultStreamP__Output> =
|
|
123
|
+
client.QPdf_Compression_CompressAndSaveAs(request);
|
|
124
|
+
|
|
125
|
+
const buffers: Buffer[] = [];
|
|
126
|
+
stream.on("data", (data: BytesResultStreamP__Output) => {
|
|
127
|
+
if (data.exception) {
|
|
128
|
+
reject(
|
|
129
|
+
`${data.exception.message}/n${data.exception.remoteStackTrace}`
|
|
130
|
+
);
|
|
131
|
+
} else if (data.resultChunk) {
|
|
132
|
+
buffers.push(data.resultChunk);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
stream.on("error", (err: Error) => {
|
|
137
|
+
reject(`${err.name}/n${err.message}`);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
stream.on("end", () => {
|
|
141
|
+
resolve(Buffer.concat(buffers));
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export async function compressInMemoryStream(
|
|
148
|
+
id: string,
|
|
149
|
+
imageQuality?: number
|
|
150
|
+
): Promise<Readable> {
|
|
151
|
+
const client: IronPdfServiceClient = await Access.ensureConnection();
|
|
152
|
+
|
|
153
|
+
const passThrough = new PassThrough();
|
|
154
|
+
|
|
155
|
+
const request = {
|
|
156
|
+
document: {documentId: id},
|
|
157
|
+
outputPath: "",
|
|
158
|
+
password: "",
|
|
159
|
+
...(imageQuality !== undefined ? {jpeg: imageQuality} : {}),
|
|
160
|
+
};
|
|
161
|
+
const stream: grpc.ClientReadableStream<BytesResultStreamP__Output> =
|
|
162
|
+
client.QPdf_Compression_CompressAndSaveAs(request);
|
|
163
|
+
|
|
164
|
+
stream.on("data", (data: BytesResultStreamP__Output) => {
|
|
165
|
+
if (data.exception) {
|
|
166
|
+
passThrough.destroy(
|
|
167
|
+
new Error(`${data.exception.message}/n${data.exception.remoteStackTrace}`)
|
|
168
|
+
);
|
|
169
|
+
} else if (data.resultChunk) {
|
|
170
|
+
passThrough.write(data.resultChunk);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
stream.on("error", (err: Error) => {
|
|
175
|
+
passThrough.destroy(err);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
stream.on("end", () => {
|
|
179
|
+
passThrough.end();
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
return passThrough;
|
|
183
|
+
}
|
|
@@ -15,4 +15,5 @@ export declare enum PdfUAVersions {
|
|
|
15
15
|
}
|
|
16
16
|
export declare function toPdfA(id: string, pdfaVersion: PdfAVersions, customICCFilePath?: string): Promise<void>;
|
|
17
17
|
export declare function toPdfUA(id: string, naturalLanguages: number, pdfUaVersion?: PdfUAVersions): Promise<void>;
|
|
18
|
+
export declare function toPdfUAForScreenReader(id: string, htmlDom: string, naturalLanguages: number): Promise<void>;
|
|
18
19
|
//# sourceMappingURL=pdfa.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdfa.d.ts","sourceRoot":"","sources":["pdfa.ts"],"names":[],"mappings":"AAYA,oBAAY,YAAY;IACvB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,KAAK,IAAI;IACT,MAAM,IAAI;IACV,MAAM,KAAK;CACX;AAED,oBAAY,aAAa;IACxB,MAAM,IAAI;IACV,MAAM,IAAI;CACV;AAED,wBAAsB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C7G;AAGD,wBAAsB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAE,aAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBrI"}
|
|
1
|
+
{"version":3,"file":"pdfa.d.ts","sourceRoot":"","sources":["pdfa.ts"],"names":[],"mappings":"AAYA,oBAAY,YAAY;IACvB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,KAAK,IAAI;IACT,MAAM,IAAI;IACV,MAAM,KAAK;CACX;AAED,oBAAY,aAAa;IACxB,MAAM,IAAI;IACV,MAAM,IAAI;CACV;AAED,wBAAsB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C7G;AAGD,wBAAsB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,GAAE,aAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBrI;AAED,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBjH"}
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.toPdfUA = exports.toPdfA = exports.PdfUAVersions = exports.PdfAVersions = void 0;
|
|
15
|
+
exports.toPdfUAForScreenReader = exports.toPdfUA = exports.toPdfA = exports.PdfUAVersions = exports.PdfAVersions = void 0;
|
|
16
16
|
const access_1 = require("../../access");
|
|
17
17
|
const util_1 = require("../util");
|
|
18
18
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -95,4 +95,25 @@ function toPdfUA(id, naturalLanguages, pdfUaVersion = PdfUAVersions.PdfUA1) {
|
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
exports.toPdfUA = toPdfUA;
|
|
98
|
+
function toPdfUAForScreenReader(id, htmlDom, naturalLanguages) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const client = yield access_1.Access.ensureConnection();
|
|
101
|
+
return new Promise((resolve, reject) => {
|
|
102
|
+
client.Pdfium_ConvertToPdfUAForScreenReader({
|
|
103
|
+
document: { documentId: id },
|
|
104
|
+
htmlDom: htmlDom,
|
|
105
|
+
lang: naturalLanguages,
|
|
106
|
+
}, (err, value) => {
|
|
107
|
+
if (err) {
|
|
108
|
+
reject(`${err.name}/n${err.message}`);
|
|
109
|
+
}
|
|
110
|
+
else if (value) {
|
|
111
|
+
(0, util_1.handleEmptyResultP__Output)(value, reject);
|
|
112
|
+
resolve();
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
exports.toPdfUAForScreenReader = toPdfUAForScreenReader;
|
|
98
119
|
//# sourceMappingURL=pdfa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pdfa.js","sourceRoot":"","sources":["pdfa.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,yCAAoC;AAEpC,kCAIiB;AACjB,4CAAoB;AAGpB,IAAY,YAUX;AAVD,WAAY,YAAY;IACvB,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,mDAAU,CAAA;IACV,iDAAS,CAAA;IACT,mDAAU,CAAA;IACV,oDAAW,CAAA;AACZ,CAAC,EAVW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAUvB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACxB,qDAAU,CAAA;IACV,qDAAU,CAAA;AACX,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,SAAsB,MAAM,CAAC,EAAU,EAAE,WAAyB,EAAE,iBAA0B;;QAC7F,OAAO,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AI,KAAK,EAAE;oBACjB,IAAA,iCAA0B,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;oBAC1C,OAAO,EAAE,CAAC;iBACV;YACF,CAAC,CACD,CAAC;QACH,CAAC,CACD,CAAC;IACH,CAAC;CAAA;AAxBD,wDAwBC"}
|
|
@@ -98,3 +98,29 @@ export async function toPdfUA(id: string, naturalLanguages: number, pdfUaVersion
|
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
export async function toPdfUAForScreenReader(id: string, htmlDom: string, naturalLanguages: number): Promise<void> {
|
|
103
|
+
const client: IronPdfServiceClient = await Access.ensureConnection();
|
|
104
|
+
return new Promise(
|
|
105
|
+
(resolve: () => void, reject: (errorMsg: string) => void) => {
|
|
106
|
+
client.Pdfium_ConvertToPdfUAForScreenReader(
|
|
107
|
+
{
|
|
108
|
+
document: { documentId: id },
|
|
109
|
+
htmlDom: htmlDom,
|
|
110
|
+
lang: naturalLanguages,
|
|
111
|
+
},
|
|
112
|
+
(
|
|
113
|
+
err: ServiceError | null,
|
|
114
|
+
value: EmptyResultP__Output | undefined
|
|
115
|
+
) => {
|
|
116
|
+
if (err) {
|
|
117
|
+
reject(`${err.name}/n${err.message}`);
|
|
118
|
+
} else if (value) {
|
|
119
|
+
handleEmptyResultP__Output(value, reject);
|
|
120
|
+
resolve();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DigitalSignature } from "../../../public/signature";
|
|
1
|
+
import { DigitalSignature, VerifiedSignature } from "../../../public/signature";
|
|
2
2
|
export declare function signPdf(id: string, signature: DigitalSignature): Promise<void>;
|
|
3
3
|
export declare function getSignatureCount(id: string): Promise<number>;
|
|
4
|
+
export declare function getVerifiedSignatures(id: string): Promise<VerifiedSignature[]>;
|
|
4
5
|
//# sourceMappingURL=signing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["signing.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"signing.d.ts","sourceRoot":"","sources":["signing.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAShF,wBAAsB,OAAO,CAC5B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC,CA+Ef;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBnE;AAED,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAwCpF"}
|
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.getSignatureCount = exports.signPdf = void 0;
|
|
15
|
+
exports.getVerifiedSignatures = exports.getSignatureCount = exports.signPdf = void 0;
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
const access_1 = require("../../access");
|
|
18
18
|
const util_1 = require("../util");
|
|
@@ -103,4 +103,41 @@ function getSignatureCount(id) {
|
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
exports.getSignatureCount = getSignatureCount;
|
|
106
|
+
function getVerifiedSignatures(id) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const client = yield access_1.Access.ensureConnection();
|
|
109
|
+
return new Promise((resolve, reject) => {
|
|
110
|
+
const stream = client.Pdfium_Signature_GetVerifiedSignature((err, value) => {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
if (err) {
|
|
113
|
+
reject(`${err.name}/n${err.message}`);
|
|
114
|
+
}
|
|
115
|
+
else if (value) {
|
|
116
|
+
if (value === null || value === void 0 ? void 0 : value.exception) {
|
|
117
|
+
(0, util_1.handleRemoteException)(value.exception, reject);
|
|
118
|
+
}
|
|
119
|
+
const signatures = ((_b = (_a = value.verifiedSignatures) === null || _a === void 0 ? void 0 : _a.verifiedSignatures) !== null && _b !== void 0 ? _b : []).map((sig) => {
|
|
120
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
121
|
+
return ({
|
|
122
|
+
signatureName: (_a = sig.signatureName) !== null && _a !== void 0 ? _a : "",
|
|
123
|
+
signingContact: (_b = sig.signingContact) !== null && _b !== void 0 ? _b : "",
|
|
124
|
+
signingReason: (_c = sig.signingReason) !== null && _c !== void 0 ? _c : "",
|
|
125
|
+
signingLocation: (_d = sig.signingLocation) !== null && _d !== void 0 ? _d : "",
|
|
126
|
+
signingDate: sig.signingDate
|
|
127
|
+
? new Date(Number((_e = sig.signingDate.seconds) !== null && _e !== void 0 ? _e : 0) * 1000 +
|
|
128
|
+
Math.floor(Number((_f = sig.signingDate.nanos) !== null && _f !== void 0 ? _f : 0) / 1e6))
|
|
129
|
+
: undefined,
|
|
130
|
+
isValid: (_g = sig.isValid) !== null && _g !== void 0 ? _g : false,
|
|
131
|
+
filter: (_h = sig.filter) !== null && _h !== void 0 ? _h : "",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
resolve(signatures);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
stream.write({ info: { document: { documentId: id } } });
|
|
138
|
+
stream.end();
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
exports.getVerifiedSignatures = getVerifiedSignatures;
|
|
106
143
|
//# sourceMappingURL=signing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signing.js","sourceRoot":"","sources":["signing.ts"],"names":[],"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