@groupdocs/groupdocs.viewer 23.8.0 → 23.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/lib/groupdocs.viewer.js +19 -29
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -11,8 +11,8 @@ const path = require('path');
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-viewer-nodejs-23.
|
|
15
|
-
console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-viewer-nodejs-23.
|
|
14
|
+
if (!checkFileExists(path.join(__dirname, 'lib/groupdocs-viewer-nodejs-23.12.jar'))) {
|
|
15
|
+
console.warn('\x1b[33m%s\x1b[0m', `File groupdocs-viewer-nodejs-23.12.jar not found in the lib directory.\nPlease navigate to the package directory:`);
|
|
16
16
|
console.log('\n cd node_modules/@groupdocs/groupdocs.viewer\n')
|
|
17
17
|
console.warn('\x1b[33m%s\x1b[0m', `Then download the JAR file using the command:`);
|
|
18
18
|
console.log('\n npm run postinstall\n');
|
package/lib/groupdocs.viewer.js
CHANGED
|
@@ -11,7 +11,7 @@ java.asyncOptions = {
|
|
|
11
11
|
syncSuffix: '',
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
java.classpath.push(path.join(__dirname, '/groupdocs-viewer-nodejs-23.
|
|
14
|
+
java.classpath.push(path.join(__dirname, '/groupdocs-viewer-nodejs-23.12.jar'))
|
|
15
15
|
|
|
16
16
|
exports = module.exports
|
|
17
17
|
|
|
@@ -26,14 +26,21 @@ function __typeof__(objClass) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/** STREAM HELPERS * */
|
|
29
|
-
exports.readDataFromStream = function (readStream
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
inputStreamBuffer.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
exports.readDataFromStream = function (readStream) {
|
|
30
|
+
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
const inputStreamBuffer = new exports.StreamBuffer()
|
|
33
|
+
readStream.on('data', chunk => {
|
|
34
|
+
inputStreamBuffer.write(chunk)
|
|
35
|
+
})
|
|
36
|
+
readStream.on('end', () => {
|
|
37
|
+
try {
|
|
38
|
+
resolve(inputStreamBuffer.toInputStream())
|
|
39
|
+
} catch (err) {
|
|
40
|
+
reject(err);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
});
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
exports.readBytesFromStream = function (readStream, callback) {
|
|
@@ -48,13 +55,13 @@ exports.readBytesFromStream = function (readStream, callback) {
|
|
|
48
55
|
})
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
|
|
52
58
|
exports.License = java.import("com.groupdocs.viewer.License");
|
|
53
59
|
exports.Metered = java.import("com.groupdocs.viewer.Metered");
|
|
54
60
|
exports.Viewer = java.import("com.groupdocs.viewer.Viewer");
|
|
55
61
|
exports.ViewerSettings = java.import("com.groupdocs.viewer.ViewerSettings");
|
|
56
62
|
exports.FileCache = java.import("com.groupdocs.viewer.caching.FileCache");
|
|
57
63
|
exports.CacheableFactory = java.import("com.groupdocs.viewer.caching.extra.CacheableFactory");
|
|
64
|
+
exports.DefaultTemporaryFileManager = java.import("com.groupdocs.viewer.common.tempfiles.DefaultTemporaryFileManager");
|
|
58
65
|
exports.DocumentSavingArgs = java.import("com.groupdocs.viewer.domain.documents.converting.tohtml.utils.DocumentSavingArgs");
|
|
59
66
|
exports.ArchiveSecurityException = java.import("com.groupdocs.viewer.exception.ArchiveSecurityException");
|
|
60
67
|
exports.FileNotFoundException = java.import("com.groupdocs.viewer.exception.FileNotFoundException");
|
|
@@ -89,6 +96,7 @@ exports.TextOptions = java.import("com.groupdocs.viewer.options.TextOptions");
|
|
|
89
96
|
exports.Tile = java.import("com.groupdocs.viewer.options.Tile");
|
|
90
97
|
exports.VisioRenderingOptions = java.import("com.groupdocs.viewer.options.VisioRenderingOptions");
|
|
91
98
|
exports.Watermark = java.import("com.groupdocs.viewer.options.Watermark");
|
|
99
|
+
exports.WebDocumentOptions = java.import("com.groupdocs.viewer.options.WebDocumentOptions");
|
|
92
100
|
exports.WordProcessingOptions = java.import("com.groupdocs.viewer.options.WordProcessingOptions");
|
|
93
101
|
exports.ArchiveViewInfoImpl = java.import("com.groupdocs.viewer.results.ArchiveViewInfoImpl");
|
|
94
102
|
exports.AttachmentImpl = java.import("com.groupdocs.viewer.results.AttachmentImpl");
|
|
@@ -113,6 +121,7 @@ exports.StreamBuffer = java.import("com.groupdocs.viewer.utils.StreamBuffer");
|
|
|
113
121
|
|
|
114
122
|
exports.FileType = java.import("com.groupdocs.viewer.FileType");
|
|
115
123
|
exports.CacheKeys = java.import("com.groupdocs.viewer.caching.CacheKeys");
|
|
124
|
+
exports.TemporaryFileManagerFactory = java.import("com.groupdocs.viewer.common.tempfiles.TemporaryFileManagerFactory");
|
|
116
125
|
exports.SearchOption = java.import("com.groupdocs.viewer.fonts.SearchOption");
|
|
117
126
|
exports.CadOptions = java.import("com.groupdocs.viewer.options.CadOptions");
|
|
118
127
|
exports.Field = java.import("com.groupdocs.viewer.options.Field");
|
|
@@ -128,7 +137,6 @@ exports.TimeUnit = java.import("com.groupdocs.viewer.options.TimeUnit");
|
|
|
128
137
|
exports.ViewInfoOptions = java.import("com.groupdocs.viewer.options.ViewInfoOptions");
|
|
129
138
|
exports.PathUtils = java.import("com.groupdocs.viewer.utils.PathUtils");
|
|
130
139
|
|
|
131
|
-
|
|
132
140
|
exports.StreamBuffer = class StreamBuffer {
|
|
133
141
|
constructor() {
|
|
134
142
|
const self = java.newInstanceSync('com.groupdocs.viewer.utils.StreamBuffer')
|
|
@@ -141,21 +149,3 @@ exports.StreamBuffer = class StreamBuffer {
|
|
|
141
149
|
return self
|
|
142
150
|
}
|
|
143
151
|
}
|
|
144
|
-
|
|
145
|
-
/** STREAM METHODS * */
|
|
146
|
-
|
|
147
|
-
exports.License.setLicenseFromStream = function (license, licenseStream, callback) {
|
|
148
|
-
const inputStreamBuffer = new exports.StreamBuffer()
|
|
149
|
-
licenseStream.on('data', chunk => {
|
|
150
|
-
inputStreamBuffer.write(chunk)
|
|
151
|
-
})
|
|
152
|
-
licenseStream.on('end', () => {
|
|
153
|
-
let error
|
|
154
|
-
try {
|
|
155
|
-
license.setLicense(inputStreamBuffer.toInputStream())
|
|
156
|
-
} catch (err) {
|
|
157
|
-
error = err
|
|
158
|
-
}
|
|
159
|
-
callback(error)
|
|
160
|
-
})
|
|
161
|
-
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@groupdocs/groupdocs.viewer",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.12.0",
|
|
4
4
|
"description": "Powerful, high-performance and cross-platform library that allows you to build desktop and web file viewer applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"postinstall": "curl -H 'Cache-Control:no-cache' https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-viewer-nodejs/23.
|
|
7
|
+
"postinstall": "curl -H 'Cache-Control:no-cache' https://releases.groupdocs.com/java/repo/com/groupdocs/groupdocs-viewer-nodejs/23.12/groupdocs-viewer-nodejs-23.12.jar > lib/groupdocs-viewer-nodejs-23.12.jar"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
10
|
"view",
|