[Ipe-discuss] Transparency and pdftoipe

Arvind Ajoy arvindajoy at gmail.com
Mon Feb 21 18:00:21 CET 2011


Thank you for your email. I would like to mention that I have figured
out a method to import pdfs generated using sketch3D into ipe and
retain transparency. This might be useful for others with similar
needs.

1. Use the pdf2svg utility available from
http://www.cityinthesky.co.uk/opensource/pdf2svg to convert the pdf to
svg. The svg file contains the required transparency information.
2. Now convert the svg to ipe using svgtoipe.
3. The ipe file generated by svgtoipe unfortunately doesnt open in
ipe. Ipe reports that "Document could not be opened; parsing error at
position xxx". It looks like the ipe file includes an extra line in
the specification of closed paths. For example,

<path matrix="1 0 0 -1 -127.4 640.2" stroke="1 0 0" fill="0 0
0.545006" opacity="50%" pen="1.2" cap="0" join="1">
128.002 576.001 m
128.002 448.001 l
256.002 448.001 l
256.002 576.001 l
128.002 576.001 l
h
128.002 576.001 m

Deleting the line after h seems to solve the problem! Any text in the
pdf generated by sketch3d seems to be discarded by svgtoipe; apart
from this, the above procedure works well.

I am not sure whether the above error is due to pdf2svg or svgtoipe.
However, when I directly generate a figure in dia (and export to svg),
I find the same error as above. I do not know enough to pin point the
cause of the above extra line.

Regards

Arvind

On Mon, Feb 21, 2011 at 6:31 AM, Otfried Cheong <otfried at ipe.airpost.net> wrote:
> On 02/21/2011 04:00 AM, Arvind Ajoy wrote:
>>
>> At present, I am trying to include some pdfs generated using sketch3D
>> (http://www.frontiernet.net/~eugene.ressler/) into Ipe. Sketch3D uses
>> Tikz and pdflatex to draw. It includes support for transparency. Some
>> examples of sketch3D output are available at
>> http://www.fauskes.net/nb/introduction-to-sketch/. However, when I
>> convert the pdf to ipe using pdftoipe, I find that information
>> regarding transparency gets lost.
>
> pdftoipe is a very limited tool, and does not support transparency.  (I
> think when it was first written transparency did not yet exist in PDF.
> Certainly long before Ipe had transparency.  pdftoipe has hardly changed
> since then.)
>
> It would certainly be a nice project to add transparency to pdftoipe. In
> this case, however, I think it would actually be more useful to add an Ipe
> backend to sketch.   This should be quite easy, as sketch already has two
> backends, and Ipe can represent anything pstricks or TIKZ can represent
> easily.
>
> Maybe I should start a list with useful projects to work on the Ipe wiki
> (and advertise it for undergraduates as graduation projects).
>
> Cheers,
>  Otfried
>
>



More information about the Ipe-discuss mailing list