Show HN: Generate pdf with gitbook or mdbook url
github.com
github.com
Wrong.
Chrome/Chromium crashes due to hard coded memory limit in V8.
Firefox has no command line option for printing pdfs.
No other libraries render the pdfs correctly because they are not full-fledged web engines.
So what were my options?
1. Read/understand Chromium source, recompile to lift the memory limit.
2. Read/understand Firefox source, recompile to add a command line option.
3. Use some UI testing framework to automate pdf printing in Firefox.
Eventually I did 4, which is split the html files into smaller chunks, convert and re-combine. Of course the problem is how do you know where to split the html so that it's at the boundary of the page? The solution is to do a binary search for the number of entries to put into each chunk when the number of generated pdf pages changes. What a pain.
Not that you asked, but I am sitting here silently judging whoever let those pages get that large. Enough html to cap out RAM? Chesterton's Fence dictates that I presume your upstream's hands were tied, but wowee!
Like mdbook, the themes are isolated. Instead of CSS, KeenWrite themes are written in ConTeXt. There are several example starter themes.[2] A "thesis" theme would be a nice addition, but there's a problem.
Markdown lacks a standard for cross-references and citations. An open KeenWrite issue animates a possible UX solution.[3] The topic of references/citations has been discussed on CommonMark[4] without much movement. Parsing cross-references and citations would likely benefit all flexmark-java[5] integrations. KeenWrite uses flexmark-java, but I'm otherwise unaffiliated. If anyone is interested in helping, reach out (see profile).
[1]: https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/docs/cmd...
[2]: https://gitlab.com/DaveJarvis/keenwrite-themes/
[3]: https://gitlab.com/DaveJarvis/KeenWrite/-/issues/145
[4]: https://talk.commonmark.org/t/cross-references-and-citations...
ISO standardization of Markdown when so that browsers and stuff can natively render it? T_T
They're going to be here in 200 years.
Correct me if wrong but Word/LibreOffice layouts could change depending on the machine & version number - but with PDF you get what you intended to show. I think that has always been the winning proposition for PDF
Nothing happens, embedded fonts feature isn't exclusive to PDFs
If you want literally pixel-perfect layout, you need to use a raster image format like PNG.
I would recommend taking a good look again. It might answer you why it is preferred in some situation to be typeset in PDF over a format where text could reflow.
About the immutability in Word, it seems optional & not something by design. You can edit any *docx & 'Save it as' back. This feature doesn't absolve immutability as a principal feature.
PDF/A is made especially for archival and long term preservation
PDF resembles the state of HTML years after HTML4, it barely says what should happen in the best case.
This sounds like a bad thing, but we need some kind of way to say "this is the final presentation no matter what".
Reminds me of how Adobe Illustrator files were also pdf files and you could view them as PDFs when you rename the extension to .pdf. (this might also apply to Photoshop .psd files)
It doesn't evolve with the electronic device, which means you might need to zoom and pan, but it also means that it probably won't be completely bungled.
I've bought an EPUB which only works on iPad. If the screen is sized differently, or uses a different font, etc., the texts are all messed up. It simply wouldn't happen if the book was distributed via PDF.
My favorite “workaround” for turning a pdf into html is to render the pdf with something like pdf.js; create a canvas, render contents, scale responsively, done. It works good enough for e.g. displaying book previews. Demo: https://merely.xyz/seven-photo-challenges/ (photo exercise ebook).
If you must use markdown, there's always https://mystmd.org which integrates directly into Sphinx, modulo minor bits of weirdness due to markdown being a mishmash of extensions.