logo

Thread

logo
the fair gds editor

Introduction
Screenshots
License
Download
Userinterface
Function Index
White Papers
Community
Contact

Use your OpenID:

getopenID

mouse left
no help

Contribution: postscript output for LayoutEditor

by anonymous - 22 May 2009, 16:35 CEST

I was very unsatisfied by the postscript and pdf output produced by LayoutEditor. Currently, this function converts the design into png (with an unknown and uncontrolled resolution if printed into file: the "Print/Properties/Advanced" tab is empty) and then it converts it into postscript. As a result, the processing takes a lot of time, memory, and the output file is very large and not at all vectorial as one would expect.

However, LayoutEditor can export the drawing into SVG. Therefore I have written a script (written in awk) which converts this SVG file into (E)PS:

http://www.sci.muni.cz/~mikulik/comp/LESVG2ps.awk

It can output the drawing in its colours, in black on white or in white on black.

The conversion works very well if all objects can be closed and filled. Limitations of the postscript output are given by limitations of the LayoutEditor SVG output (see the header of this cript):
- Polygons: it is not written whether they are line bordered or filled. This script thus fills all of them.
- Text: scaling is fixed because LayoutEditor doesn't write it to SVG file.
- LayoutEditor does not write what's the bounding box of the whole drawing. Neither this script does this calculation.

Bugs found in LayoutEditor's SVG output:
- It outputs CRLF instead of LF on Linux.

I hope:
1. The above limitations can be fixed,
2. IMHO this awk code can be easily ported into C++ source code of LayoutEditor to produce the same output as this script. I've seen that the printing code of LayoutEditor is well structured so that the porting will be easy for its author.

Can we look forward to this new export?

Notes:
- Export to pdf can be done easily by ps2pdf.
- Export to pdf can be done easily also from within LayoutEditor using a code similar to the above postscript or svg by means of a free PDF C/C++ library, such as libharu, cairo (pdf or png output) or panda.

Greetings,
Petr Mikulik


*** Dr. Petr Mikulik, mikulik@physics.muni.cz
*** Department of Condensed Matter Physics
*** Masaryk University, Brno, Czech Republic
*** http://www.sci.muni.cz/~mikulik/

by Juergen Thies - 22 May 2009, 22:38 CEST

Thanks for your contribution. Polygon/box fill, text size and bounding box will be available with the next release.

A CRLF for a end of line is conform to the SVG specification. (http://www.w3.org/TR/SVG11/types.html) However i will make it configurable with the next release.

PS: I will review the eps script within the next days.

by Juergen Thies - 24 May 2009, 11:48 CEST

A postscript and eps export as a vector graphic will be available with the next release. There will be a additional export filter in the 'save as' dialog to access this few feature. The 'printing' function will continue to generate a rastered postscript file.

Both postscript option may have advantages: The vector postscript is smaller for small design and can be scaled. The raster postscript has always the same size independent of the size of the design. So it should be preferred for huge designs.


Please log in to post!