@pdftron/pdfnet-node-samples 9.5.0-6 → 9.5.0-6-beta

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.
Files changed (150) hide show
  1. package/{samples/AddImageTest → AddImageTest}/AddImageTest.js +2 -2
  2. package/{samples/AdvancedImagingTest → AdvancedImagingTest}/AdvancedImagingTest.js +5 -5
  3. package/{samples/AnnotationTest → AnnotationTest}/AnnotationTest.js +1 -1
  4. package/BarcodeTest/BarcodeTest.js +120 -0
  5. package/{samples/BookmarkTest → BookmarkTest}/BookmarkTest.js +1 -1
  6. package/{samples/CAD2PDFTest → CAD2PDFTest}/CAD2PDFTest.js +5 -5
  7. package/{samples/ContentReplacerTest → ContentReplacerTest}/ContentReplacerTest.js +1 -1
  8. package/ConvertPrintTest/ConvertPrintTest.js +153 -0
  9. package/{samples/ConvertTest → ConvertTest}/ConvertTest.js +12 -79
  10. package/{samples/DataExtractionTest → DataExtractionTest}/DataExtractionTest.js +141 -10
  11. package/{samples/DigitalSignaturesTest → DigitalSignaturesTest}/DigitalSignaturesTest.js +126 -12
  12. package/DocumentCreationTest/DocumentCreationTest.js +409 -0
  13. package/{samples/ElementBuilderTest → ElementBuilderTest}/ElementBuilderTest.js +1 -1
  14. package/{samples/ElementEditTest → ElementEditTest}/ElementEditTest.js +1 -1
  15. package/{samples/ElementReaderAdvTest → ElementReaderAdvTest}/ElementReaderAdvTest.js +1 -1
  16. package/{samples/ElementReaderTest → ElementReaderTest}/ElementReaderTest.js +1 -1
  17. package/{samples/EncTest → EncTest}/EncTest.js +1 -1
  18. package/{samples/FDFTest → FDFTest}/FDFTest.js +1 -1
  19. package/FindReplaceTest/FindReplaceTest.js +56 -0
  20. package/{samples/HTML2PDFTest → HTML2PDFTest}/HTML2PDFTest.js +34 -35
  21. package/{samples/HighlightsTest → HighlightsTest}/HighlightsTest.js +1 -1
  22. package/{samples/ImageExtractTest → ImageExtractTest}/ImageExtractTest.js +3 -3
  23. package/{samples/ImpositionTest → ImpositionTest}/ImpositionTest.js +1 -1
  24. package/{samples/InteractiveFormsTest → InteractiveFormsTest}/InteractiveFormsTest.js +1 -1
  25. package/{samples/JBIG2Test → JBIG2Test}/JBIG2Test.js +7 -7
  26. package/{samples/LicenseKey → LicenseKey}/LicenseKey.js +3 -3
  27. package/{samples/LogicalStructureTest → LogicalStructureTest}/LogicalStructureTest.js +1 -1
  28. package/{samples/OCRTest → OCRTest}/OCRTest.js +6 -5
  29. package/{samples/OfficeTemplateTest → OfficeTemplateTest}/OfficeTemplateTest.js +2 -2
  30. package/{samples/OfficeToPDFTest → OfficeToPDFTest}/OfficeToPDFTest.js +1 -1
  31. package/{samples/OptimizerTest → OptimizerTest}/OptimizerTest.js +1 -1
  32. package/{samples/PDF2HtmlTest → PDF2HtmlTest}/PDF2HtmlTest.js +6 -6
  33. package/{samples/PDF2OfficeTest → PDF2OfficeTest}/PDF2OfficeTest.js +6 -6
  34. package/{samples/PDFATest → PDFATest}/PDFATest.js +1 -1
  35. package/{samples/PDFDocMemoryTest → PDFDocMemoryTest}/PDFDocMemoryTest.js +1 -1
  36. package/{samples/PDFDrawTest → PDFDrawTest}/PDFDrawTest.js +1 -1
  37. package/{samples/PDFLayersTest → PDFLayersTest}/PDFLayersTest.js +1 -1
  38. package/{samples/PDFPackageTest → PDFPackageTest}/PDFPackageTest.js +1 -1
  39. package/{samples/PDFPageTest → PDFPageTest}/PDFPageTest.js +1 -1
  40. package/{samples/PDFRedactTest → PDFRedactTest}/PDFRedactTest.js +1 -1
  41. package/PDFUATest/PDFUATest.js +88 -0
  42. package/{samples/PageLabelsTest → PageLabelsTest}/PageLabelsTest.js +1 -1
  43. package/{samples/PatternTest → PatternTest}/PatternTest.js +1 -1
  44. package/{samples/RectTest → RectTest}/RectTest.js +1 -1
  45. package/{samples/SDFTest → SDFTest}/SDFTest.js +3 -4
  46. package/{samples/StamperTest → StamperTest}/StamperTest.js +1 -1
  47. package/TestFiles/Email.pdf +0 -0
  48. package/TestFiles/Invoice.pdf +0 -0
  49. package/TestFiles/Scientific_Publication.pdf +0 -0
  50. package/TestFiles/apryse.bmp +0 -0
  51. package/TestFiles/apryse.cer +0 -0
  52. package/TestFiles/apryse.pfx +0 -0
  53. package/TestFiles/autotag_input.pdf +0 -0
  54. package/TestFiles/find-replace-test.pdf +0 -0
  55. package/TestFiles/find-replace-test_(en_to_fr).xlf +88 -0
  56. package/TestFiles/formfields-scanned-withfields.pdf +0 -0
  57. package/{samples/TestFiles → TestFiles}/simple-excel_2007.xlsx +0 -0
  58. package/{samples/TestFiles → TestFiles}/waiver_withApprovalField.pdf +0 -0
  59. package/{samples/TestFiles → TestFiles}/waiver_withApprovalField_certified.pdf +51 -54
  60. package/{samples/TestFiles → TestFiles}/waiver_withApprovalField_certified_approved.pdf +59 -60
  61. package/{samples/TextExtractTest → TextExtractTest}/TextExtractTest.js +1 -1
  62. package/{samples/TextSearchTest → TextSearchTest}/TextSearchTest.js +2 -2
  63. package/TransPDFTest/TransPDFTest.js +68 -0
  64. package/{samples/U3DTest → U3DTest}/U3DTest.js +1 -1
  65. package/{samples/UndoRedoTest → UndoRedoTest}/UndoRedoTest.js +1 -1
  66. package/{samples/UnicodeWriteTest → UnicodeWriteTest}/UnicodeWriteTest.js +1 -1
  67. package/{samples/WebViewerConvertTest → WebViewerConvertTest}/WebViewerConvertTest.js +2 -2
  68. package/legal.txt +632 -0
  69. package/license.pdf +0 -0
  70. package/package.json +8 -6
  71. package/readme.md +32 -7
  72. package/{samples/runall.bat → runall.bat} +12 -12
  73. package/scripts/install.js +68 -0
  74. package/samples/TestFiles/GlobalSignRootForTST.cer +0 -0
  75. package/samples/TestFiles/Output/addimage.pdf +0 -0
  76. package/samples/TestFiles/pdftron.bmp +0 -0
  77. package/samples/TestFiles/pdftron.cer +0 -0
  78. package/samples/TestFiles/pdftron.pfx +0 -0
  79. /package/{samples/TestFiles → TestFiles}/BusinessCardTemplate.pdf +0 -0
  80. /package/{samples/TestFiles → TestFiles}/Fishermen.docx +0 -0
  81. /package/{samples/TestFiles → TestFiles}/Font_licenses.txt +0 -0
  82. /package/{samples/TestFiles → TestFiles}/License.txt +0 -0
  83. /package/{samples/TestFiles → TestFiles}/Misc-Fixed.pfa +0 -0
  84. /package/{samples/TestFiles → TestFiles}/NotoSans_with_hindi.ttf +0 -0
  85. /package/{samples/TestFiles → TestFiles}/Output/empty +0 -0
  86. /package/{samples/TestFiles → TestFiles}/SHA-2 Root USERTrust RSA CA Sectigo timestamping.crt +0 -0
  87. /package/{samples/TestFiles → TestFiles}/SYH_Letter.docx +0 -0
  88. /package/{samples/TestFiles → TestFiles}/TigerText.pdf +0 -0
  89. /package/{samples/TestFiles → TestFiles}/US061222892-a.pdf +0 -0
  90. /package/{samples/TestFiles → TestFiles}/butterfly.png +0 -0
  91. /package/{samples/TestFiles → TestFiles}/credit card numbers.pdf +0 -0
  92. /package/{samples/TestFiles → TestFiles}/dice.jpg +0 -0
  93. /package/{samples/TestFiles → TestFiles}/dice.u3d +0 -0
  94. /package/{samples/TestFiles → TestFiles}/doc_to_sign.pdf +0 -0
  95. /package/{samples/TestFiles → TestFiles}/factsheet_Arabic.docx +0 -0
  96. /package/{samples/TestFiles → TestFiles}/financial.pdf +0 -0
  97. /package/{samples/TestFiles → TestFiles}/fish.pdf +0 -0
  98. /package/{samples/TestFiles → TestFiles}/font.ttf +0 -0
  99. /package/{samples/TestFiles → TestFiles}/form1.pdf +0 -0
  100. /package/{samples/TestFiles → TestFiles}/form1_annots.xfdf +0 -0
  101. /package/{samples/TestFiles → TestFiles}/form1_data.fdf +0 -0
  102. /package/{samples/TestFiles → TestFiles}/form1_data.xfdf +0 -0
  103. /package/{samples/TestFiles → TestFiles}/formfields-scanned.pdf +0 -0
  104. /package/{samples/TestFiles → TestFiles}/formfields.pdf +0 -0
  105. /package/{samples/TestFiles → TestFiles}/grayscale.tif +0 -0
  106. /package/{samples/TestFiles → TestFiles}/hindi_sample_utf16le.txt +0 -0
  107. /package/{samples/TestFiles → TestFiles}/imagemask.dat +0 -0
  108. /package/{samples/TestFiles → TestFiles}/logo_red.png +0 -0
  109. /package/{samples/TestFiles → TestFiles}/lorem_ipsum.pdf +0 -0
  110. /package/{samples/TestFiles → TestFiles}/multipage.tif +0 -0
  111. /package/{samples/TestFiles → TestFiles}/my_stream.txt +0 -0
  112. /package/{samples/TestFiles → TestFiles}/newsletter.pdf +0 -0
  113. /package/{samples/TestFiles → TestFiles}/newsletter.xod +0 -0
  114. /package/{samples/TestFiles → TestFiles}/numbered.pdf +0 -0
  115. /package/{samples/TestFiles → TestFiles}/op_blend_test.pdf +0 -0
  116. /package/{samples/TestFiles → TestFiles}/palm.jp2 +0 -0
  117. /package/{samples/TestFiles → TestFiles}/paragraphs_and_tables.pdf +0 -0
  118. /package/{samples/TestFiles → TestFiles}/pdfnet.gif +0 -0
  119. /package/{samples/TestFiles → TestFiles}/pdftron_smart_substitution.plugin +0 -0
  120. /package/{samples/TestFiles → TestFiles}/peppers.jpg +0 -0
  121. /package/{samples/TestFiles → TestFiles}/signature.jpg +0 -0
  122. /package/{samples/TestFiles → TestFiles}/simple-emf.emf +0 -0
  123. /package/{samples/TestFiles → TestFiles}/simple-outlook.msg +0 -0
  124. /package/{samples/TestFiles → TestFiles}/simple-powerpoint_2007.pptx +0 -0
  125. /package/{samples/TestFiles → TestFiles}/simple-publisher.pub +0 -0
  126. /package/{samples/TestFiles → TestFiles}/simple-rtf.rtf +0 -0
  127. /package/{samples/TestFiles → TestFiles}/simple-text.txt +0 -0
  128. /package/{samples/TestFiles → TestFiles}/simple-visio.vsd +0 -0
  129. /package/{samples/TestFiles → TestFiles}/simple-webpage.html +0 -0
  130. /package/{samples/TestFiles → TestFiles}/simple-webpage.mht +0 -0
  131. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/colorschememapping.xml +0 -0
  132. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/filelist.xml +0 -0
  133. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image001.gif +0 -0
  134. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image002.png +0 -0
  135. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image003.jpg +0 -0
  136. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image004.emz +0 -0
  137. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image005.gif +0 -0
  138. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image006.png +0 -0
  139. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/image007.gif +0 -0
  140. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/oledata.mso +0 -0
  141. /package/{samples/TestFiles → TestFiles}/simple-webpage_files/themedata.thmx +0 -0
  142. /package/{samples/TestFiles → TestFiles}/simple-word_2007.docx +0 -0
  143. /package/{samples/TestFiles → TestFiles}/simple-xps.xps +0 -0
  144. /package/{samples/TestFiles → TestFiles}/table.pdf +0 -0
  145. /package/{samples/TestFiles → TestFiles}/tagged.pdf +0 -0
  146. /package/{samples/TestFiles → TestFiles}/the_rime_of_the_ancient_mariner.docx +0 -0
  147. /package/{samples/TestFiles → TestFiles}/tiger.pdf +0 -0
  148. /package/{samples/TestFiles → TestFiles}/tiger.svg +0 -0
  149. /package/{samples/TestFiles → TestFiles}/waiver.pdf +0 -0
  150. /package/{samples/runall.sh → runall.sh} +0 -0
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -98,11 +98,11 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
98
98
  if (obj && !(await obj.isFree()) && await obj.isStream()) {
99
99
  // Process only images
100
100
  var itr = await obj.find('Type');
101
- if (!(await itr.hasNext()) || await (await itr.value()).getName() !== 'XObject')
101
+ if (!(await itr.hasCurrent()) || await (await itr.value()).getName() !== 'XObject')
102
102
  continue;
103
103
 
104
104
  itr = await obj.find('Subtype');
105
- if (!(await itr.hasNext()) || await (await itr.value()).getName() !== 'Image')
105
+ if (!(await itr.hasCurrent()) || await (await itr.value()).getName() !== 'Image')
106
106
  continue;
107
107
  const image = await PDFNet.Image.createFromObj(obj);
108
108
  console.log('--> Image: ' + ++image_counter);
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -9,7 +9,7 @@
9
9
  // to be a generic PDF optimization tool.
10
10
  //
11
11
  // You can download the entire document using the following link:
12
- // http://www.pdftron.com/net/samplecode/data/US061222892.pdf
12
+ // https://downloads.apryse.com/files/US061222892.pdf
13
13
  //
14
14
 
15
15
  const { PDFNet } = require('@pdftron/pdfnet-node');
@@ -31,7 +31,7 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
31
31
  if (obj && !(await obj.isFree()) && await obj.isStream()) {
32
32
  // Process only images
33
33
  let itr = await obj.find('Subtype');
34
- if (!(await itr.hasNext()) || await (await itr.value()).getName() !== 'Image')
34
+ if (!(await itr.hasCurrent()) || await (await itr.value()).getName() !== 'Image')
35
35
  continue;
36
36
  const input_image = await PDFNet.Image.createFromObj(obj);
37
37
  // Process only gray-scale images
@@ -42,7 +42,7 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
42
42
 
43
43
  // Skip images that are already compressed using JBIG2
44
44
  itr = await obj.find('Filter');
45
- if (await itr.hasNext()) {
45
+ if (await itr.hasCurrent()) {
46
46
  const value = await itr.value();
47
47
  if (await value.isName() && await value.getName() === 'JBIG2Decode') continue;
48
48
  }
@@ -61,13 +61,13 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
61
61
 
62
62
  const new_img_obj = await new_image.getSDFObj();
63
63
  itr = await obj.find('Decode');
64
- if (await itr.hasNext())
64
+ if (await itr.hasCurrent())
65
65
  new_img_obj.put('Decode', await itr.value());
66
66
  itr = await obj.find('ImageMask');
67
- if (await itr.hasNext())
67
+ if (await itr.hasCurrent())
68
68
  new_img_obj.put('ImageMask', await itr.value());
69
69
  itr = await obj.find('Mask');
70
- if (await itr.hasNext())
70
+ if (await itr.hasCurrent())
71
71
  new_img_obj.put('Mask', await itr.value());
72
72
 
73
73
  await cos_doc.swap(i, await new_img_obj.getObjNum());
@@ -1,10 +1,10 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2021 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
6
- //"Enter your key here. If you don't have it, please go to https://www.pdftron.com/pws/get-key to obtain a demo license or https://www.pdftron.com/form/contact-sales to obtain a production key.
7
- const LicenseKey = 'demo:test@pdftron.com:7876ae6d0200000000f50582ebf9cec1bc854b93820a9ad99f18517ed2';
6
+ //"Enter your key here. If you don't have it, please go to https://www.apryse.com/pws/get-key to obtain a demo license or https://www.apryse.com/form/contact-sales to obtain a production key.
7
+ const LicenseKey = 'YOUR_PDFTRON_LICENSE_KEY';
8
8
  if(LicenseKey == 'YOUR_PDFTRON_LICENSE_KEY'){
9
9
  throw ('Please enter your license key by replacing \'YOUR_PDFTRON_LICENSE_KEY\' that is assigned to the LicenseKey variable in Samples/LicenseKey/LicenseKey.js. If you do not have a license key, please go to https://www.pdftron.com/pws/get-key to obtain a demo license or https://www.pdftron.com/form/contact-sales to obtain a production key.');
10
10
  }
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -17,14 +17,14 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
17
17
  const main = async () => {
18
18
  try {
19
19
 
20
- PDFNet.addResourceSearchPath('../lib/');
20
+ PDFNet.addResourceSearchPath('../../lib/');
21
21
 
22
22
  const useIRIS = await PDFNet.OCRModule.isIRISModuleAvailable();
23
23
  if (!(await PDFNet.OCRModule.isModuleAvailable())) {
24
- console.log('\nUnable to run OCRTest: PDFTron SDK OCR module not available.');
24
+ console.log('\nUnable to run OCRTest: Apryse SDK OCR module not available.');
25
25
  console.log('---------------------------------------------------------------');
26
26
  console.log('The OCR module is an optional add-on, available for download');
27
- console.log('at http://www.pdftron.com/. If you have already downloaded this');
27
+ console.log('at http://www.apryse.com/. If you have already downloaded this');
28
28
  console.log('module, ensure that the SDK is able to find the required files');
29
29
  console.log('using the PDFNet.addResourceSearchPath() function.\n');
30
30
 
@@ -69,8 +69,9 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
69
69
  // B) Setup options with multiple target languages, English will always be considered as secondary language
70
70
  const opts = new PDFNet.OCRModule.OCROptions();
71
71
  if(useIRIS) opts.setOCREngine('iris');
72
- opts.addLang('rus');
73
72
  opts.addLang('deu');
73
+ opts.addLang('fra');
74
+ opts.addLang('eng');
74
75
 
75
76
  // C) Run OCR on the .jpg with options
76
77
  await PDFNet.OCRModule.imageToPDF(doc, input_path + 'multi_lang.jpg', opts);
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -9,7 +9,7 @@
9
9
  // with content supplied via json
10
10
  //
11
11
  // For a detailed specification of the template format and supported features,
12
- // see: https://www.pdftron.com/documentation/core/guides/generate-via-template/data-model/
12
+ // see: https://docs.apryse.com/documentation/core/guides/generate-via-template/data-model/
13
13
  //
14
14
  // This conversion is performed entirely within the PDFNet and has *no*
15
15
  // external or system dependencies -- Conversion results will be
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -13,8 +13,8 @@
13
13
  // 2. The optional Structured Output add-on module is used to convert PDF documents to
14
14
  // HTML documents with text flowing across the browser window.
15
15
  //
16
- // The PDFTron SDK Structured Output module can be downloaded from
17
- // https://www.pdftron.com/documentation/core/info/modules/
16
+ // The Apryse SDK Structured Output module can be downloaded from
17
+ // https://docs.apryse.com/documentation/core/info/modules/
18
18
  //
19
19
  // Please contact us if you have any questions.
20
20
  //---------------------------------------------------------------------------------------
@@ -50,13 +50,13 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
50
50
 
51
51
  //////////////////////////////////////////////////////////////////////////
52
52
 
53
- await PDFNet.addResourceSearchPath('../lib/');
53
+ await PDFNet.addResourceSearchPath('../../lib/');
54
54
 
55
55
  if (!await PDFNet.StructuredOutputModule.isModuleAvailable()) {
56
- console.log('\nUnable to run part of the sample: PDFTron SDK Structured Output module not available.');
56
+ console.log('\nUnable to run part of the sample: Apryse SDK Structured Output module not available.');
57
57
  console.log('---------------------------------------------------------------');
58
58
  console.log('The Structured Output module is an optional add-on, available for download');
59
- console.log('at https://www.pdftron.com/documentation/core/info/modules/. If you have already');
59
+ console.log('at https://docs.apryse.com/documentation/core/info/modules/. If you have already');
60
60
  console.log('downloaded this module, ensure that the SDK is able to find the required files');
61
61
  console.log('using the PDFNet::AddResourceSearchPath() function.\n');
62
62
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -10,8 +10,8 @@
10
10
  // The Structured Output module is an optional PDFNet Add-on that can be used to convert PDF
11
11
  // and other documents into Word, Excel, PowerPoint and HTML format.
12
12
  //
13
- // The PDFTron SDK Structured Output module can be downloaded from
14
- // https://www.pdftron.com/documentation/core/info/modules/
13
+ // The Apryse SDK Structured Output module can be downloaded from
14
+ // https://docs.apryse.com/documentation/core/info/modules/
15
15
  //
16
16
  // Please contact us if you have any questions.
17
17
  //---------------------------------------------------------------------------------------
@@ -31,13 +31,13 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
31
31
 
32
32
  //////////////////////////////////////////////////////////////////////////
33
33
 
34
- await PDFNet.addResourceSearchPath('../lib/');
34
+ await PDFNet.addResourceSearchPath('../../lib/');
35
35
 
36
36
  if (!await PDFNet.StructuredOutputModule.isModuleAvailable()) {
37
- console.log('\nUnable to run the sample: PDFTron SDK Structured Output module not available.');
37
+ console.log('\nUnable to run the sample: Apryse SDK Structured Output module not available.');
38
38
  console.log('---------------------------------------------------------------');
39
39
  console.log('The Structured Output module is an optional add-on, available for download');
40
- console.log('at https://www.pdftron.com/documentation/core/info/modules/. If you have already');
40
+ console.log('at https://docs.apryse.com/documentation/core/info/modules/. If you have already');
41
41
  console.log('downloaded this module, ensure that the SDK is able to find the required files');
42
42
  console.log('using the PDFNet::AddResourceSearchPath() function.\n');
43
43
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -0,0 +1,88 @@
1
+ //---------------------------------------------------------------------------------------
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
+ // Consult legal.txt regarding legal and license information.
4
+ //---------------------------------------------------------------------------------------
5
+
6
+ const { PDFNet } = require('@pdftron/pdfnet-node');
7
+ const PDFTronLicense = require('../LicenseKey/LicenseKey');
8
+
9
+ ((exports) => {
10
+ 'use strict';
11
+
12
+ exports.runPDFUATest = () => {
13
+
14
+ //---------------------------------------------------------------------------------------
15
+ // The following sample illustrates how to make sure a file meets the PDF/UA standard, using the PDFUAConformance class object.
16
+ // Note: this feature is currently experimental and subject to change
17
+ //
18
+ // DataExtractionModule is required (Mac users can use StructuredOutputModule instead)
19
+ // https://docs.apryse.com/documentation/core/info/modules/#data-extraction-module
20
+ // https://docs.apryse.com/documentation/core/info/modules/#structured-output-module (Mac)
21
+ //---------------------------------------------------------------------------------------
22
+ const main = async () => {
23
+
24
+ // Relative path to the folder containing test files.
25
+ const input_path = '../TestFiles/';
26
+ const output_path = '../TestFiles/Output/';
27
+
28
+ // DataExtraction library location, replace if desired, should point to a folder that includes the contents of <DataExtractionModuleRoot>/Lib.
29
+ // If using default, unzip the DataExtraction zip to the parent folder of Samples, and merge with existing "Lib" folder
30
+ const extraction_module_path = '../../lib/';
31
+
32
+ const input_file1 = input_path + 'autotag_input.pdf';
33
+ const input_file2 = input_path + 'table.pdf';
34
+ const output_file1 = output_path + 'autotag_pdfua.pdf';
35
+ const output_file2 = output_path + 'table_pdfua_linearized.pdf';
36
+
37
+ try {
38
+ //-----------------------------------------------------------
39
+ // Example: PDF/UA Conversion
40
+ //-----------------------------------------------------------
41
+ console.log('AutoConverting...');
42
+
43
+ await PDFNet.addResourceSearchPath(extraction_module_path);
44
+ if (!await PDFNet.DataExtractionModule.isModuleAvailable(PDFNet.DataExtractionModule.DataExtractionEngine.e_DocStructure)) {
45
+ console.log('');
46
+ console.log('Unable to run PDFUATest: Apryse SDK Data Extraction module not available.');
47
+ console.log('---------------------------------------------------------------');
48
+ console.log('The Data Extraction module is an optional add-on, available for download');
49
+ console.log('at https://apryse.com/. If you have already downloaded this');
50
+ console.log('module, ensure that the SDK is able to find the required files');
51
+ console.log('using the PDFNet.addResourceSearchPath() function.');
52
+ console.log('');
53
+ return;
54
+ }
55
+
56
+ const pdf_ua = await PDFNet.PDFUAConformance.create();
57
+
58
+ console.log('Simple Conversion...');
59
+ {
60
+ // Perform conversion using default options
61
+ await pdf_ua.autoConvert(input_file1, output_file1);
62
+ }
63
+
64
+ console.log('Converting With Options...');
65
+ {
66
+ const pdf_ua_opts = await PDFNet.PDFUAConformance.createPDFUAOptions();
67
+ pdf_ua_opts.setSaveLinearized(true); // Linearize when saving output
68
+ // Note: if file is password protected, you can use pdf_ua_opts.setPassword()
69
+
70
+ // Perform conversion using the options we specify
71
+ await pdf_ua.autoConvert(input_file2, output_file2, pdf_ua_opts);
72
+ }
73
+
74
+ } catch (err) {
75
+ console.log(err);
76
+ }
77
+
78
+ console.log('PDFUAConformance test completed.');
79
+ }
80
+
81
+ PDFNet.runWithCleanup(main, PDFTronLicense.Key).catch(function (error) {
82
+ console.log('Error: ' + JSON.stringify(error));
83
+ }).then(function () { return PDFNet.shutdown(); });
84
+ };
85
+ exports.runPDFUATest();
86
+ })(exports);
87
+ // eslint-disable-next-line spaced-comment
88
+ //# sourceURL=PDFUATest.js
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
@@ -30,17 +30,16 @@ const PDFTronLicense = require('../LicenseKey/LicenseKey');
30
30
  // Now we will change PDF document information properties using SDF API
31
31
 
32
32
  // Get the Info dictionary.
33
-
34
33
  let itr = await trailer.find('Info');
35
34
  let info;
36
- if (await itr.hasNext()) {
35
+ if (await itr.hasCurrent()) {
37
36
  info = await itr.value();
38
37
  // Modify 'Producer' entry.
39
38
  info.putString('Producer', 'PDFTron PDFNet');
40
39
 
41
40
  // read title entry if it is present
42
41
  itr = await info.find('Author');
43
- if (await itr.hasNext()) {
42
+ if (await itr.hasCurrent()) {
44
43
  const itrval = await itr.value();
45
44
  const oldstr = await itrval.getAsPDFText();
46
45
  info.putText('Author', oldstr + ' - Modified');
@@ -1,5 +1,5 @@
1
1
  //---------------------------------------------------------------------------------------
2
- // Copyright (c) 2001-2023 by PDFTron Systems Inc. All Rights Reserved.
2
+ // Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3
3
  // Consult legal.txt regarding legal and license information.
4
4
  //---------------------------------------------------------------------------------------
5
5
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
3
+ <file original="../../TestFiles/find-replace-test.pdf" source-language="en" datatype="x-pdf" product-name="InfixXLIFF">
4
+ <header>
5
+ <tool tool-id="InfixXLIFF" tool-name="InfixXLIFF" tool-company="Apryse"/>
6
+ </header>
7
+ <body>
8
+ <!--
9
+ <cstyle id="1-0" name="0" size="14.0" rise="0.0" scale="100"
10
+ colour="ffffff" colid="0" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal"
11
+ underline="0" strike="0" link=""/>
12
+ -->
13
+ <trans-unit id='p1-1' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
14
+ <source>2 </source>
15
+ <target>2 </target>
16
+ </trans-unit>
17
+
18
+ <!--
19
+ <cstyle id="2-0" name="0" size="12.0" rise="0.0" scale="100"
20
+ colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal"
21
+ underline="0" strike="0" link=""/>
22
+ -->
23
+ <trans-unit id='p1-2' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
24
+ <source>You plan to embed PDF functionality into an application. But before you dive into the project, you must decide: do you go with a more expensive commercial PDF SDK — or a lower-cost alternative such as an open-source library or an open-source wrapper?</source>
25
+ <target>Vous envisagez d&#8217;int&#233;grer des fonctionnalit&#233;s PDF dans une application. Mais avant de vous lancer dans le projet, vous devez d&#233;cider : optez-vous pour un SDK PDF commercial plus co&#251;teux - ou une alternative moins co&#251;teuse telle qu&#8217;une biblioth&#232;que open source ou un wrapper open source ?</target>
26
+ </trans-unit>
27
+
28
+ <!--
29
+ <cstyle id="3-0" name="0" size="12.0" rise="0.0" scale="100"
30
+ colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal"
31
+ underline="0" strike="0" link=""/>
32
+ -->
33
+ <trans-unit id='p1-3' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
34
+ <source>There are non-trivial costs to switching later. Developers have to re-learn the new library, re-adjust the backend, customize the UI to match what users are accustomed to, as well as migrate documents, form data, annotations, and more. </source>
35
+ <target>Il y a des co&#251;ts non n&#233;gligeables &#224; changer plus tard. Les d&#233;veloppeurs doivent r&#233;apprendre la nouvelle biblioth&#232;que, r&#233;ajuster le backend, personnaliser l&#8217;interface utilisateur pour qu&#8217;elle corresponde &#224; ce &#224; quoi les utilisateurs sont habitu&#233;s, ainsi que migrer des documents, des donn&#233;es de formulaire, des annotations, etc. </target>
36
+ </trans-unit>
37
+
38
+ <!--
39
+ <cstyle id="4-0" name="0" size="12.0" rise="0.0" scale="100"
40
+ colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal"
41
+ underline="0" strike="0" link=""/>
42
+
43
+ <cstyle id="4-1" name="1" size="12.0" rise="0.0" scale="100"
44
+ colour="1d446c" colid="1" israwchars="1" fname="Lato" fweight="bold" fstyle="normal"
45
+ underline="1" strike="0" link=""/>
46
+ -->
47
+ <trans-unit id='p1-4' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
48
+ <source>According to <g id='4-1' ctype='x-cstyle'>market research</g> conducted by Stax Inc., the average Net Promoter Score (NPS) for the top five PDF SDK vendors is 35%. And 70% of customers express interest in switching despite the high costs.</source>
49
+ <target>D&#8217;apr&#232;s une <g id="4-1" ctype="x-cstyle">&#233;tude de march&#233;</g> men&#233;e par Stax Inc., le Net Promoter Score (NPS) moyen des cinq principaux fournisseurs de SDK PDF est de 35 %. Et 70 % des clients expriment leur int&#233;r&#234;t &#224; changer de client malgr&#233; les co&#251;ts &#233;lev&#233;s.</target>
50
+ </trans-unit>
51
+
52
+ <!--
53
+ <cstyle id="5-0" name="0" size="12.0" rise="0.0" scale="100"
54
+ colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal"
55
+ underline="0" strike="0" link=""/>
56
+ -->
57
+ <trans-unit id='p1-5' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
58
+ <source>This dissatisfaction implies that picking the right PDF SDK is a lot harder than it seems. And to help you avoid the same mistakes as past implementations, we’ve written this article.</source>
59
+ <target>Cette insatisfaction implique que choisir le bon SDK PDF est beaucoup plus difficile<g id="5-1" ctype="x-cstyle">qu&#8217;il </g>n&#8217;y para&#238;t. Et pour vous aider &#224; &#233;viter les m&#234;mes erreurs que les impl&#233;mentations pr&#233;c&#233;dentes, nous avons r&#233;dig&#233; cet article<g id="5-1" ctype="x-cstyle">e.</g></target>
60
+ </trans-unit>
61
+
62
+ <!--
63
+ <cstyle id="6-0" name="0" size="12.0" rise="0.0" scale="100"
64
+ colour="1d446c" colid="1" fname="Lato" fweight="normal" fstyle="normal"
65
+ underline="0" strike="0" link=""/>
66
+
67
+ <cstyle id="6-1" name="1" size="12.0" rise="0.0" scale="100"
68
+ colour="1d446c" colid="1" israwchars="1" fname="Lato" fweight="bold" fstyle="normal"
69
+ underline="1" strike="0" link=""/>
70
+ -->
71
+ <trans-unit id='p1-6' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
72
+ <source>(We also<g id='6-1' ctype='x-cstyle'> </g><g id='6-1' ctype='x-cstyle'>recently surveyed 57</g> unique organizations that switched from PDF.js to a commercial SDK. Read our<g id='6-1' ctype='x-cstyle'> </g><g id='6-1' ctype='x-cstyle'>comprehensive guide to PDF.js</g> to learn more.) </source>
73
+ <target>(Nous avons &#233;galement<g id="6-1" ctype="x-cstyle"> </g><g id="6-1" ctype="x-cstyle">r&#233;cemment interrog&#233; 57</g> organisations uniques qui sont pass&#233;es d&#8217;un PDF.js &#224; un SDK commercial. Lisez notre<g id="6-1" ctype="x-cstyle"> </g><g id="6-1" ctype="x-cstyle">guide complet sur les PDF.js</g> pour en savoir plus.) </target>
74
+ </trans-unit>
75
+
76
+ <!--
77
+ <cstyle id="7-0" name="0" size="30.0" rise="0.0" scale="100"
78
+ colour="0206a8" colid="2" israwchars="1" fname="LatoBlack" fweight="normal" fstyle="normal"
79
+ underline="0" strike="0" link=""/>
80
+ -->
81
+ <trans-unit id='p1-7' approved="yes" translate="yes" xml:space="default" datatype="plaintext">
82
+ <source>Overview </source>
83
+ <target>Aper&#231;u </target>
84
+ </trans-unit>
85
+
86
+ </body>
87
+ </file>
88
+ </xliff>