New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formwrapper and Pdfwrapper cannot fill image field #560
Comments
The wrong detection seems to come from these lines: Which catches all buttons |
So image field is not a widget type that the library supports. I don't think it's explicitly stated in the docs but I can add it later if it ever causes confusions. The reasons is simple, I do not know what pattern precisely characterizes a widget as an image field. If this ever comes clear someday I can make |
Hey @chinapandaman, Indeed, I've searched on the internet and didn't find a standard regarding image fields. I totally understand that it will be hard to implement a standard out of it. If you wish, I can try to support the signature field in |
You are more than welcomed to try getting the signature field to work for |
Hey @73VW, it's been a little over a week now. Do you mind if I close this issue? When you have something we could always open another one. |
Hey, so I spent today looking into this a bit more. When I compared your PDF with a PDF form with image field of mine, I noticed something that both PDF's image widgets share in common. Both image widgets have an
I believe the So I think this is a good enough evidence for identifying image field and I went ahead and wrote this PR. I added your PDF form as a test case and it seemed to work fine. Anyway, the changes are released. Give v1.4.21 a try and tell me what you think. Docs are also updated. |
Hello there,
It seems that the package has difficulties identifying and filling image selection fields.
Here's an example of file with such field: https://www.liguepulmonaire.ch/sites/default/files/documents/verordnungsformular_4f.pdf
That's a prescription template.
It detects the field as Checkbox but the field doesn't have the
/AP/D
properties.Here's the value of the widget:
{'/A': IndirectObject(665, 0, 140288380589648), '/DA': '/SyntaxLTStd-Roman 10 Tf 0 g', '/F': 4, '/FT': '/Btn', '/Ff': 65536, '/MK': {'/IF': {'/FB': True}, '/TP': 1}, '/P': IndirectObject(485, 0, 140288380589648), '/Rect': [382.767, 123.965, 541.868, 215.683], '/Subtype': '/Widget', '/T': 'ImageSign', '/Type': '/Annot'}
I will try to reverse engineer the content of the field just as I have done in #559 in order to try to fix this but I guess that won't be an easy trick.
The text was updated successfully, but these errors were encountered: