@pdftron/pdfnet-node-samples 9.4.0 → 9.4.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdftron/pdfnet-node-samples",
3
- "version": "9.4.0",
3
+ "version": "9.4.2",
4
4
  "description": "Sample code for the @pdftron/pdfnet-node package.",
5
5
  "scripts": {
6
6
  "test": "run-script-os",
@@ -12,7 +12,7 @@
12
12
  "license": "Commercial",
13
13
  "homepage": "https://www.pdftron.com",
14
14
  "dependencies": {
15
- "@pdftron/pdfnet-node": "9.4.0",
15
+ "@pdftron/pdfnet-node": "9.4.2",
16
16
  "run-script-os": "^1.1.6"
17
17
  }
18
18
  }
@@ -38,17 +38,15 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
38
38
  // automatically. Otherwise, it must be set manually using HTML2PDF.setModulePath.
39
39
  await PDFNet.HTML2PDF.setModulePath('../../lib/');
40
40
 
41
- try {
42
- if(await !PDFNet.HTML2PDF.isModuleAvailable()){
43
- console.log('Unable to run HTML2PDFTest: PDFTron SDK HTML2PDF module not available.');
44
- console.log('---------------------------------------------------------------');
45
- console.log('The HTML2PDF module is an optional add-on, available for download');
46
- console.log('at https://www.pdftron.com/. If you have already downloaded this');
47
- console.log('module, ensure that the SDK is able to find the required files');
48
- console.log('using the HTML2PDF.setModulePath() function.');
49
- }
50
- } catch (err) {
51
- console.log(err);
41
+ if(!(await PDFNet.HTML2PDF.isModuleAvailable())) {
42
+ console.log('Unable to run HTML2PDFTest: PDFTron SDK HTML2PDF module not available.');
43
+ console.log('---------------------------------------------------------------');
44
+ console.log('The HTML2PDF module is an optional add-on, available for download');
45
+ console.log('at https://www.pdftron.com/. If you have already downloaded this');
46
+ console.log('module, ensure that the SDK is able to find the required files');
47
+ console.log('using the HTML2PDF.setModulePath() function.');
48
+
49
+ return;
52
50
  }
53
51
 
54
52
  //--------------------------------------------------------------------------------