Pdf export issue


When I want to export a page in pdf, I experiencing Java exception. It may be an issue related to permissions, but I don’t now what exactly. If you can help me to fix this issue, I will be very happy.

beginning of exception ;

    Error number 11015 in 11: Exception while exporting
com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting
	at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:90)
	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:447)

Caused by: com.xpn.xwiki.XWikiException: Error number 12002 in 12: Exception while exporting pdf
	at com.xpn.xwiki.pdf.impl.PdfExportImpl.createException(PdfExportImpl.java:636)
	at com.xpn.xwiki.pdf.impl.PdfExportImpl.renderXSLFO(PdfExportImpl.java:396)
	at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHTML(PdfExportImpl.java:327)
	at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:280)
	at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:266)
	at com.xpn.xwiki.web.ExportAction.export(ExportAction.java:255)
	at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:87)
	... 48 more
Caused by: org.apache.fop.apps.FOPException: .fop (Permission denied)
java.io.FileNotFoundException: .fop (Permission denied)
	at org.apache.fop.util.LogUtil.handleException(LogUtil.java:57)
	at org.apache.fop.fonts.FontCache.saveTo(FontCache.java:222)
	at org.apache.fop.fonts.FontCacheManagerFactory$FontCacheManagerImpl.save(FontCacheManagerFactory.java:71)
	at org.apache.fop.fonts.FontManager.saveCache(FontManager.java:142)

Caused by: java.io.FileNotFoundException: .fop (Permission denied)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
... 73 more

If you are on linux (no clue about Windows) make sure that the user that is running xwiki has a home directory, because the pdf export creates a cache in ~/.fop.

Took me a while to figure this out.
Alternatively there may be a xwiki config property that allows moving the fop caches to a different directory. But I could not find it.

Thanks a lot, that has fixed my issue.

Have a nice day

Maybe one of the xwiki-devs can have a look at this topic? Is there a way to move the fop cache out of the home dir of the user that runs xwiki? I really dislike the idea of creating restricted users (like my tomcat user) with a home directory.
@vmassol: Sorry for “@ing” you directly, but can you help out here?

@rbr Could you create a jira issue for this on jira.xwiki.org? Thanks!

done: Loading...

I tried exporting pdf on my smartphone but failed. I am an iOS user and I am being redirected to help page with an iphone error 4005

I’m having the exact same issues

Hello Elric,

how exactly solved your issue? i have now the same.

if you are on linux you will need to create a home directory for the user that is running your application server.

1 Like