[Bug 231219] New: Printing margins lose text using lpr
https://bugzilla.novell.com/show_bug.cgi?id=231219 Summary: Printing margins lose text using lpr Product: openSUSE 10.2 Version: Final Platform: i686 OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Printing AssignedTo: jsmeix@novell.com ReportedBy: nick@nickengland.plus.com QAContact: jsmeix@novell.com When printing a document using lpr (and CUPS) at a command prompt the leftmost 3 characters and top 2 lines are lost. Setting 'page-left=0' and 'page-top=0' in ~/.lpoptions and /etc/cups/lpoptions makes no difference. By increasing page-left to 60 for example will increase the left margin and lose even more text. Applies to locally connected (USB) and remote (using SMB). Printer model = Epson C70+. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 jsmeix@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Comment #1 from jsmeix@novell.com 2007-01-02 04:57 MST ------- What is "a document"? Please attach a small document so that we have a chance to reproduce it. It works well for me for plain text e.g. via echo -e "One\nTwo\nThree" | lp -d <queue-name> and for PostScript e.g. via echo -e "One\nTwo\nThree" | a2ps -1 -o- | lp -d <queue-name> In general you must make sure in your application program which produces the document to print only inside the printable area of the particular model. The printing system does not and cannot move the content of the pages. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #2 from nick@nickengland.plus.com 2007-01-02 05:18 MST ------- Created an attachment (id=111260) --> (https://bugzilla.novell.com/attachment.cgi?id=111260&action=view) ascii test file Please see attached file test1. File contents - 12345671111111111111AAAAAAAAAAAA 12345672222222222222BBBBBBBBBBBB 12345673333333333333CCCCCCCCCCCC 12345674444444444444DDDDDDDDDDDD 12345675555555555555EEEEEEEEEEEE prints as - 45673333333333333CCCCCCCCCCCC 45674444444444444DDDDDDDDDDDD 45675555555555555EEEEEEEEEEEE -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #3 from nick@nickengland.plus.com 2007-01-02 05:34 MST ------- PS command used with above file : lpr -Pepsonc70 test1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #4 from jsmeix@novell.com 2007-01-02 05:40 MST ------- Attachment #111260 prints correct for me on an Epson Stylus Photo RX420 using the Gutenprint driver. Perhaps there may be a problem with the particular driver which you use for your model? We don't have an Epson Stylus C70+ so that we cannot reproduce it. According to http://openprinting.org/show_printer.cgi?recnum=Epson-Stylus_C70_plus the Stylus C70+ should work well when you select a Stylus C70. Does it happen only for plain text or also for PostScript? The YaST test page /usr/share/YaST2/data/printer/testpg.ps is special handcrafted PostScript which should fill up exactly the printable area (i.e. the so called "imageable area"), see the text at the bottom when you print out the test page. Does the test page print correctly using lpr -Pepsonc70 /usr/share/YaST2/data/printer/testpg.ps Please attach the PPD file /etc/cups/ppd/epsonc70.ppd which you use as mime type text/plain to this bug so that I can have at least a look. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #5 from nick@nickengland.plus.com 2007-01-02 06:25 MST ------- Created an attachment (id=111264) --> (https://bugzilla.novell.com/attachment.cgi?id=111264&action=view) ascii file requested /usr/share/YaST2/data/printer/testpg.ps prints correctly, with the 4 corner triangles approximately 8 mm in from the paper edge at the top and 17 mm at bottom. My test1 file starts printing at the same position as the top left corner triangle, so the print system has clipped off the characters that would be in that 8 mm margin, if printing had started at the physical paper edge. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #6 from jsmeix@novell.com 2007-01-02 07:17 MST ------- The imageable area defined in your PPD file ---------------------------------------------------------------------- *ImageableArea A4/A4: "24 48 571 818" ---------------------------------------------------------------------- matches exactly to the 8mm and 17mm (one PostScript point is 0.353mm and A4 paper size resp. A4 page region is "0 0 595 842") which are actually printed for you via the YaST test page. Therefore there is now the question why plain text doesn't get printed inside this imageable area for you. It works perfectly for me with my Epson Stylus Photo RX420. I get the topmost leftmost character '1' of your test text printed exactly inside the imageable area which is marked by the top left triangle of my PostScript test page). It is the CUPS filter /usr/lib/cups/filter/texttops which converts plain text into PostScript and then this is processed as any other PostScript by the rest of the filtering system (in particular by the actual printer driver), for general info and details see http://en.opensuse.org/SDB:CUPS_in_a_Nutshell http://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS Therefore it should not depend on the particular printer driver. But on the other hand your /usr/lib/cups/filter/texttops should do exactly the same as my /usr/lib/cups/filter/texttops because we use openSUSE final on i386 compatible 32-bit hardware. Please provide the PostScript output "test1.ps" and "test1a.ps" as attachments which result when you run /usr/lib/cups/filter/texttops job user title 1 options <test1 >test1.ps and when you run export LC_ALL="POSIX" export LANG="POSIX" /usr/lib/cups/filter/texttops job user title 1 options <test1 >test1a.ps Does test1.ps and/or test1a.ps print correctly for you? What results the following command: for p in $( rpm -qa | grep ^cups ) ; do \ echo $p ; rpm -q --changelog $p | head -n3 ; done -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #7 from nick@nickengland.plus.com 2007-01-02 11:48 MST ------- Created an attachment (id=111310) --> (https://bugzilla.novell.com/attachment.cgi?id=111310&action=view) Postscript output test1.ps and test1a.ps both produce the same results, all 5 lines are printed but with only the "1" missing from the left and with a top margin of 62 mm Results from for p in $( rpm -qa | grep ^cups ) ; do \ echo $p ; rpm -q --changelog $p | head -n3 ; done cups-client-1.2.7-3 * Thu Nov 16 2006 - kssingvo@suse.de - Upgrade to 1.2.7 (another bugfix version): * Documentation updates cups-libs-1.2.7-3 * Thu Nov 16 2006 - kssingvo@suse.de - Upgrade to 1.2.7 (another bugfix version): * Documentation updates cups-drivers-1.2.7-7 * Mon Nov 27 2006 - kssingvo@suse.de - another fix for gutenprint: A4 on some epson printers broken cups-1.2.7-3 * Thu Nov 16 2006 - kssingvo@suse.de - Upgrade to 1.2.7 (another bugfix version): * Documentation updates I tried the epsonc70.ppd file from Suse10.0 but it doesn't work at all, different format. I've tried experimenting with /etc/cups/ppd/epsonc70ppd - changed line #87 from *ImageableArea A4/A4: "24 48 571 818" to *ImageableArea A4/A4: "0 48 571 838" This solves the problem for my test1 file, it prints all characters starting at the 8mm margin but it doesn't solve a wider problem I have. I first noticed this problem with some financial printouts that are produced by programs which produce postscript output. On Suse 10.0 it works fine but it prints just 2mm from the left and right hand sides of the page and 6mm from the top. On 10.2 the left, right and top parts of each page are missing. Ideally I'd like the margins return to what they have been with previous releases so I don't have to rewrite all these report programs. Had a look at http://en.opensuse.org/SDB:CUPS_in_a_Nutshell and http://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS but nothing relevant to margins -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #8 from nick@nickengland.plus.com 2007-01-02 11:49 MST ------- Created an attachment (id=111311) --> (https://bugzilla.novell.com/attachment.cgi?id=111311&action=view) Postscript output -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #9 from jsmeix@novell.com 2007-01-03 04:37 MST ------- I mentioned the support database articles only for general info about how the filtering works in CUPS. In general margins (i.e. how much is left unprinted) belong to the application which produces the PostScript (see comment #2). For plain text this is the CUPS filter "texttops" which inspects the PPD file to learn about the imageable area but usually it is whatever user application which usually don't care about the imageable area in the PPD file - have a look at https://bugzilla.novell.com/show_bug.cgi?id=148707#c1 If your application produces PostScript with only 2mm margin, it will not print completely on very most printers. Use 1cm margin on top, left and right and 2cm at the bottom so that it can be printed completely on very most printers (many inkjet printers cannot print too close to the bottom because the transportation mechanics must hold the paper). To test "texttops" with a particular PPD, provide it as environment variable (see "man filter") e.g.: export PPD=/etc/cups/ppd/epsonc70.ppd /usr/lib/cups/filter/texttops job user title 1 options <test1 >test1.ps or export PPD=/usr/share/cups/model/Postscript.ppd.gz /usr/lib/cups/filter/texttops job user title 1 options <test1 >test1.ps Now you will get a DEBUG message regarding the imageable area like DEBUG: Page = 595x842; 18,36 to 577,806 and in the PostScript you will see that the actual output is printed with 18 PostScript points margin on the left using a 11.333 high sized font so that the first line should reach at most up to 806. --------------------------------------------------------------------- /FN /cupsNormal findfont [12.000 0 0 11.333 0 0] makefont def .. /N { FN setfont moveto } bind def .. /S { show } bind def .. 18 795.884 N(12345671111111111111AAAAAAAAAAAA)S --------------------------------------------------------------------- Note: 795.884 + 11.333 = 807.217 which looks to be too high but the origin of the glyphs in a font is the baseline of the characters. Regarding scaling of PostScript my comment #2 was not correct: Since CUPS 1.2 there is a "fitplot" option, see the CUPS documentation http://localhost:631/help/options.html?TOPIC=Getting+Started&QUERY=#FITPLOT ---------------------------------------------------------------------------- The -o fitplot option specifies that the document should be scaled to fit on the page: lp -o fitplot filename lpr -o fitplot filename The default is to use the size specified in the file. Note: This feature depends upon an accurate size in the print file. If no size is given in the file, the page may be scaled incorrectly! ---------------------------------------------------------------------------- For example to test use a tiny imageable area like *ImageableArea A4/A4: "144 216 451 626" in the PPD (to be safe restart cupsd after each change) and print /usr/share/doc/packages/ghostscript-library/examples/colorcir.ps and /usr/share/doc/packages/ghostscript-library/examples/tiger.eps with "-o fitplot" (it works only for tiger.eps). Perhaps "-o fitplot" works for your PostScript, perhaps not. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=231219 ------- Comment #10 from nick@nickengland.plus.com 2007-01-04 11:17 MST ------- lpr -oraw solves the problem. Thanks for your help. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com