ConfluenceのPDFエクスポート機能

Confluenceには標準でwikiページのPDFエクスポート機能があるので試してみました。TracでもPluginはありますが、どうもインストールの敷居が高そうなので、Confluenceにはちょっと期待していました。

まず、管理コンソールの"PDF エクスポート言語サポート"から、日本語フォントを登録します。

IPAフォントを登録しました。

エクスポート方法は各ページのツールボタンから"PDFへエクスポート"を選択します。

PageToPdfPlugin - Trac Hacks - Plugins Macros etc. - Trac
これでPDFでエクスポートできるはずなのですが、403(Forbidden)エラーが発生しました。。以下ログファイルに出力されていたエラーです。

2010-03-24 19:25:27,499 ERROR [http-8090-4] [confluence.servlet.download.ExportDownload] getStreamForDownload com.atlassian.confluence.importexport.resource.UnauthorizedDownloadResourceException
 -- url: /download/temp/pdfexport-20100324-24310-0725H%8C-29/ds-%C6%B9%C8%DA%FC%B8-24310-0725H%8C-30.pdf | userName: ****
com.atlassian.confluence.importexport.resource.UnauthorizedDownloadResourceException
	at com.atlassian.confluence.importexport.resource.ExportDownloadResourceManager.getResourceReader(ExportDownloadResourceManager.java:67)
	at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReaderFromDelegate(DelegatorDownloadResourceManager.java:75)
	at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReader(DelegatorDownloadResourceManager.java:32)
	at com.atlassian.confluence.servlet.download.ExportDownload.getStreamForDownload(ExportDownload.java:37)
	at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload$StreamResultCallback.doInTransaction(ServeAfterTransactionDownload.java:140)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
	at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.getStreamInTransaction(ServeAfterTransactionDownload.java:41)
	at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:50)
	at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:32)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...

ConfluenceではPDFをテンポラリフォルダに作成してそれをダウンロードさせているのですが、そのテンポラリフォルダにアクセスする権限がない、ような意味だと思いますが、、そのような設定は見当たりません。。CofluenceのJIRAを見てみると、それっぽいのがありました。
[#CONF-18704] Cannot generate PDFs of pages with certain symbols in the title - Atlassian JIRA
[#CONF-19046] Export page to PDF throws UnauthorizedDownloadResourceException - Atlassian JIRA
3.2で修正予定だったようですが、つい先日リリースされた3.2では含まれなかったようです。ステータスもまだオープンですし。デブサミでは実際に動作しているところを見せてもらったので、デグレードしているのか、環境によるのか。。

ただ、ConflueceのデータフォルダにあるtempのなかにPDFファイル自体は作成されています。日本語も正常に表示されていました。

追加(2010/4/15)

3.1では、PDFファイルを作成するテンポラリディレクトリの名称に日本語が含まれていることが原因に思われたのですが、Confluence 3.2に変更したところ、この点は修正され、ページタイトルに日本語が含まれていなければ正常に動作するようになりました。
[#CONF-18704] Cannot generate PDFs of pages with certain symbols in the title - Atlassian JIRA