Skip to content

Commit d49ad37

Browse files
committed
Added support PDF/A and PDF/UA #950 #942
1 parent 6feb776 commit d49ad37

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Added support PDF/A and PDF/UA
56
- Update pdfkit to 0.15.1
67
- Fixed bug with how page breaks provoked by cells with rowspan were handled
78
- Fixed find where previous cell started with row span and col span combination

src/Printer.js

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class PdfPrinter {
4747
this.resolveUrls(docDefinition).then(() => {
4848
try {
4949
docDefinition.version = docDefinition.version || '1.3';
50+
docDefinition.subset = docDefinition.subset || undefined;
51+
docDefinition.tagged = typeof docDefinition.tagged === 'boolean' ? docDefinition.tagged : false;
52+
docDefinition.displayTitle = typeof docDefinition.displayTitle === 'boolean' ? docDefinition.displayTitle : false;
5053
docDefinition.compress = typeof docDefinition.compress === 'boolean' ? docDefinition.compress : true;
5154
docDefinition.images = docDefinition.images || {};
5255
docDefinition.attachments = docDefinition.attachments || {};
@@ -58,6 +61,9 @@ class PdfPrinter {
5861
let pdfOptions = {
5962
size: [pageSize.width, pageSize.height],
6063
pdfVersion: docDefinition.version,
64+
subset: docDefinition.subset,
65+
tagged: docDefinition.tagged,
66+
displayTitle: docDefinition.displayTitle,
6167
compress: docDefinition.compress,
6268
userPassword: docDefinition.userPassword,
6369
ownerPassword: docDefinition.ownerPassword,

webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ module.exports = {
138138
}
139139
},
140140

141+
{
142+
enforce: 'post',
143+
test: /pdfkit[/\\]js[/\\]pdfkit.es.js$/,
144+
use: {
145+
loader: "transform-loader?brfs"
146+
}
147+
},
141148
{
142149
enforce: 'post',
143150
test: /fontkit[/\\]index.js$/,

0 commit comments

Comments
 (0)