Firefox 1.5 PostScript printing will not work (no output)
Patch by leon.sha@sun.com
kherron+mozilla: review+
roc: superreview+
This commit is contained in:
leon.sha%sun.com 2006-04-29 08:27:24 +00:00
Родитель 6c8f21d4da
Коммит 558e3a4913
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -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);