Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs exporting org file as PDF in batch mode

I'm trying to export a bunch of org mode files to PDF using emacs in batch mode. So far, only export to html seems to work.

When I export to html I see the following -

U:\tmp>d:\programs\emacs-23.1\bin\emacs.exe -batch --visit=Changelog.org --funcall org-export-as-html-batch

OVERVIEW

Exporting...

Exporting...

Saving file u:/tmp/Changelog.html...

Wrote u:/tmp/Changelog.html

HTML export done, pushed to kill ring and clipboard

However, there is no function like org-export-as-pdf-batch and so I tried the following.

U:\tmp>d:\programs\emacs-23.1\bin\emacs.exe -batch --visit=Changelog.org -eval "(org-export-as-pdf \"Changelog.pdf\")"

OVERVIEW

Exporting to PDF...

Exporting to LaTeX...

Wrong type argument: number-or-marker-p, "Changelog.pdf"

Any ideas on how to export to PDF? My org-mode version is 6.35i with on Emacs 23.1. I'm on WinXP.

like image 340
Sid Heroor Avatar asked Jun 10 '10 11:06

Sid Heroor


1 Answers

Mistake in calling org-export-as-pdf.

First ARG use in calling org-export-as-latex and specifies how many levels of the outline should become headlines.

Try without ARG:

C:\> emacs.exe -batch --visit=Changelog.org --funcall org-export-as-pdf

like image 118
yelizariev Avatar answered Oct 19 '22 11:10

yelizariev