Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a figure created with Inkscape as SVG and exported as PDF. When I view the PDF directly (e.g. in OS X Preview), it shows correctly. When embedding it in a LaTeX document, it has problems with gradients that go from opaque white to transparent. They appear matte white on the final PDF output (after pdflatex).

I am using the `baposter.cls' by Brian Amberg. The figures appear on colored column boxes. In the attached screenshot the figure is on the left side (showing the gradient), on the right side it is embedded into the poster (showing opaque white instead).

enter image description here

The colours don't seem to matter. I can have a red-to-transparent gradient, the same thing happens (renders matte red in the final PDF).


Now this comp.tex.pdf thread suggests it might be a problem of Ghostscript. I remember installing Ghostscript 9, I have these on my machine:

/opt/local/share/ghostscript/9.05
/usr/local/share/ghostscript/8.71

But TeXShop I think uses TeX Live (I'm on version 2010), and its manual says:

Because of the importance of Perl and Ghostscript, TEX Live includes ‘hidden’ copies of these programs.

Should I point TeX Live to the other Ghostscript location? Should I update TeX Live? Thanks

share|improve this question
2  
I'm afraid that this sounds off-topic. Essentially, it's an InkScape question, not a TeX one, although I do of course understand the wider link here. Perhaps one for SuperUser? –  Joseph Wright Jul 5 '12 at 7:49
    
Well, svg is a common tag, and there are various related questions. I did use Inkscape to create the file, but it displays perfect in Mozilla, so hardly anything with the SVG is wrong. I can delete the Inkscape tag, because it is about getting the SVG into my LaTeX file and showing properly, with whatever technique or program. –  Emit Taste Jul 5 '12 at 9:59
    
Updated to TeX Live 2011 (which says it uses Ghostscript 9.02) – "This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)". Still the same issue. –  Emit Taste Jul 5 '12 at 11:57
    
    
Can you give a link to your SVG file? My own tests show no problem. –  Paul Gaborit Jul 5 '12 at 22:28
show 4 more comments

2 Answers 2

up vote 3 down vote accepted

Here is my own tests (with your SVG file saved as PDF by inkscape). First test:

\documentclass[tikz]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \node[minimum size=10cm,fill=blue!30]%
  {\includegraphics[width=10cm]{event_pushc_transp}};
\end{tikzpicture}
\end{document}

Second test:

\documentclass{standalone}
\usepackage{graphicx}
\usepackage{xcolor}
\pagecolor{blue!30}
\begin{document}
\includegraphics[width=10cm]{event_pushc_transp}
\end{document}

And the result:

enter image description here

share|improve this answer
    
Thanks for testing, PolGab. I ran your small test documents -- I still don't get the gradient here. So which Inkscape version did you use to save the PDF? Mac users seem to be left out with 0.48.3 so far :-( –  Emit Taste Jul 6 '12 at 14:48
    
@EmitTaste My version is Inkscape 0.48.3.1 r9886 (Mar 29 2012). –  Paul Gaborit Jul 6 '12 at 20:49
    
This solves my issues with transparent gradients within included PDFs, but it no longer works if I use article instead of standalone. Is there a solution for articles? What's different? –  mangledorf Aug 23 '13 at 9:21
add comment

I can open the figure pdf in Adobe Acrobat Pro 9, use Save-As with option PDF->Optimized, and the re-written file now maintains the transparency within that file, but still not between the file and the outer PDF. So a workaround is to add an opaque rectangle with the desired background colour to the figure PDF, and re-write with Acrobat :-/

share|improve this answer
add comment

Your Answer

 
discard

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.