Set border and background color of radio group to No Color/ transparent and keep the marker choice eg cross or dot #1459
Unanswered
calvertwong
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://stackoverflow.com/questions/76275538/set-border-and-background-color-of-radio-group-to-transparent-with-pdf-lib-libra
I have asked the same question on stackoverflow, if you are going to share anything, you could share it on the stackoverflow thread or on this thread.
I have a use case where I am using the pdf-lib library to remove radio groups and recreate the removed radio group in a PDF to reassign the radio button values. The first image is the original look of the round and square radio buttons.

After creating the radio group, the radio buttons now have a border and the square radio buttons are now having a circle border within a box. I could make them to look identical as the original design but that requires me to open the PDF on Adobe Acrobat, go to Prepare Form, and set the background and border color to No Color.
Also notice that in the original's image, the square radio button has a cross marker but the recreated radio button has a dot market instead. I could set it back to using the cross marker from Adobe Acrobat but I prefer to do that on the code level. The code below is how I recreate the radio group.

What I am trying to achieve but couldn't (no documentations):
Beta Was this translation helpful? Give feedback.
All reactions