ahcis-rds / study_finder

StudyFinder is a flexible and configurable application to pull studies from clinicaltrials.gov and augment the data from alternate datasources such as a clinical trials management system.
MIT License
17 stars 4 forks source link

Study Print to PDF #90

Closed johnsja closed 3 years ago

johnsja commented 3 years ago

Adding ability to print a study "summary" to .pdf. The pdf summary is available via both the study index and show pages.

Adding wicked_pdf and wkhtmltopdf-binary gems Creating a pdf stylesheet and layout Adding pdf mime type Forcing pdf.css to precompile

johnsja commented 3 years ago

Nice! It'd be awesome if we could unify the study print stylesheet and the pdf stylesheet. Ideally, someone printing the study show page (a regular browser print) would see the same thing as they'd see in the PDF.

I'm also wondering about the word "Print" on the button. We're not actually popping a print dialog—we're just generating a PDF. This might be minor, but I could see some users getting confused why the print button doesn't print. "Download PDF", "Printable version", "Save this study"? 🤷

Just some thoughts. I'm OK merging this and continuing the conversation later with the team.

Thanks for the feedback. I took your advice and converted the "Print" language to "Download" to be more specific with the users. I'll add an issue to introduce the print stylesheet logic into the study show page.