SuffolkLITLab / FormFyxer

A tool for learning about and pre-processing forms
MIT License
11 stars 1 forks source link

Migrate some of the PDF validation code here? #26

Open nonprofittechy opened 2 years ago

nonprofittechy commented 2 years ago

We have a lot of tests for valid PDFs in the Weaver that might be nice to migrate here so we can access consistently across various places we do PDF manipulation and so we have just one API to interact with.

BryceStevenWilley commented 2 years ago

A good idea, but some of those tests use docassemble internal functions, and I don't think we want to add a dependency on docassemble here. We could always just copy what DA does in pdf_concatenate.

nonprofittechy commented 2 years ago

Right--I was just thinking we could import some of the checks directly. Many might be in PikePDF. The PDF concatenate check is probably the most important one and we should leave that in the Weaver upload screen where it already exists.

Mostly I'm thinking of the checks here: https://github.com/SuffolkLITLab/docassemble-ALWeaver/blob/fc6078652a43b91b33d8793d9d75a363ebcd258b/docassemble/ALWeaver/data/questions/pdf_field_tester.yml#L297