How can I render an XFA form? #221
-
I'm trying to render an XFA form, for example the one here from iText: https://github.com/itext/i7js-examples/blob/develop/src/main/resources/pdfs/purchase_order.pdf With the default installation of pypdfium2, the XFA form is not rendered and the image below is rendered: Does the pdfium library that is shipped with pypdfium2 include XFA (and therefore V8) support? If not, is there a way I can use my own library, like the one from here, which is built with XFA and V8 support? Thank you for any help you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 16 replies
-
Well, the wheels are packaged with the default (non-V8) pdfium builds. But if you install pypdfium2 from source, you can set an env var to use the V8 binaries (as mentioned here): export PDFIUM_USE_V8=1
pip3 install git+https://github.com/pypdfium2-team/pypdfium2@stable
# alternatively: # pip3 install pypdfium2 --no-binary=pypdfium2 Then calling
|
Beta Was this translation helpful? Give feedback.
-
@mara004 Thank you very kindly for your advice. I installed pypdfium2 with the commands you suggested:
Any XFA form still fails to render, which is very strange. Some time ago I built a version of pdfium from source (off Chromium 4128) and its It also seems that, in order to work with XFA forms, one must invoke
I'll try re-building pypdfium2 with pdfium from source, and see if that helps. Thank you! |
Beta Was this translation helpful? Give feedback.
Well, the wheels are packaged with the default (non-V8) pdfium builds. But if you install pypdfium2 from source, you can set an env var to use the V8 binaries (as mentioned here):
Then calling
pypdfium2 -v
would yield something like