Hopding / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
6.84k stars 652 forks source link

Add TextField Background Opacity Support #1614

Open Patzi275 opened 6 months ago

Patzi275 commented 6 months ago

Describe your idea

Enable pdf-lib to adjust background opacity of TextField objects. This enhancement would allow users to customize PDF forms and documents more flexibly. Here's a proposed API snippet:

const field = form.createTextField('favorite.superhero')
field.setText('One Punch Man')
field.addToPage(page, { 
    // ...
    backgroundOpacity: 0.0
})

What problem are you trying to solve?

Current pdf-lib lacks programmable control over TextField background opacities, limiting customization options for PDF forms and documents.

Why does this matter to you?

Enhances visual appeal and usability of PDF documents, catering to a wide range of pdf-lib users dealing with form generation and document customization.

Would others find this helpful?

Yes, I cannot give you an number honestly

Are you interested in implementing your proposal?

No

Why are you submitting a proposal?

My primary goal is to contribute to the improvement of pdf-lib by highlighting a feature gap.

Additional Notes

No response