Closed Bug 172525 Opened 22 years ago Closed 21 years ago

[ps] print legal size page fails to set '<< /PageSize [612 1008] >> setpagedevice'

Categories

(Core :: Printing: Output, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: tgarland, Assigned: kherron+mozilla)

Details

Attachments

(1 file)

print legal size page fails to set '<< /PageSize [612 1008] >> setpagedevice' When printing or or sending print to file, the page size is not set. The output fails to print first 3" of text to the paper and the last 3" of the page is blank. Fix: When setting print properties for legal size paper Mozilla needs to include '<< /PageSize [612 1008] >> setpagedevice' (no quotes) After '%%BeginPageSetup' and before '%%EndPageSetup' when the filexx.ps is created. Thanks to ghostgum on us.open.project.net #ghostscript for the fix. Have Fun! - toga
Summary: print legal size page fails to set '<< /PageSize [612 1008] >> setpagedevice' → [ps] print legal size page fails to set '<< /PageSize [612 1008] >> setpagedevice'
This one should be easy
Assignee: rods → dcone
Confirmed with solaris nightly 2002121122. Postscript output doesn't contain a /PageSize setting. This setting is used to help the printer select the right size paper for printing.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → Future
CC:ing some possible interested hackers
Taking.
Assignee: dcone → kjh-5727
This adds code to the postscript header to set PageSize and ImagingBBox if the printer supports setpagesize. It uses PS level 1 syntax rather than the level 2 syntax described in the bug subject. It seems that the code for the %%BoundingBox comment was producing incorrect values for the top right corner. This is also fixed. I've tested this by generating portrait and landscape printouts and viewing them with ghostview. No problems were noted. However, I haven't had a chance to test these with a real PS printer; it'd be helpful if someone could do that.
Attachment #135001 - Flags: superreview?(tor)
Attachment #135001 - Flags: review+
Attachment #135001 - Flags: review?(timeless)
Attachment #135001 - Flags: review?(timeless)
Attachment #135001 - Flags: superreview?(tor) → superreview+
Checked in by timeless. Thanks, timeless! Resolving FIXED.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This patch seems to break printing on my HP Laserjet 4M plus under Suse linux 8.2. The printer just prints an error page with the message: ERROR: configurationerror OFFENDING COMMAND: setpagedevice removing the line "setpagedevice" from the postscript file will make the file print without problems. Kenneth you say "if the printer supports setpagesize" - how does the code attempt to find out about this?
Sorry, I investigated a bit more and found out that got it all wrong: the problem is really that the printer supports the setpagedevice all right, but prints this obscure message when I attempt to set the legal-size paper size. Using the A4 settings works well. Is there a (PS-version-)portable way to check if the printer allows the configuration change and if not, print a more user friendly message?
Johann, the most likely reason for that error is that the printer thinks it doesn't have the right size paper available. How are you supplying legal-sized paper to the printer? If it's through a paper cartridge, does the printer know that the cartridge contains that size paper? You might want to check the printer configuration and see what paper sizes it thinks are installed. If you want to read about the PageSize setting, the Postscript Language Reference Manual can be downloaded from <www.adobe.com/products/postscript/pdfs/PLRM.pdf>; the PageSize setting is discussed on page 401, and the possible recovery policies are on page 434. In principle, mozilla could override the printer's default recovery policy for this error, but I wouldn't be comfortable hardcoding a particular policy into mozilla, so it'd be necessary to put this under the user's control somehow. I think your best bet is to explore why your printer doesn't accept that paper size, and why it's responding to papersize problems in the least user-friendly way possible. We have an HP LJ 5si here; when I sent it a print job requesting A5 paper, it first asked me to load A5 through the sheet feeder, then offered to print the job on letter-size.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: