Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Creating a PDF graphic with Mathematica
Posted:
Jul 8, 2012 7:14 PM


Thanks to Jens and DanW for their suggestions.
Here's the outcome.
1. There was no problem with the Opacity setting. But I'll keep this in mind for the future. It's a great tip as it would never occur to me to check this.
2. Jens's code
> outlinedGraphics = First@ImportString[ > ExportString[graph, "PDF"], "PDF", "TextMode" > "Outlines"] > > Export["graphic.pdf", outlinedGraphics]
solved my problem. All the nonstandard fonts are embedded in the graphic and display correctly in Adobe Reader. Moreover, the IEEE graphic checker no longer complains about missing fonts.
I have to say that I am amazed by this code. Although I'm an experienced Mathematica user, it would not occur to me to do this to export a graphic to PDF.
The fact that Jens's code works better than Mathematica's builtin graphics export command is troubling. It suggests that Mathematica's exporttoPDF code is deficient. Embedding nonstandard fonts in the exported graphic should be standard procedure in Mathematica, but my experience with Jens's code says otherwise.
Incidentally, Jens's web page "Creating and PostProcessing Mathematica Graphics in Mac OSX" (http://pages.uoregon.edu/noeckel/MathematicaGraphics.html#OutlineFonts) is an amazing resource, which I have bookmarked.
Thanks again.
Raul Martinez
On Jun 29, 2012, at 1:49 AM, JUN wrote:
> On Wednesday, June 27, 2012 1:13:12 AM UTC7, R Martinez wrote: >> Hello, >> >> I created a PDF graphic that contains one character (the letter A ) from the TeX Gyre Chorus font. I created the graphic using Mathematica 8.0.4. >> >> Then I included the PDF graphic in a LaTeX document, and typeset the document correctly as a PDF file. I plan to submit the paper to an IEEE journaI. >> >> I'm having a problem because the PDF graphic fails to pass the test of the IEEE's online graphics checker. The graphics checker complains that the PDF graphic contains a nonstandard font that is not embedded in the PDF file. The graphic displays correctly in Preview. Adobe Reader displays everything correctly except the TeX Gyre character, for which Reader substitutes a Roman A. The fact that Reader displays incorrectly the TeX Gyre character incorrectly suggests that the font is not embedded in the PDF graphic. On the other hand, Preview's correct rendering suggests that the font is embedded in the graphic. >> >> The IEEE graphics checker also complains that other fonts such as Symbol and Times Bold are not embedded in the PDF graphic. But the Adobe Reader displays these fonts correctly. >> >> To confuse things even more, the IEEE has a separate online "PDF checker" where one uploads the entire typeset PDF document (including all the plots). So I uploaded (1) the entire document, and (2) just the PDF graphic. Both passed the tests of the PDF checker and were approved as correct. >> >> I tried converting the PDF graphic to EPS using an online converter to which one uploads the PDF graphic. The online converter works only with the graphics/font data contained in the PDF graphic. So all information used by the PDF > EPS converter must reside in the graphic itself. The conversion worked well for everything except the TeX Gyre character, for which it substituted a plain A, as Adobe Reader did. This suggests that the TeX Gyre character was not embedded in the PDF graphic. >> >> After creating a graph with the standard Mathematica Plot[ ] command, I used two methods to create the PDF graphic: >> >> (1) Export["graphic.pdf", graph], where graph is the name of the variable I gave to the output of Plot, i.e., graph = Plot[ ]; >> >> (2) Selected the graphic image on the notebook page, then used Menu > File > Save Selection As... > select the PDF format. >> >> Both methods produced the same results. >> >> Has anyone had a similar experience? If so, how did you resolve the issue? >> >> How do I make sure that all the fonts are embedded in the PDF graphic? >> >> I welcome all advice and suggestions. >> >> Thanks in advance. >> >> Cheers, >> >> Raul Martinez > > > What I almost always do for such cases is this: > > outlinedGraphics = First@ImportString[ > ExportString[graph, "PDF"], "PDF", "TextMode" > "Outlines"] > > Export["graphic.pdf", outlinedGraphics] > > For more details, see my web page: > http://pages.uoregon.edu/noeckel/MathematicaGraphics.html#OutlineFonts > > Jens >



