cncf / cncf.io

☁️♮🏛🚧 The CNCF.io WordPress website
https://cncf.io
MIT License
82 stars 37 forks source link

Explore automatically generating PDFs of reports #583

Closed thetwopct closed 1 year ago

thetwopct commented 2 years ago

Currently for every web report we build, we also have to design a PDF. This creates additional/duplicated work and sometimes delays in the release process (a minor update still has to be cycled through creative team and a new PDF generated and uploaded).

We should explore the generation of PDF reports from the web version which could be done by any team member via WordPress.

Previously we have experimented with making CNCF Case Studies "printable" so if a page is printed or saved as a PDF then headers and footers etc are removed, backgrounds removed, etc using @print stylesheet. This proved difficult due to the different print engines per browser, and the limitations of print options (i.e. hyperlinks were not created).

Other approaches we could explore:

Potential problems with this approach: A) Hidden areas will have to be unhidden (we have only used this report style on the KCCNC EU 22 report B) Interactive / layered charts (chartJS) may not display properly or display at all (only used so far on Annual Report 21)

@cjyabraham what do you think?

cjyabraham commented 2 years ago

This idea feeds in to the larger conversation we were having about producing PDFs. I think it's a good option to consider but will depend on the business reason for having PDFs at all. If they need to be pixel perfect, then we will just need to keep making them by hand. If they just need to offer a decent printable option for people, then I think the solutions you suggest above could be useful and are one step up from a print CSS. I will make a note to discuss with the wider team.

cjyabraham commented 1 year ago

Filing as nice-to-have for now as an idea for the future if it meets the need.

thetwopct commented 1 year ago

Closing as not currently part of our plan for reports.

JamesPaden commented 1 year ago

Use an external service (most seem use the headless Chrome approach)

DocRaptor dev here. This popped up on our Google Alerts.

Just wanted to note that DocRaptor does NOT use Headless Chrome, which is one of its big advantages. We use Prince, which is a lot more powerful/flexible for PDF creation than Chromium. Also, our team would be happy to provide technical assistance on making the CSS/HTML, if you wanted.