LaserWriter IIf & IIg: PhotoGrade, RAM, and Image Size

When we print to the LaserWriter IIg, there is a half-inch margin around the outside of each page. We've been printing closer to the edge of the page with the LaserWriter IINT and IINTX. How can we adjust this on the LaserWriter IIg?

This information was provided by Claris Corporation on 16 March 1998, and incorporated into Apple Computer's Tech Info Library.

These margin differences are caused by the memory requirements of PhotoGrade. The LaserWriter IIg defaults to using PhotoGrade enhancement unless told otherwise. Because a letter-size image -- with PhotoGrade enabled -- needs a frame buffer four times larger than an unenhanced image, the LaserWriter reduces the image size as required. It reduces a letter-size buffer, which would use 3935376 bytes, to a lettersmall buffer that uses 3511296 bytes.

As shipped, the LaserWriter IIg has only enough memory for an a4small frame buffer with PhotoGrade enhancement. Without PhotoGrade enabled, it can easily handle a full legal-sized image, but must be expli explicitly instructed to do so. You can do this in a couple of ways:


- Disable Photograde If the PostScript operator for the required page size is included in the print job, the LaserWriter will disable PhotoGrade to maintain compatibility.

- Modify the Default Parameter You can modify the persistent parameter that forces the PhotoGrade default. This is probably not a good idea unless you find it easier than modifying the printing code. It is inconvenient, and modifies the persistent memory. You can modify the persistent memory a limited number of times before it wears out.

To request a specific page size and override PhotoGrade, include a reference to the required page size in the beginning of the print job. The different page size operators are listed below, along with their memory requirements with and without PhotoGrade enhancement.

PhotoGrade
  Page Size       Off       On
  -----------   -------   -------
  b5             741888   2967552
  lettersmall    877824   3511296
  a4small        924420   3697680
  letter         983844   3935376
  a4            1015872   4063488

  legal         1257344   5029376

If you print a job with no requested page size, the LaserWriter IIf and IIg use the default size of lettersmall. If the job specifies a size, the LaserWriter will try to honor it as closely as possible within its memory limitations. The following table depicts the page size substitution order.

Frame Buffer Substitution Order
  -------------------------------
  lettergray -> lettersmallgray -> letter -> lettersmall
  legalgray -> legal -> lettersmall
  a4gray -> a4smallgray -> a4 -> a4small
  b5gray -> b5


With the Apple LaserWriter IIf as shipped with 2MB, a request for a letter-size frame buffer results in a lettersmall buffer, the default. Requesting an a4 page results in an a4small buffer. The next table shows the maximum page size available for each memory configuration.

   MB     Largest Page Size
  --    -----------------
  2     a4small, PhotoGrade disabled
  4     legal, PhotoGrade disabled
  5     a4small, PhotoGrade enabled
  8     legal, PhotoGrade enabled


In summary, prepending the letter operator to the documents would be adequate. Or you can disable PhotoGrade one time, and leave it alone until you need it again later. Note that the non-volatile RAM used in both the LaserWriter IIf and IIg has a limit to the number of times it can be modified: approximately 50000 writes. While this is a large number, you could rapidly exceed it if the modification were sent with each page or job. Once this part wears out, the factory defaults will be used each time the LaserWriter is powered on.

The following three code segments show, respectively:
- The letter operator at the start of a job
- Code to disable PhotoGrade
- Code to enable PhotoGrade

code segment 1
%some sample PostScript with the letter operator prepended
letter
/Helvetica findfont 12 scalefont setfont
72 720 moveto
(This is a test) show

code segment 2
%Disable PhotoGrade.ps D.W. 11/91
%This code disables PhotoGrade enhancement after a couple of checks:
% Verifies that it's running on a LaserWriter IIg or IIf.

% Checks if PhotoGrade is already disabled - prevents NVRAM fatigue.
% (The memory device is limited to approximately 50000 writes.)

statusdict /product get dup
(LaserWriter IIf) ne exch (LaserWriter IIg) ne and
{ (Not a IIf or IIg and may not support PhotoGrade. Canceling.) =
stop
} if
currentpagedevice /PreRenderingEnhance get not
{ (PhotoGrade is already disabled on this LaserWriter) = }
{ serverdict begin 0 exitserver }
ifelse
vmstatus pop pop 0 eq
{ (Disabling PhotoGrade.) =
<</PreRenderingEnhance false>> setpagedevice
} if

code segment 3
%Enable PhotoGrade.ps D.W. 11/91
%This code enables PhotoGrade enhancement after a couple of checks:
% Verifies that it's running on a LaserWriter IIg or IIf.
% Checks if PhotoGrade is already enabled - prevents NVRAM fatigue.
% (The memory device is limited to approximately 50000 writes.)
% Also, let the user know if there isn't enough RAM for PhotoGrade.

statusdict /product get dup
(LaserWriter IIf) ne exch (LaserWriter IIg) ne and

{ (Not a IIf or IIg and may not support PhotoGrade. Canceling.) =
stop
} if
currentpagedevice /PreRenderingEnhance get
{ (PhotoGrade is already enabled on this LaserWriter.) = }
{ serverdict begin 0 exitserver }
ifelse
vmstatus pop pop 0 eq
{ statusdict /ramsize get exec 5242880 lt
{ (Enabling PhotoGrade, but it won't be used - 5MB required.) = }
{ (Enabling PhotoGrade.) = }
ifelse
<</PreRenderingEnhance true>> setpagedevice
} if

Published Date: Feb 18, 2012