# Export plot to pdf in Mathematica online

I'm using Wolfram Mathematica Online.

I am making a plot which I would like to export to a pdf and download. I used to be able to

BoxWhiskerChart[{rcd,gcd,proximal},"Outliers",ChartLabels->{"rcd","gcd","proximal"},ChartStyle->{Blue},GridLines->Automatic]
Export["foobar.pdf",%]


I would then see foobar.pdf file present in my online directory. This has stopped happening.

How can I export to a pdf from Mathematica Online and where is the file located?

You can use ExpandFileName[%] to get the location of the file. This is helpful in the desktop version, but on the cloud it can be a bit awkward because you get something like this: wolframcloud/userfiles/163/16370232-a02c-4d1f-8a4c-9d4c785c5a0e/foobar.pdf

Another option that works for me is to use CloudExport[] instead of just Export[]

Try something like this:

BoxWhiskerChart[{rcd,gcd,proximal},"Outliers",ChartLabels-{"rcd","gcd","proximal"},ChartStyle->{Blue},GridLines->Automatic]
CloudExport[%,"PDF","foobar.pdf"]


The result is an easily shareable download link such as: CloudObject[ https://www.wolframcloud.com/objects/ben.kickert/foobar.pdf]

• Export[SystemDialogInput["FileSave", FileNameJoin[{\$UserDocumentsDirectory, "foobar.pdf"}]], %] prompts for a file name, with a suggested name and location. – creidhne Jun 28 '18 at 10:32

I ran into this problem, thinking that the file had not been created I found that using FileNames["*.pdf"] enabled me to check that the file was indeed there. Import["foobar.pdf"] also enables you to see the plot. Later the files appeared properly?

Use something like

Export[CloudObject["plot.pdf"], Plot[Sin[x], {x, 0, 10}], "PDF"]

It needs to be exported to a CloudObject to show up in the Cloud file explorer. I think that technically just Export[".pdf,expr] does export content, but it's pretty hidden on the cloud server and only accessible programmatically.