Do you know how to scale everything in the pagesize

Either scale your EPS object ($e) as needed, and then place it slightly above y-pos zero (unless the origin is translated, [0,0] coincides with the physical left/bottom borders of the page (no margins), but most printers cannot fill the entire page, due to construction limits).  For example:

my $e = new PostScript::Simple::EPS(file => "body.eps", colour=>1); $e->scale(0.95); ... $p->importeps($e, 0,40);

Or use the alternative method importepsfile(...), which allows you to specify the lower left and upper right corner of a rectangle on the page into which the EPS content will be fit (i.e. autoscaled), e.g.

$p->importepsfile({overlap => 1}, "body.eps", 200,40, 200,800);

overlap => 1 keeps the aspect ratio as is, i.e. in this case, scaling will be done by the height (800 - 40 = 760), while the width (200 - 200 = 0) will be ignored.

(BTW, the former method seems to have a bug (or peculiarity) if the lower left corner of the EPS bounding box isn't 0,0 (in your case it's 238,1 for example — which is fine per se). In that case, this bounding box offset is added to the position that you specify with importeps(). This doesn't make much sense, IMHO, as you'll need to know the bounding box coordinates to position the thing in a predictable way — which makes it unnecessarily cumbersome...   (the importepsfile() method, OTOH, does handle this correctly, apparently).)


In reply to Re^3: create ps file with PostScript::Simple - cannot print it out? by almut
in thread create ps file with PostScript::Simple - cannot print it out? by cta

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.