Background
I’m trying to generate a PDF of a page which contains 3 LiveView components. I’m using the PdfGenerator library to do this.
Problem
There’s two seperate problems.
I want to generate the PDF with a landscape orientation, however I can’t seem to find any options to give the PDF a landscape orientation. Does anyone with more experience on this library know how to do this?
When I generate the PDF, it doesn’t show any of the LiveView components. What would be the proper way to solve this?
I’ve solved this problem by replacing the liveviews with a regular canvas and adding a JS file to the template to draw the chart. I’m also using a node.js script with Puppeteer instead of the PdfGenerator library to generate the pdf and calling the script using System.cmd/3.