PPP: An app for creating elegant documents out of XlsForms

xlsform
form-design
odk-xforms

(Joseph E. Flack IV) #1

PPP is a project with the purpose of helping people convert XlsForm Excel files into more human-readable, printable formats, commonly called "paper questionnaires". Officially, PPP stands for "Pretty PDF Printer", but other formats are supported. The project consists of...

Both tools are open source and free to install. You can also use it online with no installation necessary, at http://ppp.pma2020.org.

Samples
Source Excel file: demo.xlsx
Converted to PDF: demo.pdf
Converted to DOC: demo.doc
Manually saved as DOCX from DOC: demo.docx
Converted to HTML: demo.html

Example Screenshot


Please check it out and let us know what you think!


Script to convert records to PDF
(Yaw Anokwa) #2

Pretty great app, @Joseph_E_Flack_IV. Thanks for sharing!

How hard is it to keep this in sync with the changes to pyxform, the tool that most of the ecosystem uses to go from XLSForm to XForm? I ask because maybe there is some way you could use that as a module.


(Joseph E. Flack IV) #3

Hey @yanokwa, that's a good question. Actually, PPP goes straight from the Excel files following the XlsForm spec to HTML, and uses that as a base for DOC and PDF. No XML required!

Do you know if this could be a disadvantage for support for some platforms? So far in addition to ODK XLsForm spec Excel files, we've had luck converting SurveyCTO forms and XlsForms exported from Kobo Toolbox.


(Yaw Anokwa) #4

If you go straight from XLS, it means that you can't, for example, support selects based on external CSVs or questions with images. And if the form specification adds new features (e.g., guidance hint), the onus is on you to keep PPP up-to-date.

None of this is bad! It's more that I've been down that road before (see LINKS Codebook) and it can be a pain if you want to support everything that the ODK form spec supports. But no one says you have to do that. And most people don't design forms that use everything the spec supports.

Relatedly, I learned a few months ago that Enketo also has pretty good print mode. You can see what your form looks like in that mode at RQ-etr6-v1.pdf


(Joseph E. Flack IV) #5

Guidance hints: that's pretty awesome. I had a similar idea of implementing this as a kind of hack in some of our PMA2020 forms. Something like a field-list with a checkbox at the bottom of the screen where, if selected, the next page would basically display that additional guidance / info for the person conducting the survey.

Image embedding: This is a feature we're currently working on adding. For the CLI, the images would basically have in the same directory, or in a named path. For the web app, can be uploaded with the form.

Pulling external CSV data: So far most of our users are internal to PMA2020, but I think we could add this functionality if it is desired.

I think all of these features can be added without needing to use XML as the base model, but perhaps it would be / would have been more optimal if we'd designed / changed the design to do it this way.

LINKS Codebook: Whoa. Gonna share this with our data managers.

Enketo print mode: This looks prettier than the current PPP template. Since it is HTML, I can see how it can be made into other formats easily. The .doc files that PPP generates are actually HTML underneath. We're currently working on updating our templates, but I'm wondering if it might just be better to use Enketo as a dependency. And thus the real benefit of PPP would be the CLI, interface, and some additional options (like creating a zip of forms multiple forms, languages, formats, etc at once).

I'll add some of these items as GitHub issues for future follow-up.


(Yaw Anokwa) #6

I like the way you are thinking, @Joseph_E_Flack_IV! Sharing the burden of generating HTML from XLSForms with @martijnr would likely make both of your programming lives easier :slight_smile:

The codebook source is at https://github.com/nafundi/odk-codebook/. It's woefully out-of-date, but maybe there are some good ideas there that you can pull from.


(Martijn van de Rijdt) #7

Cool stuff @Joseph_E_Flack_IV! I think it's great to have another tool in the ODK Ecosystem that can be used for printing/pdf-ing/converting!

If you're going the Enketo route in the future, here is some (perhaps) useful info: