[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: label printing



> I would like to print labels. For this I'd generate N times some
> labels, with slight different content.  Then I have N *.eps file.

> Question. How do I merge them into one A4 postscript page?

> Options I have so far.

> * LaTex.  It is pain to do it, but once it's done, it's okay.

Actually, TeX proper (and LaTeX is just a TeX macro package) can't; all
it can do is drop a directive in the DVI that tells the DVI converter
to do something implementation-specific.  You then need a
DVI-to-PostScript converter that does what you want when it sees the
resulting \special in the DVI.

Also, where's the pain?  Is it not just a suitable \halign or \valign?

> * Postscript.  It should be possible to include *.eps into the main
> page.

That's what I'd recommend.

> Does anyone have any experience with Postscript programming?

Yes. :)

> Any other idea is welcome.  It would be nice if the solution was
> scriptable.

Creating PostScript is scriptable in principle, since PostScript is
just plain text (with suitable content - that is, PostScript is plain
text just as much as, for example, C is).

How easy is it?  If you're willing to make a few assumptions, such as
the amount you need to scale the labels by (which may be reasonable in
your case), then it's probably just a matter of catting together the
pieces of a template with the label files.  It might even be as simple
as doing

gsave NNN NNN translate NNN dup scale save
...label file 1 goes here...
restore grestore
gsave NNN NNN translate NNN dup scale save
...label file 2 goes here...
restore grestore
gsave NNN NNN translate NNN dup scale save
...label file 3 goes here...
restore grestore
...etc...
showpage

where the NNN things in the gsave...save lines are values you need to
work out to control where on the page the label files appear (first two
NNNs) and what sizes they are (third NNN).  In a proper general-purpose
solution these would be computed based on the bounding box of the EPS
file, but doing that may be more work than it's worth in this case.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse@xxxxxxxxxxxxxxxxxxxx
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user