-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export to PDF #2730
Comments
from this Scrum Master user:
|
A user says:
|
Making this discussion |
Closing this for now |
A user 🔒 writes:
|
A user 🔒 mentioned:
|
A user 🔒 asks:
|
A user 🔒 asks:
|
Hi all, here are some thoughts: Summary This seems to be a recurring request, even though it has a solution: Print to PDF. I see this as a UX request, not really a feature request. It can be handled in at least two ways, both will require the addition of a "Get a PDF" or "Download a PDF" button to the interface. I think both also require reviewing the CSS, since after all PDF is a print format. I'd at leat take care not to print interactive elements (such as buttons, links, etc) and try to get the content to paginate well, if possible. It is also possible to make the links work on the PDF document, but I would strongly adivse against writing URLs in stone like that. ;) So, here are the two ways: 1. Button triggers window.print() and hopefully the user will know to pick PDF in case there is a printer configured as default.
2. Button triggers the download of a PDF file, generated eagerly when the meeting is over or lazily when requested.
3. ? Here's what I think needs attention when exporting do PDF: |
We should apply We're rendering the email we send on the server and could use the same logic to also generate a pdf from it. A quick search showed only 2 packages https://github.com/mrafiqk/html-pdf-node and https://github.com/marcbachmann/node-html-pdf to generate PDFs. Both are using phantomjs or puppeteer, meaning they're relying on starting a headless browser just to print it. I don't have experience with these, but my gut feeling says this could put too much load on the server for little benefit. I would be reluctant to implement this and would be afraid it's just opening a whole new can of worms. |
These are great suggestions, thank you @atannus! The HTML meeting summaries are already stored and can be viewed later on. I don't think we would need to store the PDF version of it, since we can always perform a "download as PDF" action on them. I like your suggestion of simply downloading the PDF. The actions could be placed in the same sentence, something like this: Export to So if a user selects A small detail but I think it's important to avoid confusion, is to avoid the word "print" and use instead "export". Based on the feedback and requests detailed on this issue, users want a way to export a PDF, and not really physically print it. |
@Dschoordsch could we not use Puppeteer in browser and distribute the rendering load to the edge (i.e. the user)? |
@jordanh @Dschoordsch what about jspdf (last update 3mo) or react-pdf (last update 15 days), both are more active in the community and updated more regularly. pdf-puppeteer hasn't been updated in almost 2 years and old dependences will eventually bubble up in vulnerability scans and possibly make a headache for Ironbank. |
@jordanh @adaniels-parabol another way of doing that (and the way I did image generation API in the past) is to use puppeteer in some lambda function and simply generate the PDF. we don't worry about the load, our server is safe and users can generate pdfs. puppeteer itself has API to generate pdfs, no need to use outdated libraries: there are a few issues with that, potentially
|
How would we support PDF generation for Gov DOD users who can't really use external services? PDF generation sounds like a common thing we wouldn't want to tie to an external API. |
@adaniels-parabol I thought about our serverless function, we could use AWS Lambda or something similar. so it wouldn't be an external API. unless I misunderstood you, there should not be any issues with that |
@adaniels-parabol React-pdf looks promising and renders in the client. That seems ideal. We should give it a go. |
Yeah, after a brief look at react-pdf, it looks very reliable and has a very easy-to-use Hook API. react-pdf deps on Yoga layout (it's also an Facebook Open Source) and pdfkit (I tried this before and it's good).
|
I've gone ahead and implemented the bare minimum code to get that "low hanging fruit". The implementation is very slim, just one new component which when clicked calls window.print(), and a minor changes to SummarySheet.tsx to include the new link. As for hiding the buttons, that was done using .hide-print which was already available in the CSS. I did not hide the "see comments" links above each ReflectionCard. These are quite useful and can be used in the PDF format, but I'm not sure about them. Should I send a PR to master or a feature branch? Is there a nanimg scheme? What's the merge strategy? |
- Implements component for an "Export do PDF" button. - Adds PDF button to SummarySheet. - Hides buttons on PDF using "hide-print".
I don't know if I should pull-request into master or another feature test branch, can someone help me with that, please? |
@atannus you can open a pull request into master and then it will go through code review. For the not so low hanging fruit, as it seems fairly straight forward I would love if you could give react-pdf a go so we could get a sense of
|
@Dschoordsch thanks, I'll put the PR in shortly. I first went to CONTRIBUTING.md looking for instructions, it seems like a natural place, perhaps under or near "Git Strategy". I took a brief look at react-pdf. I was initially hoping for a way to render the PDF directly from the webpage and its assets, just like the browser's "Print to PDF" feature, but from my very brief look at it, react-pdf allows the construction of a PDF, which would require templating one for that particular purpose, which in turns means twice the maintenance when changes are made to the Summary and other PDF-exportable pages. I am interested in finding out if there is a way to render directly from the HTML on the browser, that would eliminate the need for a dedicated PDF layout. I'll give the whole thing a hard look and report back. |
Here's a quick status update on this issue:
Puppeteer uses Chromium, which takes up 170 to 280 MB depending on the OS. It manipulates the browser on the server by default. You can set it up so it can be accessed from the web using puppeteer-web, but that goes against the idea of offloading that compute load to the edge. Notes:
This article was very helpful: https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/ |
There is in fact the alternative to only implement PDF, which can be displayed on the page with option to download. The summary is a pdf. Major drawback I think of is the loss of interactivity beyond links... |
@atannus thank you for the PR, i just left some comments. @jordanh @Dschoordsch are we good with the scope of the PR: #6420? It's basically using |
@BartoszJarocki I've spoken to @ackernaut about this, it turns out this has ramifications.
I've fixed the PR with the changes you've suggested, but I think @ackernaut needs to chip in, perhaps this is not ready for production. |
Overall, I’m not sure this is worth the effort we’re applying:
I think the ‘save as PDF during print’ affordance is the best we can give them:
I’d like to see an email notification system that mentions the simple event ‘meeting XYS ended’ and points them back to a rich summary view that we can control. Folks could opt in or out to this notification in app, email, or chat. All channels would offer a consistent notification that points to artifacts. Folk would lose the in-email version they can pass around. Maybe the attached PDF makes sense there. I think in the long run we might be in the business of rolling up digests and highlights for management. I’m not sure we can do much more than give them teasers in email. The real deal will be in the app In general, I’m okay with a small, less-than-perfect win but I’m not sure we’ve go the right direction here. How many people have asked for PDFs? How much of this do we have to maintain? |
I think automated invoice emails with attached PDFs #3955 is another opportunity to use this learning. What I would imagine is that a configurable list of emails receives a clean email template about the invoice with an attached PDF of the invoice. They can tap through to see the invoice in the app. They could forward the email with PDF to their accounting or just add that accounting email and skip that nonsense. |
A user requests:
|
It lives! :)
…On Wed, Jun 29, 2022 at 2:01 AM Alicia Cressall ***@***.***> wrote:
A user requests:
Ability to export the summary to a google doc or pdf
—
Reply to this email directly, view it on GitHub
<#2730 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFDNGZG2IVKRHAKLW47PZDVRPKBDANCNFSM4G63ZTXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
André Tannús | Epungo | +55 11 2389-4360
We are a layer
|
A user would like:
|
I propose we icebox this, and not collect signal for 2022 T2 or T3. I think we have more interesting ‘activity output’ opportunities that are more strategic and interesting. The closest we’ve got here is giving people instructions or a not-above-the-bar button to basically Print > Save to PDF. Which they can do anyway. We also have opinion that we may not generate invoice PDFs, but maybe just send an email and make it easier to print there. I’d rather start there first. Also we probably won’t get to this among other things, and with folks like @atannus atannus I’d rather have help for more interesting things. Since this is safe to try (we can reopen this issue and resume collecting signal) gonna err toward action. Happy user feedbacking! |
@ackernaut hit me up when you come across something I can help with. |
Issue - Enhancement
A user has requested:
Acceptance Criteria (optional)
Users can:
Can view/download a PDF from Meeting summary email
Estimated effort: 11 points (see CONTRIBUTING.md)
The text was updated successfully, but these errors were encountered: