18F / culper

Culper is the foundation for eApp, a part of the National Background Investigation System (NBIS), supporting the SF-86, SF-85, and SF-85P. This is its source code and developer documentation. For background information and a demo video see https://github.com/18F/culper/wiki
Other
27 stars 22 forks source link

Generate and store application data archival PDF on backend #373

Closed ryanhofdotgov closed 5 years ago

ryanhofdotgov commented 6 years ago

As a user, I want to be able to download my application data in archival format (i.e., PDF) even if my browser or OS does not support save to PDF.

As system owner, I want an application data archival PDF to be persisted like our other archival PDFs (certifications, medical releases, etc) as an official record.

ryanhofdotgov commented 6 years ago

Cryptographic hash of application data was stored in database in #372. Deferring remaining functionality.

ryanhofdotgov commented 5 years ago

Long term plan is for this to be delegated to a system external to eApp, but we need a relatively light lift, short term solution.

One idea I had was something like this: https://medium.com/compass-true-north/go-service-to-convert-web-pages-to-pdf-using-headless-chrome-5fd9ffbae1af

Any requirements beyond the Go runtime need to be coordinated with NBIS infrastructure team.

macrael commented 5 years ago

Is it desirable for the data to be in the same format as the original form? We are using some go based pdf generation code in another project where we have a pdf of a paper form and insert images of text into the appropriate boxes and then render the whole thing to a pdf in the end.

ryanhofdotgov commented 5 years ago

The NBIS product owner wanted to do the least amount of effort to get something functional, since it is probably all going to get thrown away in 2-4 months, so that probably drives the technology/design choice more than anything. They were hoping to skip the effort around reviewing a new PDF design at this time as well as minimize development time.

Historically, the archival PDF in e-QIP served at least a couple of different purposes:

What Go PDF library were you thinking of? Rendering text as images is likely a non-starter anyways as these PDFs really need their form values searchable and copy/paste-able.

When I implemented the signature PDFs in eApp at what I thought was at "the last hour", I couldn't find anything appropriate other than https://unidoc.io, which would require a commercial license for this project. At that time we couldn't stray from Go-based solutions, due to constraints imposed by our interim authority to test (IATT).