Alignment and margins with text files
Jesse Stockall <[email protected]> Sat, 17 Apr 2004 17:44:40 -0400
| Newsgroups | gmane.linux.printing.general |
|---|---|
| Message-ID | <1082238280.3794.97.camel@localhost> |
When I print text files with 'lp file.txt' most of the first line is missing and characters on both sides of the page are missing. Printing a postscript file or printing using Mozilla or Evolution or any2ps is fine. The page is aligned properly and all text is visible. The CUPS test page shows all borders. Generating a postscript file with /usr/lib/cups/filter/texttops 1 user files 1 PageSize=Letter file.txt > file.ps and then printing with 'lp file.ps' works fine. If I print the /tmp/foomatic.rip.ps generated by 'lp file.txt' I get the same results as if I printed the text file directly. I've attached foomatic-rip.log. A visual comparison of /tmp/foomatic.rip.ps and the file manually created with texttops shows that the foomatic file has no margins at all. I'm using gs-esp 7.07.1 and CUPS 1.1.20 and foomatic 3.01 -- Jesse Stockall <[email protected]>
foomatic-rip.log
(text/plain, 14.1 KB)
foomatic-rip version $Revision: 3.43.2.2 $ running...
called with arguments: '84', 'jesse', 'files.lst', '1', ''
Parsing PPD file ...
*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
Added option ColorSpace
Added option PageSize
Added option PageRegion
Added option ImageableArea
Added option PaperDimension
Added option Resolution
Added option Font
Added option Margins
Parameter Summary
-----------------
Spooler: cups
Printer: Nan
PPD file: /etc/cups/ppd/Nan.ppd
Printer model: Canon BJ-200 Foomatic/bj200 (recommended)
Options:
Job title: files.lst
File(s) to be printed:
<STDIN>
================================================
File: <STDIN>
================================================
Reading PostScript input ...
--> This document is DSC-conforming!
-----------
Found: %%BeginProlog
Found: %%EndProlog
-----------
Found: %%BeginSetup
Inserting PostScript code for CUPS' page accounting
Found: %%BeginFeature: *Margins Default
Option: Margins=Default --> Option will be set by PostScript interpreter
Found: %%BeginFeature: *PageSize Letter
Option: PageSize=Letter --> Option will be set by PostScript interpreter
Found: %%BeginFeature: *Resolution 360x360dpi
Option: Resolution=360x360dpi --> Setting option
Found: %% FoomaticRIPOptionSetting: Resolution=360x360dpi
Option: Resolution=360x360dpi --> Setting option
Found: %%EndSetup
-----------
New page: 1 1
Inserting option code into "PageSetup" section.
No page header or page header not DSC-conforming
Flushing FIFO.
Starting renderer
JCL: <job data>
renderer PID kid4=18792
renderer command: gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=bj200 -r360x360 -sOutputFile=- -
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
foomatic-gswrapper: gs-esp '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=bj200' '-r360x360' '-sOutputFile=| cat >&3' '/dev/fd/0' 3>&1 1>&2
Closing renderer
KID3 exited with status 0
tail process done writing data to STDOUT
KID4 exited with status 0
Renderer exit stat: 0
KID4 finished
KID3 finished
Renderer process finished
$VAR1 = {
'prologprepend' => [],
'cupspagesetupprepend' => [],
'cmd' => 'gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=bj200%A%Z -sOutputFile=- -',
'currentcmd' => 'gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=bj200 -r360x360 -sOutputFile=- -',
'args' => [
{
'proto' => '%s',
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 0,
'style' => 'G',
'name' => 'ColorSpace',
'default' => undef,
'type' => ''
},
{
'userval' => 'Letter',
'section' => 'AnySetup',
'vals' => [
{
'comment' => 'US Letter',
'value' => 'Letter',
'driverval' => '<</PageSize[612 792]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A4',
'value' => 'A4',
'driverval' => '<</PageSize[595 842]/ImagingBBox null>>setpagedevice'
},
{
'comment' => '11x17',
'value' => '11x17',
'driverval' => '<</PageSize[792 1224]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A3',
'value' => 'A3',
'driverval' => '<</PageSize[842 1191]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A5',
'value' => 'A5',
'driverval' => '<</PageSize[421 595]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'B5 (JIS)',
'value' => 'B5',
'driverval' => '<</PageSize[516 729]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope #10',
'value' => 'Env10',
'driverval' => '<</PageSize[297 684]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope C5',
'value' => 'EnvC5',
'driverval' => '<</PageSize[459 649]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope DL',
'value' => 'EnvDL',
'driverval' => '<</PageSize[312 624]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope B5',
'value' => 'EnvISOB5',
'driverval' => '<</PageSize[499 709]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope Monarch',
'value' => 'EnvMonarch',
'driverval' => '<</PageSize[279 540]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Executive',
'value' => 'Executive',
'driverval' => '<</PageSize[522 756]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'US Legal',
'value' => 'Legal',
'driverval' => '<</PageSize[612 1008]/ImagingBBox null>>setpagedevice'
}
],
'notfirst' => 1,
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 100,
'vals_byname' => {
'EnvMonarch' => {},
'EnvDL' => {},
'Letter' => {},
'EnvC5' => {},
'A5' => {},
'A4' => {},
'Executive' => {},
'11x17' => {},
'A3' => {},
'EnvISOB5' => {},
'Env10' => {},
'Legal' => {},
'B5' => {}
},
'proto' => '%s',
'name' => 'PageSize',
'style' => 'G',
'default' => 'Letter',
'comment' => 'Page Size',
'currentpage' => 'Letter',
'type' => 'enum',
'header' => 'Letter'
},
{
'userval' => 'Letter',
'proto' => '%s',
'style' => 'G',
'name' => 'PageRegion',
'default' => 'Letter',
'section' => 'AnySetup',
'vals' => [
{
'comment' => 'US Letter',
'value' => 'Letter',
'driverval' => '<</PageSize[612 792]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A4',
'value' => 'A4',
'driverval' => '<</PageSize[595 842]/ImagingBBox null>>setpagedevice'
},
{
'comment' => '11x17',
'value' => '11x17',
'driverval' => '<</PageSize[792 1224]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A3',
'value' => 'A3',
'driverval' => '<</PageSize[842 1191]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'A5',
'value' => 'A5',
'driverval' => '<</PageSize[421 595]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'B5 (JIS)',
'value' => 'B5',
'driverval' => '<</PageSize[516 729]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope #10',
'value' => 'Env10',
'driverval' => '<</PageSize[297 684]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope C5',
'value' => 'EnvC5',
'driverval' => '<</PageSize[459 649]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope DL',
'value' => 'EnvDL',
'driverval' => '<</PageSize[312 624]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope B5',
'value' => 'EnvISOB5',
'driverval' => '<</PageSize[499 709]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Envelope Monarch',
'value' => 'EnvMonarch',
'driverval' => '<</PageSize[279 540]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'Executive',
'value' => 'Executive',
'driverval' => '<</PageSize[522 756]/ImagingBBox null>>setpagedevice'
},
{
'comment' => 'US Legal',
'value' => 'Legal',
'driverval' => '<</PageSize[612 1008]/ImagingBBox null>>setpagedevice'
}
],
'currentpage' => 'Letter',
'comment' => '',
'order' => 100,
'vals_byname' => {
'EnvMonarch' => {},
'EnvDL' => {},
'Letter' => {},
'EnvC5' => {},
'A5' => {},
'A4' => {},
'Executive' => {},
'11x17' => {},
'A3' => {},
'EnvISOB5' => {},
'Env10' => {},
'Legal' => {},
'B5' => {}
},
'type' => 'enum',
'header' => 'Letter'
},
{
'proto' => '%s',
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 0,
'style' => 'G',
'name' => 'ImageableArea',
'default' => undef,
'type' => ''
},
{
'proto' => '%s',
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 0,
'style' => 'G',
'name' => 'PaperDimension',
'default' => undef,
'type' => ''
},
{
'userval' => '360x360dpi',
'section' => 'AnySetup',
'vals' => [
{
'comment' => '180x180 dpi',
'value' => '180x180dpi',
'driverval' => ' -r180x180'
},
{
'comment' => '180x360 dpi',
'value' => '180x360dpi',
'driverval' => ' -r180x360'
},
{
'comment' => '360x180 dpi',
'value' => '360x180dpi',
'driverval' => ' -r360x180'
},
{
'comment' => '360x360 dpi',
'value' => '360x360dpi',
'driverval' => ' -r360x360'
}
],
'notfirst' => 1,
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 100,
'vals_byname' => {
'360x360dpi' => {},
'180x360dpi' => {},
'180x180dpi' => {},
'360x180dpi' => {}
},
'proto' => '%s',
'name' => 'Resolution',
'style' => 'C',
'default' => '360x360dpi',
'spot' => 'A',
'comment' => 'Resolution',
'currentpage' => '360x360dpi',
'type' => 'enum',
'header' => '360x360dpi'
},
{
'proto' => '%s',
'controlledby' => undef,
'fromcomposite' => undef,
'order' => 0,
'style' => 'G',
'name' => 'Font',
'default' => undef,
'type' => ''
},
{
'userval' => 'Default',
'proto' => '%s',
'style' => 'G',
'name' => 'Margins',
'default' => 'Default',
'vals' => [
{
'comment' => 'Driver Default',
'value' => 'Default',
'driverval' => ''
},
{
'comment' => 'Custom (set with \'alignmargins\')',
'value' => 'Custom',
'driverval' => '<</.HWMargins[18 18 18 8] /Margins[-90 -23]>>setpagedevice'
}
],
'notfirst' => 1,
'controlledby' => undef,
'currentpage' => 'Default',
'comment' => 'Page Margins/Offsets',
'fromcomposite' => undef,
'order' => 0,
'type' => 'enum',
'vals_byname' => {
'Default' => {},
'Custom' => {}
},
'header' => 'Default'
}
],
'args_byname' => {
'Font' => {},
'ImageableArea' => {},
'PageSize' => {},
'Resolution' => {},
'PaperDimension' => {},
'Margins' => {},
'PageRegion' => {},
'ColorSpace' => {}
},
'cupsfilter' => {
'application/vnd.cups-postscript' => 'foomatic-rip'
},
'setupprepend' => [],
'pagesetupprepend' => [],
'id' => 'Canon-BJ-200',
'driver' => 'bj200'
};
$VAR1->{'args'}[1]{'vals_byname'}{'EnvMonarch'} = $VAR1->{'args'}[1]{'vals'}[10];
$VAR1->{'args'}[1]{'vals_byname'}{'EnvDL'} = $VAR1->{'args'}[1]{'vals'}[8];
$VAR1->{'args'}[1]{'vals_byname'}{'Letter'} = $VAR1->{'args'}[1]{'vals'}[0];
$VAR1->{'args'}[1]{'vals_byname'}{'EnvC5'} = $VAR1->{'args'}[1]{'vals'}[7];
$VAR1->{'args'}[1]{'vals_byname'}{'A5'} = $VAR1->{'args'}[1]{'vals'}[4];
$VAR1->{'args'}[1]{'vals_byname'}{'A4'} = $VAR1->{'args'}[1]{'vals'}[1];
$VAR1->{'args'}[1]{'vals_byname'}{'Executive'} = $VAR1->{'args'}[1]{'vals'}[11];
$VAR1->{'args'}[1]{'vals_byname'}{'11x17'} = $VAR1->{'args'}[1]{'vals'}[2];
$VAR1->{'args'}[1]{'vals_byname'}{'A3'} = $VAR1->{'args'}[1]{'vals'}[3];
$VAR1->{'args'}[1]{'vals_byname'}{'EnvISOB5'} = $VAR1->{'args'}[1]{'vals'}[9];
$VAR1->{'args'}[1]{'vals_byname'}{'Env10'} = $VAR1->{'args'}[1]{'vals'}[6];
$VAR1->{'args'}[1]{'vals_byname'}{'Legal'} = $VAR1->{'args'}[1]{'vals'}[12];
$VAR1->{'args'}[1]{'vals_byname'}{'B5'} = $VAR1->{'args'}[1]{'vals'}[5];
$VAR1->{'args'}[2]{'vals_byname'}{'EnvMonarch'} = $VAR1->{'args'}[2]{'vals'}[10];
$VAR1->{'args'}[2]{'vals_byname'}{'EnvDL'} = $VAR1->{'args'}[2]{'vals'}[8];
$VAR1->{'args'}[2]{'vals_byname'}{'Letter'} = $VAR1->{'args'}[2]{'vals'}[0];
$VAR1->{'args'}[2]{'vals_byname'}{'EnvC5'} = $VAR1->{'args'}[2]{'vals'}[7];
$VAR1->{'args'}[2]{'vals_byname'}{'A5'} = $VAR1->{'args'}[2]{'vals'}[4];
$VAR1->{'args'}[2]{'vals_byname'}{'A4'} = $VAR1->{'args'}[2]{'vals'}[1];
$VAR1->{'args'}[2]{'vals_byname'}{'Executive'} = $VAR1->{'args'}[2]{'vals'}[11];
$VAR1->{'args'}[2]{'vals_byname'}{'11x17'} = $VAR1->{'args'}[2]{'vals'}[2];
$VAR1->{'args'}[2]{'vals_byname'}{'A3'} = $VAR1->{'args'}[2]{'vals'}[3];
$VAR1->{'args'}[2]{'vals_byname'}{'EnvISOB5'} = $VAR1->{'args'}[2]{'vals'}[9];
$VAR1->{'args'}[2]{'vals_byname'}{'Env10'} = $VAR1->{'args'}[2]{'vals'}[6];
$VAR1->{'args'}[2]{'vals_byname'}{'Legal'} = $VAR1->{'args'}[2]{'vals'}[12];
$VAR1->{'args'}[2]{'vals_byname'}{'B5'} = $VAR1->{'args'}[2]{'vals'}[5];
$VAR1->{'args'}[5]{'vals_byname'}{'360x360dpi'} = $VAR1->{'args'}[5]{'vals'}[3];
$VAR1->{'args'}[5]{'vals_byname'}{'180x360dpi'} = $VAR1->{'args'}[5]{'vals'}[1];
$VAR1->{'args'}[5]{'vals_byname'}{'180x180dpi'} = $VAR1->{'args'}[5]{'vals'}[0];
$VAR1->{'args'}[5]{'vals_byname'}{'360x180dpi'} = $VAR1->{'args'}[5]{'vals'}[2];
$VAR1->{'args'}[7]{'vals_byname'}{'Default'} = $VAR1->{'args'}[7]{'vals'}[0];
$VAR1->{'args'}[7]{'vals_byname'}{'Custom'} = $VAR1->{'args'}[7]{'vals'}[1];
$VAR1->{'args_byname'}{'Font'} = $VAR1->{'args'}[6];
$VAR1->{'args_byname'}{'ImageableArea'} = $VAR1->{'args'}[3];
$VAR1->{'args_byname'}{'PageSize'} = $VAR1->{'args'}[1];
$VAR1->{'args_byname'}{'Resolution'} = $VAR1->{'args'}[5];
$VAR1->{'args_byname'}{'PaperDimension'} = $VAR1->{'args'}[4];
$VAR1->{'args_byname'}{'Margins'} = $VAR1->{'args'}[7];
$VAR1->{'args_byname'}{'PageRegion'} = $VAR1->{'args'}[2];
$VAR1->{'args_byname'}{'ColorSpace'} = $VAR1->{'args'}[0];
Closing foomatic-rip.