How to Generate a PDF on a Page Behind Auth in Elixir

This article describes generating PDF files for pages that are behind authentication, using Elixir. It discusses the challenge of securely creating PDFs from authenticated web pages and introduces solutions such as generating a user session token that can be recognised by PDF generators like ChromicPDF and WeasyPrint. The process involves creating a cookie corresponding to a logged-in user session and using it to access and render the required pages as PDFs, thereby overcoming the common hurdle of maintaining authentication during the PDF generation process.

Visit Original Article →