Add support to export code as PDF
Opened this issue · 3 comments
I really like your website, it's straightforward and beautiful.
As a user,
I want to export the code to a PDF file,
So people who view the exported code in the PDF file, can also select the text and copy it easily (not just to view, as in a PNG file).
The PDF size should be the size of the <div class="background background-color-2">
element (and not a regular page size (e.g. A4, A3...)).
I'm curious what the use case would be to save the text as a pdf? There are already code -> PDF solutions out there. I believe this tool is really meant to generate the gif/mp4. The png download seems to just be an extra feature.
There are already a few tools out there that will let you do code -> pdf.
@chrisdola Thanks for the links to other code -> PDF tools, I wasn't aware of these.
However, I've checked a few out, but haven't found anything with quite the same styling as this site.
I really like the way the code looks here. Are there any tools with similar styling?
Because code -> PDF option isn't available here, I did it manually exporting <div class="background background-color-2">
to PDF, see:
Hands-on Generative AI.pdf
So something similar, but automated. What do you think?
One really simple option for now is to export it as a png with no background and then use an online png -> pdf converter.
It is definitely possible to add a feature to export as a PDF, though. Will play around with it.