Similar in approach (and based on) perl's PostScript::Simple.
Sample usage, importing and scaling an eps, drawing a line, adding text, and converting to pdf (from a program that uses pdftops in order to be able to arbitrarily draw on pdf pages).
ps = PostScript.new :orient => :portraitps.newpagescale = [(ps.h - 25.0) / x1, ps.w * 1.0 / x2, 1].minps.importepsfile epsfn, (ps.w - x2 * scale) / 2, ((ps.h - 25) - x1 * scale) / 2 + 25, :scale => scaleps.line 0, 25, ps.w, 25ps.setfont 'Helvetica-Bold', 12ps.text id, ps.w - 8,8, :align => :rightps.to_pdf 'output.pdf'
没有任何数据可供显示