I need to insert a PDF paragraph (from LaTeX) in a cell. I realized that the option "Insert file" does not work with PDF text.

Because I need resize the paragraph without quality loss, PNG image is not an option. So, my strategy is: Convert PDF to SVG with pdf2svg (Ubuntu's program)

pdf2svg pba.pdf  SALIDA%d.svg all

and text is converted to outlines, and after I save it in PDF format. The result is good and I can edit and make some adjusts with Drawing Tools.

enter image description here

But it no seems very efficent procedure. Is there another way to do it?

  • $\begingroup$ You could post that update as a self-answer (if you like). $\endgroup$
    – Szabolcs
    Jan 3, 2018 at 19:30

2 Answers 2


Mathematica always outlines text when Importing PDF as Graphics. There's no way around that. Update: There is the "TextOutlines" option, as Alexey notes in a comment below.

Some PDF files are not imported correctly by Mathematica. There can be multiple reasons for this. We would have to see your PDF file to see why it doesn't import correctly.

If the reason is indeed fonts, you can outline fonts using Ghostscript 9.15 or later. Example command line:

gs -o out.pdf -dNoOutputFonts -sDEVICE=pdfwrite in.pdf

I use this in MaTeX.

  • $\begingroup$ Thanks, I've tried your command line code and it works, I used the new PDF and I've been able to import the pdf without problems. To my purposes, the outlines text it's oK. I have also tried matex, and it is excellent for my purposes. Sincerely, thanks a lot $\endgroup$
    – wmora2
    Nov 3, 2016 at 1:47
  • 1
    $\begingroup$ "Mathematica always outlines text when Importing PDF as Graphics." - this isn't correct: try Import[fileName, "PDF", "TextOutlines" -> False]. For importing ASCII text it usually works nicely. $\endgroup$ Apr 30, 2017 at 12:44
  • $\begingroup$ Ok, I already did $\endgroup$
    – wmora2
    Jan 3, 2018 at 19:49

I use the tcolorbox package to work with paragraphs, examples, definitions, theorems, etc. Example:

enter image description here

<< MaTeX`
  "Preamble" -> {"\\usepackage[most,listings]{tcolorbox}", 
 Esta es una prueba con el paquete {\\tt tcolorbox }\\\\

 x^2       &si& x>0\\\\ \\\\
 \\sin x   &si& x<0
 $\\end{tcolorbox}}", Magnification -> 1.5]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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