3

I'm using pandoc to convert markdown into PDFs. When using the LaTeX PDF engine (which is the default), I can specify a different paper size with -V geometry:a1paper.

I want to use the pdfroff backend with --pdf-engine=pdfroff as it's faster and produces better output for my use case.

So how can I specify the paper size for the pdfroff with pandoc?

renehsz
  • 43
  • 6

1 Answers1

3

If you print the roff ms pandoc template with pandoc -D ms, you can see that it makes use of the papersize variable. Not sure which sizes your groff version supports, but try something like:

pandoc -V papersize=a4 --pdf-engine=pdfroff -o foo.pdf --verbose

This emits .ds paper a4

You can also pass options directory to groff, see --pdf-engine-opt.

mb21
  • 34,845
  • 8
  • 116
  • 142