Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #2367 > unrolled thread

Change paper size

Started byBogus@Embarq.com (Steve)
First post2015-10-21 12:01 +0000
Last post2016-06-03 23:18 -0700
Articles 11 — 7 participants

Back to article view | Back to comp.lang.postscript


Contents

  Change paper size Bogus@Embarq.com (Steve) - 2015-10-21 12:01 +0000
    Re: Change paper size Mark Carroll <mtbc@bcs.org> - 2015-10-21 13:30 +0100
    Re: Change paper size Michael Unger <spam.to.unger@spamgourmet.com> - 2015-10-21 16:55 +0200
      Re: Change paper size Bogus@Embarq.com (Steve) - 2015-10-21 17:16 +0000
        Re: Change paper size jdaw1 <jdawiseman@gmail.com> - 2015-10-21 15:20 -0700
          Re: Change paper size luser- -droog <mijoryx@yahoo.com> - 2015-10-29 18:16 -0700
            Re: Change paper size Michael Unger <spam.to.unger@spamgourmet.com> - 2015-10-30 15:43 +0100
              Re: Change paper size jdaw1 <jdawiseman@gmail.com> - 2015-10-31 02:55 -0700
              Re: Change paper size jdaw1 <jdawiseman@gmail.com> - 2015-10-31 04:35 -0700
                Re: Change paper size Antti Louko <alo@iki.fi> - 2015-10-31 15:39 +0200
              Re: Change paper size Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-03 23:18 -0700

#2367 — Change paper size

FromBogus@Embarq.com (Steve)
Date2015-10-21 12:01 +0000
SubjectChange paper size
Message-ID<c1.2b8.3ngr5w$05Y@NOVOSAD3.EMBARQ.COM>
Hi,

   I have an HP 2550 PostScript printer.  I recently wanted to use
legal paper in the manual feed to increase the size of an object
being printed to be cut out and folded.  Just feeding it the
larger paper did not work.  I went to the Hewlett Packard site
and got the Printer Job Language documents and succeeded in
changing the print area to legal from letter size.  I am wondering
what would be required for another brand of printer?  Looking at
the PostScript Language Reference Manual did not show an easy
way to do it at first glance.  There was mention of changing
entries in a dictionary, but that looked complex.

TIA,

Steve N.

[toc] | [next] | [standalone]


#2368

FromMark Carroll <mtbc@bcs.org>
Date2015-10-21 13:30 +0100
Message-ID<87io60s8tn.fsf@ixod.org>
In reply to#2367
Bogus@Embarq.com (Steve) writes:
(snip)
> I went to the Hewlett Packard site
> and got the Printer Job Language documents and succeeded in
> changing the print area to legal from letter size.  I am wondering
> what would be required for another brand of printer?  Looking at
> the PostScript Language Reference Manual did not show an easy
> way to do it at first glance.  There was mention of changing
> entries in a dictionary, but that looked complex.
(snip)

At the PostScript level I use,

/in { 72 mul } def

/width 8.5 in def
/height 14 in def

<< /PageSize [ width height ] >> setpagedevice

Of course, if your PostScript is being processed by something, it never
hurts to make sure the generated DSC comments match: look for any lines
starting %% with "PaperSize" somewhere in them.

-- Mark

[toc] | [prev] | [next] | [standalone]


#2369

FromMichael Unger <spam.to.unger@spamgourmet.com>
Date2015-10-21 16:55 +0200
Message-ID<d8ppi4F3864U1@mid.individual.net>
In reply to#2367
On 2015-10-21 14:01, "Steve" wrote:

>    I have an HP 2550 PostScript printer.  I recently wanted to use
> legal paper in the manual feed to increase the size of an object
> being printed to be cut out and folded.  Just feeding it the
> larger paper did not work.  I went to the Hewlett Packard site
> and got the Printer Job Language documents and succeeded in
> changing the print area to legal from letter size.  I am wondering
> what would be required for another brand of printer?  Looking at
> the PostScript Language Reference Manual did not show an easy
> way to do it at first glance.  There was mention of changing
> entries in a dictionary, but that looked complex.

I'm not quite sure if I'm understanding your problem correctly ...

In my own PostScript files there is a statement like

| << /PageSize [595.3 841.9]
| >> setpagedevice

at the very beginning, defining the current page size ("ISO A4",
portrait orientation, in this case).

If you want to enlarge the page content as well you'll have to include a
"scale" (and perhaps a "rotate") command at the beginning.

Michael

-- 
Real names enhance the probability of getting real answers.
My e-mail account at DECUS Munich is no longer valid.

[toc] | [prev] | [next] | [standalone]


#2370

FromBogus@Embarq.com (Steve)
Date2015-10-21 17:16 +0000
Message-ID<c1.2b8.3ngz4z$05Z@NOVOSAD3.EMBARQ.COM>
In reply to#2369
Hi,

Michael Unger <spam.to.unger@spamgourmet.com> writes:

>I'm not quite sure if I'm understanding your problem correctly ...
>
>In my own PostScript files there is a statement like
>
>| << /PageSize [595.3 841.9]
>| >> setpagedevice
>
>at the very beginning, defining the current page size ("ISO A4",
>portrait orientation, in this case).

   Thank you and Mark.  Using HP's Printer Control Language
