I spent a saturday morning on this, so I hope at least it can be useful to someone else.
My problem is more generic; I have large drawings and a normal sized printer so I need to use a tiling utility. Alas, fig2dev doesn't understand .dxf files.
After much fiddling, I can print a full sized drawing as follows:
(for qcad 2.1.3.0 intel under OSX.4.8 )
If your drawing fits on an available papersize, set that papersize in (drawing prefs. Otherwise set to A4. (I have not tried custom sizes)
Fit the drawing to the page.
Note the scale factor if not one. Compute 1/scalefactor in your head
(well, ok, let's be user friendly and say you can use a calculator).
In print preview, print to pdf. (Note that printing to postscript results in a pdf file! This doesn't happen in Preview or other mac apps so I don't know what's going on there.)
From a shell prompt, convert the pdf to eps (NOT PS.) I modded pdf2ps into pdf2eps; I'll put that code at the end of this post.
sh ./pdf2eps infile.pdf
Now, at last, run poster on it:
poster -v -mletter -s<1/scalefactor> -w10% infile.eps > outfile.ps
the 10% is to deal with unprintable borders on my printer, you may have to adjust to suit. If you are using different sizes in your printer, set the -m option to suit. Note that the 1/scalefactor scales the drawing to the bounding box so the -m option is independent of the paper you saved to in qcad.
One more thing: preview won't open any of the postscript files. However, gs and gv (ghostscript and ghostview) both will. I use gv to print. gv requires that you're using X11, but that goes without saying.
(You can also print with "lpr outfile.ps", hopefully.)
I upgraded to GPL Ghostscript 8.56 (2007-03-14)
from
http://www.cs.wisc.edu/~ghost/doc/GPL/gpl856.htm
(dont forget the fonts directory; it goes in
/usr/local/share/ghostscript/fonts)
here is a link to poster:
http://www.geocities.com/SiliconValley/5682/poster.html
and got gv from fink commander, along with psutils
I hope that's as useful as it was painful!
Here's my hacked version of ps2eps; just paste it into a file named
ps2eps along with your drawings. Set permissions etc if you know how to do that. Otherwise, run as above.
- Code: Select all
#!/bin/sh
# modified from pdf2ps
# Convert PDF to encapsulated PostScript.
# This definition is changed on install to match the
# executable name set in the makefile
GS_EXECUTABLE=gs
OPTIONS=""
while true
do
case "$1" in
-?*) OPTIONS="$OPTIONS $1" ;;
*) break ;;
esac
shift
done
if [ $# -eq 2 ]
then
outfile=$2
elif [ $# -eq 1 ]
then
outfile=`basename "$1" \.pdf`.eps
else
echo "Usage: `basename $0` [-dASCII85EncodePages=false] [-dLanguageLevel=1|2|3] input.pdf [output.eps]" 1>&2
exit 1
fi
# Doing an initial 'save' helps keep fonts from being flushed between pages.
# We have to include the options twice because -I only takes effect if it
# appears before other options.
exec $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=epswrite "-sOutputFile=$outfile" $OPTIONS -c save pop -f "$1"