On 10/30/2017 05:34 AM,
Our OpenGL printing work flow is currently mostly based on the conversion
of EPS files generated by GL2PS into other formats through the use of
Ghostscript (for raster formats and pdf) and pstoedit/fig2dev for other
vector formats such as xfig, emf ... The only exceptions are
pdflatex(standalone), which directly makes use of GL2PS native pdf
format, and svg. See attached file for a summary.
This conversion chain inherits all the limitations of the original EPS
* Only 127 ascii characters are supported
* Only the 14 base fonts can be used
* Transparency is not handled at all
On the other hand we have a pretty full-featured SVG output. I thus wrote
a Qt based program that converts SVG from GL2PS (it is in no way a
general purpose svg converter, see http://savannah.gnu.org/bugs/?52193)
to PDF, and I would like to know if there is interest in adding this
program to Octave?
My idea would be to replace the EPS->Ghostscript chain to
SVG->PDF->Ghostscript for the following final formats: any Ghostscript
raster format (jpg, png, pbm, ...) and pdf (go through Ghostscript to
setup the surrounding page). For "pdfwrite" (no surrounding page) we
would simply use SVG->PDF conversion.
This seems like a good idea to me. I like the fact that it might get rid
of the tesselation lines in the pdf output as well, and it would handle
That is an important point I forgot to mention. The converter also tries to
triangles to form larger polygons when possible. In practice it works very
only for 2D figures (probably worth more than 99% of the use case (100% in
For 3D figures, there is a noticeable improvement but surfaces are still
Note that there is a much better candidate for solving this tesselation
lines issue in 3D which is
using the native PDF format (see ), but this format has a number of
and it does not solve our problem (mine at least) with text handling.
** - Solved: text alignment (dev), image scaling (latest release)
- Unsolved I know about: line transparency not supported, not all pdf
renderers support the way gl2ps writes transparent polygons, lit surfaces
sometimes rendered with "holes".