pdf-lib
pdf-lib copied to clipboard
Cannot print/save as pdf with pdf-lib 1.17.1
What were you trying to do?
I can generate my pdf (which includes forms, images, embedded fonts and metadata), but it seems to be impossible to save/print it afterwards because of the following errors
How did you attempt to do it?
Rollbacking to version 1.16.0 seems to fix the issue
What actually happened?
I guess that some metadata are not correctly generated
What did you expect to happen?
being able to print/save with versions above 1.16.0
How can we reproduce the issue?
Assigning metadata with:
function generatePDFMetaData(projectInfo: ProjectInfo): ICreatePDFOptions['metaValues'] {
return {
title: projectInfo.title || 'New title',
author: `Author`,
creator: `Creator`,
producer: `Producer`,
creationDate: projectInfo.createdAt,
modificationDate: projectInfo.modifiedAt,
keywords: [],
subject: 'Subject',
}
}
for (const [key, value] of Object.entries(generatePDFMetaData(projectInfo)) {
pdf[`set${upperFirst(key)}`](value)
}
Version
1.17.1
What environment are you running pdf-lib in?
Browser
Checklist
- [X] My report includes a Short, Self Contained, Correct (Compilable) Example.
- [X] I have attached all PDFs, images, and other files needed to run my SSCCE.
Additional Notes
No response
Have you solve it @oktapodia ?
Have you solve it @oktapodia ?
Did rollback to 1.16.0 to make it work :/
facing the same issue here
Do you have a minimal working reproduction code? The OP example is not runnable
I just deleted everything and im currently trying another library better suited for the project I’am doing. Sorry 🙁
Get Outlook for iOShttps://aka.ms/o0ukef
From: Luiz Américo @.> Sent: Thursday, December 7, 2023 5:40:53 PM To: Hopding/pdf-lib @.> Cc: Wael Farhat @.>; Comment @.> Subject: Re: [Hopding/pdf-lib] Cannot print/save as pdf with pdf-lib 1.17.1 (Issue #1515)
Do you have a minimal working reproduction code? The OP example is not runnable
— Reply to this email directly, view it on GitHubhttps://github.com/Hopding/pdf-lib/issues/1515#issuecomment-1845675140, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APVDMZPEVBUOZWSAF3CNNFLYIHWRLAVCNFSM6AAAAAA34W3BOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBVGY3TKMJUGA. You are receiving this because you commented.Message ID: @.***>