SuffolkLITLab / docassemble-AssemblyLine

Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
MIT License
43 stars 5 forks source link

Add ability to specify which documents to download as DOCXs or PDFs #813

Open BryceStevenWilley opened 10 months ago

BryceStevenWilley commented 10 months ago

Right now when you get to the end of an interview, you have 3 options to what format the final documents are provided in download_list_html: original, which uses the original format of the document, pdf, or docx. original is the only one of these that gives you different download formats for each document, but it forces that format to the be same as the document was developed in.

At MLH, we have an interview with 2 documents, originally developed as DOCX, where we want one of the documents to stay a DOCX, and the other to be converted to a PDF. To do so I think we'd need to add a desired_format attribute to each ALDocument, and then add an option to the format argument, desired, which checks that attribute. I'm not sure how to evaluate adding that complexity, up to y'all.

nonprofittechy commented 10 months ago

I can understand the need, but I don't know for sure the best solution. I think (not totally sure) that it might be better to make this a new parameter or alternate form of the format parameter to the download_list_html method. It's a bit clunky, but I think it would be worse to track this on the individual document level.

Perhaps something like:

format={doc1: docx, doc2: "pdf"}. (note: we could pass the actual ALDocument object and perhaps even have default handling if not all documents are passed as parameters, or have a special "default" key)