Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mixins/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {
this.appendXML(
`
<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<pdf:Producer>${this.info.Creator}</pdf:Producer>`,
<pdf:Producer>${this.info.Producer}</pdf:Producer>`,
false,
);

Expand Down
17 changes: 17 additions & 0 deletions tests/unit/pdfa1.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ describe('PDF/A-1', () => {
expect(fontDescriptor).toContain('/CIDSet');
});

test('metadata producer matches document info producer', () => {
let options = {
autoFirstPage: false,
pdfVersion: '1.7',
subset: 'PDF/A-1a',
};
let doc = new PDFDocument(options);
doc.info.Producer = 'Unit Test for PDFKit';
const data = logData(doc);
doc.end();
let metadata = Buffer.from(data[27]).toString();

expect(metadata).toContain(
'<pdf:Producer>Unit Test for PDFKit</pdf:Producer>',
);
});

test('CIDSet correctly identifies all glyphs in the subset', () => {
let options = {
autoFirstPage: false,
Expand Down
Loading