@@ -240,9 +240,9 @@ <h2>Aspose.PDF for JavaScript via C++</h2>
240240
241241 var onloadAsposePDFforJS = function ( ) {
242242 var Module_onRuntimeInitialized = Module [ 'onRuntimeInitialized' ] ;
243- Module [ 'onRuntimeInitialized' ] = function ( ) {
243+ Module [ 'onRuntimeInitialized' ] = async function ( ) {
244244 console . log ( 'AsposePDFforJS has loaded' ) ;
245- Module_onRuntimeInitialized ( ) ;
245+ await Module_onRuntimeInitialized ( ) ;
246246 //Key PKCS7 for test, converted to Base64, with "Pa$$w0rd2023" password
247247 const test_pfx = "data:application/octet-stream;base64,MIIEcQIBAzCCBDcGCSqGSIb3DQEHAaCCBCgEggQkMIIEIDCCAj8GCSqGSIb3DQEHBqCCAjAwggIsAgEAMIICJQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQI4tjRHb+OMLsCAggAgIIB+OAPdXDmh+6qTyjHkumo2euCw4EvRZ8qSha/AAWYespZs8mA9dInLWM33HeDqktHEcZoPf/CCWqQopRA6RPFAYIn9ioR8s3Phd3LmoMPb52SKJMvWjRGRppLyo4gCNZfv37duV8+mKTSyDW1wrtHsZnvLlUHmy8+OcG8zsAAX6YwHTMkafllpRKkB0kmO1boSvHEp5IPsU8u50VpF21OXYNV7D5c4W2O1GrV0a5HD6OyObHJjj+ufPF7nh+qEuPN/b8hm14y+sZPoVSRvwtH+O8VVDxnJWX+y+jGhChLxiYUYRnhBMW6X+cZW9bcpXZIkFdQdPWA1/opOdTguHlXQF1R+JNnUUOtopwX103undyPGl5JGXvLrr6iH2aO1GY1p2Asd1exaQdfwFQynCxlZrKaCc2JBs5Jem5/wWN6rfq+n15tsYvk2gTP+U/icla8wp1NsqqTGOe0dAJNH3kDOwxKVb5gU+fOYbFWI/6iZ3Tdl41W66rE4Gxj937oYJE1KUK3SlxJtL0uK5c3ZN9yMJYdpc9k2HQ1VOssuUKrmpuOcyJhpF4XosHxMyQxPFFVA/TNggb3Dv3cr2Qei+JqF4n4KAqYCY5u0O+y6+R9Ig0L5zCL/n9cWyPyYqqvEH4ICxqUoH05qCJIMdiNlc5w1PYUXKaSRSzK0TCCAdkGCSqGSIb3DQEHAaCCAcoEggHGMIIBwjCCAb4GCyqGSIb3DQEMCgECoIIBhjCCAYIwHAYKKoZIhvcNAQwBAzAOBAgWFTAixF9bPAICCAAEggFgwC4A+R9X2xdbdfz0IKw2f7pe3iJdgLKJPYiUDV2cGfQnM4UuQKu9qIZ3lAzBtQcF09Wy6pwwU63nVHiGZ6y9PunZZ3tIM24I0Ii1Q5PrphvT4z7yXPqI+sv53AhzwpTJ2XHJQRf53PX7V8ujv3k8lfBQ6gYxfFMkrTdZlfiWeoWZSlFMKUzmaRfBFVit5BRUNEgZrySfZxyxULpo+KzQ/b5K0Z69x6Gvj/j21gEkGTEDWhmjECjsPCP+sWDMyB1xOxHimJgmLtSHc7hpdE/xuRBVELxhlFI1lYj3fbWbnMNzeLG+OBaoktbpr9kbsWRM568vLxdV7XZYkaoGEd+SEUTR+Yxyak/DHspkO/o4apjOh24U6GCqfqPl4ucxTMvOiYpobrxPub/sqQPXB0NEsqNPjcYdsT1y1YkYMxO0b1heh8TWat6SYk1dLi1wdV0iGf8LTImqzzUobZNBfrybjzElMCMGCSqGSIb3DQEJFTEWBBRBGCVJ5N72ukaNrJUetg4Rp0/41DAxMCEwCQYFKw4DAhoFAAQU8VT/8VxDX7Sx3p05TO3BNne5YXYECJhmeDAQpwBNAgIIAA==" ;
248248 AsposePdfPrepareBase64 ( test_pfx , "test.pfx" ) ;
@@ -251,7 +251,12 @@ <h2>Aspose.PDF for JavaScript via C++</h2>
251251 AsposePdfPrepareBase64 ( sign_png , "sign.png" ) ;
252252 //Get info about Product
253253 const json = AsposePdfAbout ( ) ;
254- if ( json . errorCode == 0 ) document . getElementById ( 'output' ) . textContent = json . producer ;
254+ if ( json . errorCode == 0 ) document . getElementById ( 'output' ) . textContent = "Product : " + json . product
255+ + "\nFamily : " + json . family
256+ + "\nVersion : " + json . version
257+ + "\nRelease date : " + json . releasedate
258+ + "\nProducer : " + json . producer
259+ + "\nIs licensed : " + json . islicensed ;
255260 else document . getElementById ( 'output' ) . textContent = json . errorText ;
256261 }
257262 }
@@ -424,13 +429,28 @@ <h2>Aspose.PDF for JavaScript via C++</h2>
424429 const file_reader = new FileReader ( ) ;
425430 file_reader . onload = ( event ) => {
426431 const json = AsposePdfGetInfo ( event . target . result , e . target . files [ 0 ] . name ) ;
427- if ( json . errorCode == 0 ) document . getElementById ( 'output' ) . textContent = "Title: " + json . title + "\nCreator: " + json . creator + "\nAuthor: " + json . author
428- + "\nSubject: " + json . subject + "\nKeywords: " + json . keywords
429- + "\nCreation Date: " + json . creation + "\nModify Date: " + json . mod
430- + "\nPDF format: " + json . format + "\nPDF version: " + json . version
431- + "\nPDF is PDF/A: " + json . ispdfa + "\nPDF is PDF/UA: " + json . ispdfua
432- + "\nPDF permission: " + json . permission + "\nPDF page size: " + json . size
433- + "\nPage count: " + json . pagecount ;
432+ if ( json . errorCode == 0 ) document . getElementById ( 'output' ) . textContent = "Title : " + json . title
433+ + "\nCreator : " + json . creator
434+ + "\nAuthor : " + json . author
435+ + "\nSubject : " + json . subject
436+ + "\nKeywords : " + json . keywords
437+ + "\nCreation Date : " + json . creation
438+ + "\nModify Date : " + json . mod
439+ + "\nPDF format : " + json . format
440+ + "\nPDF version : " + json . version
441+ + "\nPDF is PDF/A : " + json . ispdfa
442+ + "\nPDF is PDF/UA : " + json . ispdfua
443+ + "\nPDF is linearized : " + json . islinearized
444+ + "\nPDF is encrypted : " + json . isencrypted
445+ + "\nPDF permission : " + json . permission
446+ + "\nPDF page size : " + json . size
447+ + "\nPage count : " + json . pagecount
448+ + "\nAnnotation count : " + json . annotationcount
449+ + "\nBookmark count : " + json . bookmarkcount
450+ + "\nAttachment count : " + json . attachmentcount
451+ + "\nMetadata count : " + json . metadatacount
452+ + "\nJavaScript count : " + json . javascriptcount
453+ + "\nImage count : " + json . imagecount ;
434454 else document . getElementById ( 'output' ) . textContent = json . errorText ;
435455 }
436456 file_reader . readAsArrayBuffer ( e . target . files [ 0 ] ) ;
0 commit comments