Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am wondering if there is any possible solution to exporting equations from Mathematica to Corel. I was trying first to export an equation as pdf from Mathematica and then to import .pdf to Corel, but many characters are missed. Maybe someone had success with this kind of problem.

share|improve this question
Does it work if you use the function in this answer? Just say outlinedExport["output.pdf", g, ImageSize -> 600] or something similar. – Jens Jun 3 '13 at 3:58

1 Answer 1

up vote 8 down vote accepted

There is a similar problem with Adobe Illustrator, too. For that purpose, I use the following function (see my web site for more info):

toPDF[x_, opts : OptionsPattern[]] := 
  If[! ImageQ[x], 
        FilterRules[{opts}, Options[Style]]], 
       FilterRules[{opts}, ImageSize], 
       BaseStyle -> {FontFamily -> "Times New Roman", 
         Background -> (Background /. {opts} /. {Background -> 
              None})}], "PDF"], "PDF", "TextMode" -> "Outlines"]];
SetAttributes[toPDF, HoldFirst]


toPDF[Integrate[1 + Sin[x]^2, {x, 0, Pi}], FontSize -> 18]


Now you can either highlight the result (as I did above) and copy it as PDF (on Mac), or type Export["eq.pdf", %] in the next cell, to save to a file.

The reason I added the attribute HoldAll above is that I wanted to be able to export expressions like integrals without having them be evaluated. So the purpose of this function is really geared toward typesetting equations, and then copying them to Illustrator. Maybe this is also what you want for your drawing application.

I use Pane as a wrapper for the equation in order to be able to control the bounding box of the PDF. The function also accepts a Background option in case you want to add a color behind the equation.

Edit for version 10.1:

Due to added bugs in Import with PDF format, the example above won't work properly anymore. Another solution that still does work is the function gsExport from my answer here. You have to make sure that ghostscript is installed and in the search path. If the linked code doesn't find your gs command, you could add the path directly in the code, as in /path/to/gs. After invoking gsExport["filename.pdf", HoldForm[Integrate[1 + Sin[x]^2, {x, 0, Pi}]]], you can do Import["filename.pdf"].

share|improve this answer
Thank you very much Jens. This I was trying to get. Quality of image-equation is very nice in corel. Thank you Jens a lot, hope that your "papers" look perfect. – Pipe Jun 3 '13 at 11:16
Same problem with BoundaryDiscretizeGraphics in v10.2. – Szabolcs Jul 24 at 17:41
Since v9.16, you can use the following with GhostScript: gs -o out.pdf -dNoOutputFonts -sDEVICE-pdfwrite in.pdf. This won't involve any conversions to EPS. It goes directly from PDF to PDF. – Szabolcs Jul 24 at 17:43
@Szabolcs Great, thanks, I'll add that to my linked answer! (I checked that the old syntax also still works in 9.16, though). I'll also have to file another bug report for the Import issue, I guess. Although I believe I reported stuff like that a couple of times already. New issues keep popping up... – Jens Jul 24 at 17:49
@Szabolcs Reported the Import bug to Wolfram [CASE:3391590]. – Jens Jul 24 at 18:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.