views:

50

answers:

1

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.

+1  A: 

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

ivann