seemed both brand specific and clunky.  I wanted a better
way to change paper size.  You both suggested the same method
to use PostScript to do that.  That should work on a different
brand of printer, which is what I wanted.  That it looks better
is a bonus.

Regards,

Steve N.

[toc] | [prev] | [next] | [standalone]


#2371

Fromjdaw1 <jdawiseman@gmail.com>
Date2015-10-21 15:20 -0700
Message-ID<0347b63b-f2d8-4be4-bf42-d3d4eeae7c52@googlegroups.com>
In reply to#2370
The following is slightly more pedantic about A4. 

/PageHeight 90000 127 div 2 sqrt sqrt mul def
/PageWidth  90000 127 div 2 sqrt sqrt div def
<< /PageSize [PageWidth  PageHeight] >> setpagedevice

Or, more concisely and efficiently but less clearly: 

<< /PageSize [90000 127 div 2 sqrt sqrt 2 copy div 3 1 roll mul] >> setpagedevice

[toc] | [prev] | [next] | [standalone]


#2372

Fromluser- -droog <mijoryx@yahoo.com>
Date2015-10-29 18:16 -0700
Message-ID<8ae7b56c-7f0a-4ac4-a228-cd4c90c11ad2@googlegroups.com>
In reply to#2371
Last time I had reason to define paper sizes, I did it like this.

/in {72 mul} bind def
/cm {in 2.54 div} def
/mm {cm 10 div} def

/A0 [ 841 mm 1189 mm ] def
/A1 A0 aload pop 2 div exch 2 array astore def
/A2 A1 aload pop 2 div exch 2 array astore def
/A3 A2 aload pop 2 div exch 2 array astore def
/A4 A3 aload pop 2 div exch 2 array astore def
/A5 A4 aload pop 2 div exch 2 array astore def
/letter [ 8.5 in 11 in ] def
/legal  [ 8.5 in 14 in ] def
/tabloid [ 11 in 17 in ] def

[toc] | [prev] | [next] | [standalone]


#2373

FromMichael Unger <spam.to.unger@spamgourmet.com>
Date2015-10-30 15:43 +0100
Message-ID<d9he30F2vudU1@mid.individual.net>
In reply to#2372
On 2015-10-30 02:16, "luser- -droog" wrote:

> [...]
> 
> /A0 [ 841 mm 1189 mm ] def
> /A1 A0 aload pop 2 div exch 2 array astore def
> /A2 A1 aload pop 2 div exch 2 array astore def
> /A3 A2 aload pop 2 div exch 2 array astore def
> /A4 A3 aload pop 2 div exch 2 array astore def
> /A5 A4 aload pop 2 div exch 2 array astore def

That's incorrect -- the standardized height and width of the paper
formats is a _rounded_ number of millimeters.

> [...]

Of course the official ISO standard isn't free (CHF 58, 9 pages).

Michael


[1] <https://en.wikipedia.org/wiki/ISO_216>
[2] <http://www.cl.cam.ac.uk/~mgk25/iso-paper.html>
[3]
<http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=36631>

-- 
Real names enhance the probability of getting real answers.
My e-mail account at DECUS Munich is no longer valid.

[toc] | [prev] | [next] | [standalone]


#2374

Fromjdaw1 <jdawiseman@gmail.com>
Date2015-10-31 02:55 -0700
Message-ID<f417450f-be73-4233-a418-7243fa2fd778@googlegroups.com>
In reply to#2373
> That's incorrect -- the standardized height and width of the paper
> formats is a _rounded_ number of millimeters.

Thank you. I will fix my code. 

[toc] | [prev] | [next] | [standalone]


#2375

Fromjdaw1 <jdawiseman@gmail.com>
Date2015-10-31 04:35 -0700
Message-ID<eeb7d47d-6f2d-40d9-86f0-c5fd1c8291f0@googlegroups.com>
In reply to#2373
> That's incorrect -- the standardized height and width of the paper
> formats is a _rounded_ number of millimeters.

Thank you. I have fixed my code.

[toc] | [prev] | [next] | [standalone]


#2376

FromAntti Louko <alo@iki.fi>
Date2015-10-31 15:39 +0200
Message-ID<5634C475.2030209@iki.fi>
In reply to#2375
jdaw1 wrote:
>> That's incorrect -- the standardized height and width of the paper
>> formats is a _rounded_ number of millimeters.
> 
> Thank you. I have fixed my code.
> 

How about this:

mark
2 sqrt
dup sqrt
(A#)
dup 1 1 getinterval
1000 25.4 div 72 mul
0 1 6 {
  2 index cvs pop
  0 index 4 index mul cvi
  1 index 5 index div cvi
  2 array astore
  3 index cvn exch def
  4 index div
} for
cleartomark

[toc] | [prev] | [next] | [standalone]


#2621

FromLawrence D’Oliveiro <lawrencedo99@gmail.com>
Date2016-06-03 23:18 -0700
Message-ID<53a6226d-d4c8-4449-92e1-4b5fd2e73fd8@googlegroups.com>
In reply to#2373
On Saturday, October 31, 2015 at 3:44:49 AM UTC+13, Michael Unger wrote:
> That's incorrect -- the standardized height and width of the paper
> formats is a _rounded_ number of millimeters.

Given the realities of the properties of paper, do you really expect to notice any difference?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web