Remix.run Logo
zja 4 days ago

pandoc

w10-1 a day ago | parent | next [-]

To reinforce this: pandoc has been the go-to for a long, long time and they have encountered and addressed tons of issues, which is especially important for two underspecified and over-provisioned formats like HTML and pdf.

Go through the revision and bug history to see a sample of issues you're avoiding by using a highly-trafficked, well-supported solution.

The only reason not to use it is when they say they don't support a given feature that you need; and the nice thing there is that they'll usually say it, and have a good reason why.

The other reason to use pandoc is that while you might currently want PDF as your outbound format, you might end up preferring some other format (structured logically instead of by layout); with pandoc that change would be easy.

Finally, pandoc is extensible. If you do find that you want different output in some respect, you can easily write an plugin (in python or haskel or ...) to make exactly the tweak you need.

hhthrowaway1230 4 days ago | parent | prev | next [-]

doesn't pandoc rely on some engine itself?

cpach 2 days ago | parent | next [-]

Yep, you need something like XeTeX in order to render the PDF.

brudgers 2 days ago | parent | prev [-]

Curious why that matters to you?

I mean everything has dependencies (some of the solutions elsewhere require Chrome and other common solutions require the JVM). At least Pandoc is GPL.

kakokiyrvoooo 2 days ago | parent | next [-]

It matters because pandoc is not rendering the website to pdf, it converts the html to latex and then uses a latex engine to render the pdf.

brudgers a day ago | parent [-]

Forgive me but I don’t understand why that matters to you and am trying to understand what the issue with Latex is.

Because lots of things work this way. For example compilers built on LLV uses an intermediate language and Python uses byte code.

I suspect some html to pdf tools go through postScript.

kreetx a day ago | parent | prev [-]

There are multiple ways to "depend", so if pandoc executes some external tool all of the work then might as well use that external tool directly. You will get more control over how the conversion happens, know for what search for when in trouble etc.

brudgers a day ago | parent [-]

My understanding and experience is that Latex has a significant learning curve and Pandoc provides a more gentle front end.

Of course Latex gives you fine control to hand tune the engine…but that doesn’t seem like what the OP is looking for.

beeforpork a day ago | parent | prev [-]

Does pandoc do JavaScript? For stuff that is rendered (I don't want animated, interactive PDFs...).