From 558e3a4913c3897b66280608e3717512a5bb772b Mon Sep 17 00:00:00 2001 From: "leon.sha%sun.com" Date: Sat, 29 Apr 2006 08:27:24 +0000 Subject: [PATCH] Bug 324635 Firefox 1.5 PostScript printing will not work (no output) Patch by leon.sha@sun.com kherron+mozilla: review+ roc: superreview+ --- gfx/src/ps/nsPostScriptObj.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/src/ps/nsPostScriptObj.cpp b/gfx/src/ps/nsPostScriptObj.cpp index 973eb8ae843b..4da18827bb9f 100644 --- a/gfx/src/ps/nsPostScriptObj.cpp +++ b/gfx/src/ps/nsPostScriptObj.cpp @@ -1816,14 +1816,14 @@ nsPostScriptObj::write_script(FILE *aDestHandle) // Begin the script section. Set the correct paper size. fputs("%%BeginSetup\n", aDestHandle); fprintf(aDestHandle, + "%%%%BeginFeature: *PageSize %s\n" "/setpagedevice where\n" // Test for the feature - "{ pop 2 dict\n" + "{ pop 1 dict\n" " dup /PageSize [ %s %s ] put\n" // Paper dimensions - " dup /Policies 1 dict\n" - " dup /PageSize 3 put\n" // Select the nearest page size to fit - " put\n" " setpagedevice\n" // Install settings - "} if\n", + "} if\n" + "%%%%EndFeature\n", + mPrintSetup->paper_name, fpCString(NSTwipsToFloatPoints(mPrintContext->prSetup->width)).get(), fpCString(NSTwipsToFloatPoints(mPrintContext->prSetup->height)).get()); fputs("%%EndSetup\n", aDestHandle);