klippa-app / go-pdfium

Easy to use PDF library using Go and PDFium
MIT License
183 stars 15 forks source link

Any plans for XFA/V8? #156

Closed vaclav-dvorak closed 4 months ago

vaclav-dvorak commented 6 months ago

Hello

Just want to ask if there is any plan to include XFA/V8 functionality as original issue mentioned in readme was fixed more then years ago: https://github.com/bblanchon/pdfium-binaries/issues/62

Regards

jerbob92 commented 6 months ago

Hey! Will look into it! It will only work for the non-webassembly usage it seems, as that build doesn't support XFA/V8 yet.

jerbob92 commented 5 months ago

Progress is in this branch: https://github.com/klippa-app/go-pdfium/tree/feature/xfa-v8 I'm having quite a hard time testing this, since pdfium itself seems to contain almost no unit tests for XFA and it's also quite hard to find testing XFA PDF's.

jerbob92 commented 5 months ago

I have finalized the XFA implementation, you can try it out with #159, using a pdfium binary that includes XFA/V8, using the build flag pdfium_xfa. It would be greatly appreciated if you could test it out because it's largely untested through unit tests since pdfium itself also doesn't contain tests for these. I will put in some more effort into finding a XFA test PDF to test out all the different features.

jerbob92 commented 5 months ago

Currently I'm having quite some issues to get the XFA support stable, it causes the tests to crash quite a bit. However I also got the following from a pdfium maintainer:

The XFA support in PDFium today is essentially unfinished. Common XFA forms in the wild do not work. As far as I'm aware, no resources are being put into finishing XFA support.

So I'm not sure how useful the XFA/v8 support would be.

vaclav-dvorak commented 4 months ago

Thank you for looking into this. There was a chance that this could fix an issue of ours but it seems that it wasnt the right path :(