Using a ROOT pdf in pdflatex

Hi,

I’m trying to include a pdf figure I made in ROOT in a pdflatex document, but it fails because of a font error. I’ve tried several ROOT fonts without success. If you’ve heard anything like this before or have any advice, I’d be grateful.

I’m running ROOT version 4.04/02. I’ve attached both pdf and C versions of the figure. I’ve also attached the tex file (as a txt to comply with allowed extensions). I run it with pdflatex (version 3.14159-1.10b (Web2C 7.4.5)) and get this error:

Error: pdflatex (file ./nuint_xsec_bnl.pdf): pdf inclusion: invalid font in reference type
==> Fatal error occurred, the output PDF file is not finished!

I look forward to hearing from you.
Thanks.
david cox
pdf_fig.txt (301 Bytes)
nuint_xsec_bnl.C (10.3 KB)
nuint_xsec_bnl.pdf (4.51 KB)

Hi,

Someone suggested that I print an eps and convert with epstopdf. This almost works (almost gives the nice vector lines of an eps) except the covnersion adds additional characters (the script R’s in the x10^-39 and in the arrow). I wonder if the issue in the original post is related to this.

Best,
David
nuint_xsec_bnl.pdf (14.8 KB)

Hello David,
I run your code (automatically produced by root) and get an eps file and convert it to pdf file. However, I cannot reproduce your error that has additional “R’s”. I tried both ROOT 4.04 and 5.08. I guess the problem may be from your original code or epstopdf? No idea.

Although I always use the way: root->eps->pdf, I heard people said for new version of ROOT, pdf file created directly from ROOT is working now. Maybe, you would like to try new version of ROOT.

Cheers,
Zhiyi.

[quote=“davicox”]Hi,

Someone suggested that I print an eps and convert with epstopdf. This almost works (almost gives the nice vector lines of an eps) except the covnersion adds additional characters (the script R’s in the x10^-39 and in the arrow). I wonder if the issue in the original post is related to this.

Best,
David[/quote]

Hi,

Thanks for taking a look at this. After I saw your reply, I tried running just the .C file (output by root), print to eps and then epstopdf. But that still gave me those weird “R’s”.

I also grabbed the latest epstopdf from CTAN, and that didn’t help.

I don’t suppose you’re doing anything fancier than canvas->Print(“file.eps”,“eps”) when you print the image?

Thanks again for trying stuff out.

Best.
david

I tried both
canvas->Print(“file.eps”,“eps”)
and
"save as… ".

No problem for me.

[quote=“davicox”]Hi,

Thanks for taking a look at this. After I saw your reply, I tried running just the .C file (output by root), print to eps and then epstopdf. But that still gave me those weird “R’s”.

I also grabbed the latest epstopdf from CTAN, and that didn’t help.

I don’t suppose you’re doing anything fancier than canvas->Print(“file.eps”,“eps”) when you print the image?

Thanks again for trying stuff out.

Best.
david[/quote]