You can print a magic design by capturing a bitmap of the magic window and then sending it to the printer or including it in a document which is then printed. Alternatively you can use the dedicated magic plotting program, flea, which will usually give better results.
Create a PDF copy of a magic file
Flea creates postscript files in either black & white or colour.
To create a black & white postcript file "<cellname>.ps" for a magic design "<cellname>.mag" type:
flea -d PS <cellname>
or just
flea <cellname>
Alternatively for a colour plot:
flea -d PSc <cellname>
Now convert the PostScript file to PDF using the ps2pdf unix command:
ps2pdf <cellname>.ps
Check that the file has been correctly generated using the evince document viewer:
evince <cellname>.pdf &
This PDF file can then be included in a report or printed directly to the printer.
Print a copy of the cell
print -d <printername> <printfile>.pdf
You may like to make use of a number of additional options.
When you specify multiple options to flea, the options are grouped together followed by all the arguments for the different options. The following example combines the options "-d PSc", "-s 50" & "-r 2" to provide a colour postscript output file with a scale of 50 lamba/inch displaying the top two levels of the design hierachy:
flea -dsr PSc 50 2 inv_ld
Slightly better results may be obtained through customizing the flearc file which contols features like the page border and the title. (copy the file using "cp /opt/cad/designkits/ecs/flea/flearc .flearc" and then edit as appropriate).
The simplest customization is simply to remove the frame around the plot. This can be done be using an empty ".flearc" file in the directory in which you are running flea. The following example creates such an empty ".flearc" file and then creates a PDF file based on the the magic file "inv.mag":
echo > .flearc flea -d PSc inv ps2pdf inv.ps evince inv.pdf &
See the flea manual page for more info
man flea
Iain McNally
13-10-2022