You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is kind of an idea/question. I spent some time trying to figure out how to accomplish this and couldn't figure it out. But I'm also pretty new to this library, so it might be possible and I'm simply unaware.
But the idea is pretty much in a title. pdf-lib supports 14 Standard Fonts and it'd be great if we could apply a combination of their character sets for a single textfield. This is more geared toward Symbol and ZapfDingbats.
How could this be implemented?
I'm not sure how easy/difficult it would be. In regards to implementation, we use the code below to change the default font.
I think being specific about my situation would be the best way to explain what I mean.
Currently, I have a PDF form template that I’m filling using pdf-lib. The template will be stored on the app and we’ll simply be filling it with the user’s values. So I’m using getTextField and setText to accomplish this.
In one section of the PDF, the user has to mark the listed publication exists. On the PDF itself, there’s a list of each publication name with the date of publication in parenthesis and next to it is a single text field. If the date is good, they simply put a checkmark. If the date is different, they put a checkmark and write the new date:
Pub-1 (2018): ✓ 05/05/2020
The checkmark symbol exists in ZapfDingbats, but trying this throws an error since the unicode code points for numbers/letters don’t exist in ZapfDingbats. And similarly, the code point for the checkmark doesn’t exist in Helvetica.
Why does this matter to you?
It seems like the only way to accomplish this would be to use a custom font that contains all the letters/numbers/symbols I need, but it feels like a waste since everything I need exists in StandardFonts.
Would others find this helpful?
I think so.
Are you interested in implementing your proposal?
No
Why are you submitting a proposal?
While I'd love to take a crack at this, I'm so new at this, I wouldn't know where to begin. As I mentioned above, this might already be possible and I just wasn't able to figure it out. But if it doesn't. I thought this would be a useful feature others would be interested in.
Additional Notes
No response
The text was updated successfully, but these errors were encountered:
Describe your idea
This is kind of an idea/question. I spent some time trying to figure out how to accomplish this and couldn't figure it out. But I'm also pretty new to this library, so it might be possible and I'm simply unaware.
But the idea is pretty much in a title. pdf-lib supports 14 Standard Fonts and it'd be great if we could apply a combination of their character sets for a single textfield. This is more geared toward Symbol and ZapfDingbats.
How could this be implemented?
I'm not sure how easy/difficult it would be. In regards to implementation, we use the code below to change the default font.
const mergedFont = await pdfDoc.embedFont(font, options);
So maybe adding a couple more options with a boolean set to false.
const mergedFont = await pdfDoc.embedFont(StandardFonts.Helvetica, { applySymbol: true });
What problem are you trying to solve?
I think being specific about my situation would be the best way to explain what I mean.
Currently, I have a PDF form template that I’m filling using pdf-lib. The template will be stored on the app and we’ll simply be filling it with the user’s values. So I’m using getTextField and setText to accomplish this.
form.getTextField(“fieldName”).setText(this.inputVariable);
In one section of the PDF, the user has to mark the listed publication exists. On the PDF itself, there’s a list of each publication name with the date of publication in parenthesis and next to it is a single text field. If the date is good, they simply put a checkmark. If the date is different, they put a checkmark and write the new date:
Pub-1 (2018): ✓ 05/05/2020
The checkmark symbol exists in ZapfDingbats, but trying this throws an error since the unicode code points for numbers/letters don’t exist in ZapfDingbats. And similarly, the code point for the checkmark doesn’t exist in Helvetica.
Why does this matter to you?
It seems like the only way to accomplish this would be to use a custom font that contains all the letters/numbers/symbols I need, but it feels like a waste since everything I need exists in StandardFonts.
Would others find this helpful?
I think so.
Are you interested in implementing your proposal?
No
Why are you submitting a proposal?
While I'd love to take a crack at this, I'm so new at this, I wouldn't know where to begin. As I mentioned above, this might already be possible and I just wasn't able to figure it out. But if it doesn't. I thought this would be a useful feature others would be interested in.
Additional Notes
No response
The text was updated successfully, but these errors were encountered: