@jsreport/pdfjs
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -45,2 +45,8 @@ const PDF = require('../object') | ||
} | ||
if (infoOptions.custom) { | ||
Object.keys(infoOptions.custom).forEach(key => { | ||
infoObject.prop(key, new PDF.String(infoOptions.custom[key])) | ||
}) | ||
} | ||
} |
@@ -43,3 +43,4 @@ function intToHex (i) { | ||
} | ||
return '#' + code | ||
return '#' + intToHex(code) | ||
}) | ||
@@ -46,0 +47,0 @@ |
{ | ||
"name": "@jsreport/pdfjs", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -126,3 +126,8 @@ const { Document, External } = require('../') | ||
producer: 'Foo-producer', | ||
language: 'cz-CZ' | ||
language: 'cz-CZ', | ||
custom: { | ||
serialNumber: 'Foo-123', | ||
'Property With Spaces': 'foo-property-with-spaces', | ||
Property_With_Underscores: 'foo-property-with-underscores' | ||
} | ||
}) | ||
@@ -146,2 +151,5 @@ | ||
info.properties.get('Producer').toString().should.be.eql('(Foo-producer)') | ||
info.properties.get('serialNumber').toString().should.be.eql('(Foo-123)') | ||
info.properties.get('Property With Spaces').toString().should.be.eql('(foo-property-with-spaces)') | ||
info.properties.get('Property_With_Underscores').toString().should.be.eql('(foo-property-with-underscores)') | ||
catalog.properties.get('Lang').toString().should.be.eql('(cz-CZ)') | ||
@@ -681,3 +689,8 @@ }) | ||
producer: 'Foo-producer', | ||
language: 'cz-CZ' | ||
language: 'cz-CZ', | ||
custom: { | ||
serialNumber: 'Foo-123', | ||
'Property With Spaces': 'foo-property-with-spaces', | ||
Property_With_Underscores: 'foo-property-with-underscores' | ||
} | ||
}) | ||
@@ -696,2 +709,5 @@ | ||
info.properties.get('Producer').toString().should.be.eql('(Foo-producer)') | ||
info.properties.get('serialNumber').toString().should.be.eql('(Foo-123)') | ||
info.properties.get('Property With Spaces').toString().should.be.eql('(foo-property-with-spaces)') | ||
info.properties.get('Property_With_Underscores').toString().should.be.eql('(foo-property-with-underscores)') | ||
catalog.properties.get('Lang').toString().should.be.eql('(cz-CZ)') | ||
@@ -698,0 +714,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2686777
6139
2