How to set a image for a form field?
See original GitHub issueCan pdf-lib
be used to programmatically fill form field with a image in a template PDF
I tried like this,but failed
const sigAppearanceStream = PDFContentStream.of(
PDFDictionary.from({
Type: PDFName.from('XObject'),
Subtype: PDFName.from('Form'),
BBox: PDFArray.fromArray([
PDFNumber.fromNumber(0),
PDFNumber.fromNumber(0),
PDFNumber.fromNumber(200),
PDFNumber.fromNumber(50),
], pdfDoc.index),
Resources: PDFDictionary.from({
XObject: PDFDictionary.from({}, pdfDoc.index)
}, pdfDoc.index),
}, pdfDoc.index),
drawImage('MarioEmblem', {
x: 447,
y: 520,
width: marioEmblemDims.width * 0.75,
height: marioEmblemDims.height * 0.75,
}),
);
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
How To Add a Form to an Image - W3Schools
Learn how to add a form to a full-width image with CSS. ... Step 1) Add HTML: ... <input type="text" placeholder="Enter Email" name="email"...
Read more ><input type="image"> - HTML: HyperText Markup Language
<input> elements of type image are used to create graphical submit buttons, i.e. submit buttons that take the form of an image rather...
Read more >How to… Add Images to a Form (using Gravity Forms)
To add a stand-alone image to a form, open the specific form and then select the HTML field, which you will find under...
Read more >HTML <input type="image"> - GeeksforGeeks
The HTML <input> type attribute is used to specify the type of <input> element to display. The default type of <input> type attribute...
Read more >how to add custom image icon inside input textbox ... - YouTube
put custom icon images inside the input textbox element html using css styles.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FilipeAraujo I do plan to greatly improve pdf-lib’s support for signatures and acroform fields. I’m currently working on finishing v1.0.0, which includes a new high level API for pdf-lib’s existing features. After that, one of the things I’d like to work on is better acroform and signature support. I can’t commit to a specific timeline. But hopefully it’ll be done within a few months.
@ConandSherry thanks! however, would it be great to do this without changing the
pdf-lib
core. @Hopding do you have something in the pipeline related to this? thanks!