Failed to create a location and file for the PDF export.
Asked by saehui ju:

Cannot export PDF.  
I guess confluence can't create a folder directory.

What can I do?

```
Caused by: com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export.	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:62)	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:52)	at com.atlassian.confluence.extra.flyingpdf.InternalPdfExporterService.doCreatePdfForPage(InternalPdfExporterService.java:110)	at com.atlassian.confluence.extra.flyingpdf.InternalPdfExporterService.createPdfForPage(InternalPdfExporterService.java:78)	at com.atlassian.confluence.extra.flyingpdf.DelegatingPdfExporterService.createPdfForPage(DelegatingPdfExporterService.java:61)	at com.atlassian.confluence.extra.flyingpdf.DiagnosticPdfExporterService.createPdfForPage(DiagnosticPdfExporterService.java:74)	at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.doExecute(ExportPageAsPdfAction.java:32)	... 383 more

Caused by: java.io.IOException: Couldn't create export directory /confluence_home/temp/pdfexport-20210118-180121-1444-47	at com.atlassian.confluence.importexport.impl.ConfluenceTempDirExportFileNameGenerator.createExportDirectory(ConfluenceTempDirExportFileNameGenerator.java:64)	at com.atlassian.confluence.importexport.impl.ConfluenceTempDirExportFileNameGenerator.getExportFile(ConfluenceTempDirExportFileNameGenerator.java:95)	at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:60)	... 389 more
```


Answers:
author: Raja Jibran Saifullah Khan
body: Remove semicolon from the heading of the page and you will be able to export in pdf


author: Nic Brough -Adaptavist-
body: I'm going to assume you mis-tagged this with Cloud and you are on server (as you would not see this sort of error on Cloud)

It is what it says it is - the Confluence server process is running as a user who does not have full write access to /confluence_home/temp on the server.

You'll need to have the server administrators correct the permissions.

comments: author: Dan Crosby
body: I'm presently having this issue on the cloud version when exporting pages that contain any embedded screen prints.


author: Jim Ballowe
body: I am having the same issue repeatedly and use the cloud version, as well.


author: Nic Brough -Adaptavist-
body: Cloud can't give you this error message, it doesn't have the file storage setup that server/DC does.

Could you tell us exactly what error you get?


author: Jim Ballowe
body: Sorry, but cloud DID give me this error message repeatedly. We have NEVER had on-premise Atlassian. I wasn't able to export the document at all - the "Time Elapsed" just kept counting up and the download never completed, error was "Failed to create a location and file for the PDF export."

Found this page by searching for that error message - cam across this first:

<https://jira.atlassian.com/browse/CONFSERVER-58288>

When I saw that was for an on-prem server I came to this page and made my comment.


author: JONATHAN BOHLMANN
body: Ditto what Jim said. WE are also on Cloud and get the same error![Capture.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/246068i87BA5AF71353880A/image-size/large?v=v2&px=999 "Capture.JPG")


author: Dylan Reeder
body: [\[CONFCLOUD-75274\] Users intermittently get the error failed to create a location and file when trying to export pages to PDF - Create and track feature requests for Atlassian products.](https://jira.atlassian.com/browse/CONFCLOUD-75274)


author: Basavaraj Sangote
body: Hi [@JONATHAN BOHLMANN](/t5/user/viewprofilepage/user-id/652237) ,

I am also facing same issue,

Did you got any solution for this?

If yes please reply


author: Nic Brough -Adaptavist-
body: We still have not got the error report that we need to be able to debug this.

I say "we", meaning the Community, we can't debug from these posts, it's something that \*really\* needs to go to Atlassian. (I have tried to ping it up to them)


Tags: atl-rvw

export

pdf

server