Open neotmhy opened 5 days ago
Hey, thanks for posting.
Unfortunately there's currently no such layer control functionality supported by the library. In your case I have two suggestions:
1) If after you created the widgets you are filling using PdfWrapper
, you shouldn't worry about this issue as it will naturally remove widgets and leave only texts on your PDFs after filling.
2) If you are filling using FormWrapper
, I just released v1.4.35 and alpha band is now supported for bg_color
. So you can set a combination of bg_color=(250, 250, 254, 0)
and border_width=0
to make a widget transparent. After which if you set flatten=True
when filling you will result in a same filled PDF as if you are filling using PdfWrapper
.
Let me know if you have more questions.
PyPDFForm=1.4.33
Controlling Form Widget Layer
Is there a way to control the layer an added widget occupies? I want preexisting overlapping graphics to appear on top, but the widgets are on top instead.
PDForm.py
Input / Output PDFs
Input PDF: https://drive.google.com/file/d/1co3VmLRQVCYjxwuzwdwiL7FerlgkFqIg/view?usp=sharing Output PDF: https://drive.google.com/file/d/1yLG3C3_GCc0K9gMWjE9GnJYQ4_8UY1vA/view?usp=sharing
Screenshots
Input: Output: