magopian / att

ATTESTATION DE DÉPLACEMENT DÉROGATOIRE
https://magopian.github.io/att
32 stars 9 forks source link

PDF Export #7

Closed bzg closed 4 years ago

bzg commented 4 years ago

It would be nice to be able to export as PDF, to let people fill this form form their relatives.

Natim commented 4 years ago

I noticed also that my browser clear the form if I restart it. I don't want to have to feel the form in front of the officer.

magopian commented 4 years ago

It would be nice to be able to export as PDF, to let people fill this form form their relatives.

There is already an official PDF that one can fill in very easily I believe, why go through this website to do it?

I noticed also that my browser clear the form if I restart it. I don't want to have to feel the form in front of the officer.

@Natim can you please open a new issue for your problem? It shouldn't happen, so that's worrying, and need an investigation. If you could also give the steps to reproduce? Thanks!

ewjoachim commented 4 years ago

There is already an official PDF that one can fill in very easily I believe, why go through this website to do it?

Depending on the tools you have, filling an interactive PDF can be tedious.

BUT print to pdf is a thing.

magopian commented 4 years ago

BUT print to pdf is a thing.

Not on mobile I'm afraid. There are js libs to generate an PDF (see the PR https://github.com/magopian/att/pull/8/files#diff-eacf331f0ffc35d4b482f1d15a887d3bR171-R175), but as explained in the README I'd really like to keep it minimalistic and simple and offline friendly (read: as a single, small and contained file).

Natim commented 4 years ago

Actually on mobile you have a print to pdf too.

We could add a export button that calls window.print

magopian commented 4 years ago

We could add a export button that calls window.print

It doesn't work, at least on firefox for android

magopian commented 4 years ago

I added a button to print which, if it doesn't work, will display an alert. It's not possible (to the best of my knowledge) to feature detect before trying to print, sadly :/

Also there's now a popup on the website explaining that the data filled in the form is automatically saved.

Closing this one now, thanks for the feedback