[Ipe-discuss] PDF image import

Frank Siegert frank.siegert at cern.ch
Mon Mar 24 16:46:12 CET 2014


Dear Jerzy,

Thank you for the suggestions, and sorry for my late reply. I have now
managed to play with it a bit and have the following comments:

> I had also tried the epspdfipe.lua ipelet, but it did not work for me
>  -- text was not converted to outlines. Therefore, I use pstoedit,
> which converts text to polygons. My version contains something like:
> ..
> local tmpeps="ipelet.ps"
> local tmppdf="ipelet.pdf"
> local tmpipe="ipelet.ipe"
> local ret
> ret=_G.os.execute("pdf2ps " .. file .. " " .. tmpeps)
> ret=_G.os.execute("pstoedit -f pdf " .. tmpeps .. " " .. tmppdf)
> ret=_G.os.execute("pdftoipe " .. tmppdf .. " ".. tmpipe)
> file=tmpipe

In my case, the "pstoedit -f pdf" command simply drops part of the
text. For example, when applied to the attached orig.pdf, this
procedure looses the axis labels (-> new.pdf). And if I try with the
more sophisticated "pstoedit -f gs:pdfwrite" I get a complete PDF but
that doesn't convert properly to ipe anymore.

>>..Does everybody else who uses Ipe for
>> presentations create their images only through Ipe?
>
> For creating plots with the experimental data or function plots
> I use gle script (http://glx.sourceforge.net/) with:
> ..
> local glepdf="gle.pdf"
> local tmpeps="ipelet.ps"
> local tmppdf="ipelet.pdf"
> local tmpipe="ipelet.ipe"
> local ret
> ret=_G.os.execute("gle -device pdf -output " .. glepdf .. " " .. file)
> ret=_G.os.execute("pdf2ps " .. glepdf .. " " .. tmpeps)
> ret=_G.os.execute("pstoedit -f pdf " .. tmpeps .. " " .. tmppdf)
> ret=_G.os.execute("pdftoipe " .. tmppdf .. " ".. tmpipe)
> ..

I see, that seems to work indeed. Now if only I could make all my PDFs
with gle script! ;)


But coming back to my original question of a *universal* PDF import
tool: how are *raster* images currently embedded into the PDF output
technically (via Latex' includegraphics?) and displayed on screen (via
Qt's QImage?)?
Would it be possible to do something similar for PDFs, i.e. include
them in the PDF output through includegraphics and use poppler-qt's
renderToImage[0] for displaying on screen? Otfried, do you think the
code is accessible enough for somebody not too familiar with Qt (but
with C++) such that I can look into this myself? Is there any
documentation or version control repository?

Cheers,
Frank

[0] http://people.freedesktop.org/~aacid/docs/qt4/


More information about the Ipe-discuss mailing list