Re: printing outside browser cuts off top and bottom of page

2010-08-26 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Tue Aug 24 16:31:11 2010
 Date: Tue, 24 Aug 2010 14:31:29 -0700
 From: Chip Camden sterl...@camdensoftware.com
 To: FreeBSD Questions freebsd-questions@freebsd.org
 Subject: Re: printing outside browser cuts off top and bottom of page


 --ZYOWEO2dMm2Af3e3
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable

 Quoth Chad Perrin on Tuesday, 24 August 2010:
  On Tue, Aug 24, 2010 at 02:04:32PM -0700, Chip Camden wrote:
  =20
   I'm not seeing that here, but I don't have a PDF that prints data in the
   margins.  If you have one, can you email it to me?
 =20
  I don't think it prints to the margins, per se.
 =20
  I also know that it's not particular to the printer, since my
  girlfriend's laptop (running Ubuntu) prints the same PDF just fine.
 =20
  I'll send the specific PDF I've been trying to print lately, off-list.
 =20
  --=20
  Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

 Well, if it makes you feel any better, it does the same thing here
 (truncates top and bottom).

 Looks like CUPS is addressing the page as if there were no unprintable
 areas on the page (i.e., it's scaled to fit an 8-1/2 x 11 piece of paper
 exactly) rather than squeezing it into the printable area.  I'm afraid I
 don't know enough about CUPS to say any more.

What are the chances that that those 'problem' PDFs are designed for a
slightly _different_ paper size, and CUPS is -nto- 'scaling' to fit the
actual paper size?

I don't know diddly-squat about CUPS, but this sounds an awful lot like
what happens when a printer has 'letter' paper loaded, but has been told
that it has size 'A4' paper.

Look for configuration settings in whatever is doing the Postscript/PDF
rendering, with regard to 'substiting' one paper size for another.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-26 Thread Chad Perrin
On Wed, Aug 25, 2010 at 02:42:18PM -0600, Warren Block wrote:
 On Wed, 25 Aug 2010, Chad Perrin wrote:
 
 I was not entirely sure before today whether the 4050N could handle
 straight PostScript instead of PCL, but the test I performed using nc to
 see if it would print properly involved using pdf2ps and no other file
 format transformations, so it seems PS is fine in this case.
 
 The LJ4050 is a great printer.  The PS emulation works well and it's 
 very smart about paper trays and input.  Sort of the Douglas DC3 of 
 lasers; I know of a couple with page counts over a million.
 
 For further information on lpd and filters, let me repost the link to my 
 lpd article, which I really should have posted yesterday but forgot:
 
 http://www.wonkity.com/~wblock/docs/html/lpdprinting.html

Thanks.  I'll be looking into lpd as a solution to my CUPS problem, since
there still doesn't appear to be an easy fix for CUPS.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpyDD4yAOtEo.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-26 Thread Chad Perrin
On Thu, Aug 26, 2010 at 01:31:06AM -0500, Robert Bonomi wrote:
 
 What are the chances that that those 'problem' PDFs are designed for a
 slightly _different_ paper size, and CUPS is -nto- 'scaling' to fit the
 actual paper size?

When printing via a method that bypasses CUPS (using netcat), it prints
just fine -- and does not fit within the confines of the top and bottom
margins that are cutting off the content when printing via CUPS.  The PDF
does extend outside of what might be considered reasonable margins for
something like an interoffice memo, but does not run all the way to the
edges of the paper; CUPS just doesn't want to print as far north and
south as the PDF's content goes, evidently.


 
 I don't know diddly-squat about CUPS, but this sounds an awful lot like
 what happens when a printer has 'letter' paper loaded, but has been told
 that it has size 'A4' paper.

CUPS in this case has definitely been told it has US Letter size paper.


 
 Look for configuration settings in whatever is doing the Postscript/PDF
 rendering, with regard to 'substiting' one paper size for another.

This has been addressed in other discussion in this thread.  It is likely
pdf2ps (part of ghostscript) that is doing the translation to PostScript;
the other alternative is pdftops.  Both of them provide a complete
PostScript file, with all content on the page, but when either the PDF or
the PS output of either of those tools is printed using CUPS the same
problem arises.  Using pdf2ps to produce PS output, which is then sent to
the printer using netcat, produces a neatly printed page with no
problems, however -- other than the minor problem that I'm using netcat
to send jobs to my printer rather than a front end for a proper printing
queue.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpB9LZu95btm.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Chad Perrin
On Tue, Aug 24, 2010 at 06:12:40PM -0600, Warren Block wrote:
 On Tue, 24 Aug 2010, Chad Perrin wrote:
 
 CUPS is a black box to me, filled with black magic.
 
 Me too.  That's why I use lpd.

I'm considering it, at least for this laptop.  Still, it would be nice to
know how to fix this problem for cases where CUPS is a better fit.


 
 Could you send me the PDF?

sent off-list


 
 As Chip Camden noted, it could be a problem with the printable area not 
 being correct.  CUPS should get that information from a PPD file--I 
 think.  Do you have the correct PPD installed...er...wherever it should 
 be installed?  Or maybe that's automatic, and you just need to set CUPS 
 to the right printer.

Support for the 4050 series was available with the default install.  I
just picked it from a list when setting up CUPS.  That's one of the
things I like about these well-known network attached HP PostScript laser
printers.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpiIekfJc5iO.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Chad Perrin
On Tue, Aug 24, 2010 at 08:33:34PM -0700, Chip Camden wrote:
 Quoth Warren Block on Tuesday, 24 August 2010:
  
  It appears that PPDs are stored in the reasonably-named 
  /usr/local/etc/cups/ppd.  There's a PPD for the LJ4050 in 
  print/foomatic-db...
  
  And it has
*ImageableArea Letter/Letter: 12.24 12.06 599.76 780.06
  
  12-point margins on that printer sound about right.
 
 Mine had 18 and 36 for the first two (for an OfficeJet 7310).  I tried
 doubling them but that didn't seem to make a difference.  Did I need to
 restart something to get that to take effect?

I suspect those correspond to the margin settings in GtkLP, but fiddling
with those settings has zero observable effect on printing.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgp4mslQs3oLB.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Polytropon
On Tue, 24 Aug 2010 18:12:40 -0600 (MDT), Warren Block wbl...@wonkity.com 
wrote:
 On Tue, 24 Aug 2010, Chad Perrin wrote:
 
  On Tue, Aug 24, 2010 at 03:49:24PM -0600, Warren Block wrote:
 
  The LJ4050 is a great printer, but it doesn't print PDFs natively.
 
  So you need to find what CUPS is using to convert PDFs to PostScript and
  adjust that.  It may be an A4 to letter conversion, or it's trying to
  intelligently scale the page to fit your printer.
 
  CUPS is a black box to me, filled with black magic.
 
 Me too.  That's why I use lpd.

If your printer can do PS, you don't need CUPS; lpd does everything.

If you just need to convert printing output (which traditionally *is*
PS) to PCL, you might be interested in using apsfilter. It's a lot
more lightweight than CUPS, better documented, faster, easier to
use. I do use it successfully with my HP Laserjet 4000 duplex, which's
PS is slower than its PCL, so I use PCL. I also think that apsfilter
keeps better to the tradidion and principles of UNIX, and it integrates
better with the FreeBSD OS.

\end{advocate} :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Warren Block

On Wed, 25 Aug 2010, Chad Perrin wrote:


On Tue, Aug 24, 2010 at 08:33:34PM -0700, Chip Camden wrote:

Quoth Warren Block on Tuesday, 24 August 2010:


It appears that PPDs are stored in the reasonably-named
/usr/local/etc/cups/ppd.  There's a PPD for the LJ4050 in
print/foomatic-db...

And it has
  *ImageableArea Letter/Letter: 12.24 12.06 599.76 780.06

12-point margins on that printer sound about right.


Mine had 18 and 36 for the first two (for an OfficeJet 7310).  I tried
doubling them but that didn't seem to make a difference.  Did I need to
restart something to get that to take effect?


I suspect those correspond to the margin settings in GtkLP, but fiddling
with those settings has zero observable effect on printing.


Applications should be able to get those values from the PPD.

The PDF in question has a top margin of 18 points, a bottom margin of 21 
points, and a printed area height and width of about 576 and 755.  It 
fits within the printable area of most lasers, and prints fine on my 
LJ4250.  The bottom will be cut off on a lot of inkjets due to their 
paper feed.


For another test, use pdf2ps and feed the PS output directly to the 
printer, bypassing CUPS.  If the LJ4050N Ethernet is connected (and it 
really should be), you can use nc something like this (untested):


  # pdf2ps test.pdf - | nc lj4050hostname 9100

If that has cut off margins, it's a setting within the printer.
If it prints fine, it's CUPS.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Chad Perrin
On Wed, Aug 25, 2010 at 07:57:29AM -0600, Warren Block wrote:
 
 For another test, use pdf2ps and feed the PS output directly to the 
 printer, bypassing CUPS.  If the LJ4050N Ethernet is connected (and it 
 really should be), you can use nc something like this (untested):
 
   # pdf2ps test.pdf - | nc lj4050hostname 9100
 
 If that has cut off margins, it's a setting within the printer.
 If it prints fine, it's CUPS.

That test worked out beautifully.  Apparently, it is a problem with CUPS
settings.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpcPPG7sjDYE.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Chad Perrin
On Wed, Aug 25, 2010 at 11:38:52AM +0200, Polytropon wrote:
 
 If your printer can do PS, you don't need CUPS; lpd does everything.
 
 If you just need to convert printing output (which traditionally *is*
 PS) to PCL, you might be interested in using apsfilter. It's a lot
 more lightweight than CUPS, better documented, faster, easier to
 use. I do use it successfully with my HP Laserjet 4000 duplex, which's
 PS is slower than its PCL, so I use PCL. I also think that apsfilter
 keeps better to the tradidion and principles of UNIX, and it integrates
 better with the FreeBSD OS.

Is there much I'd need to know about apsfilter to use it with lpd?  It
seems to just be a filter used to process input and dump output, probably
used in combination with lpr via pipes -- am I wrong about that?  If
that's the case, I'm sure it would be pretty straightforward.

I was not entirely sure before today whether the 4050N could handle
straight PostScript instead of PCL, but the test I performed using nc to
see if it would print properly involved using pdf2ps and no other file
format transformations, so it seems PS is fine in this case.  I'd still
like to understand how to solve the problem I'm having with CUPS, for my
own edification, but whether I use the fix on this laptop in the long run
or end up switching to lpd (with or without apsfilter) is still under
consideration.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpkJFnHlC8t8.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Chip Camden
Quoth Chad Perrin on Wednesday, 25 August 2010:
 On Wed, Aug 25, 2010 at 07:57:29AM -0600, Warren Block wrote:
  
  For another test, use pdf2ps and feed the PS output directly to the 
  printer, bypassing CUPS.  If the LJ4050N Ethernet is connected (and it 
  really should be), you can use nc something like this (untested):
  
# pdf2ps test.pdf - | nc lj4050hostname 9100
  
  If that has cut off margins, it's a setting within the printer.
  If it prints fine, it's CUPS.
 
 That test worked out beautifully.  Apparently, it is a problem with CUPS
 settings.
 
 -- 
 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

It didn't work at all for my OfficeJet.  Apparently that printer doesn't
know PostScript, because all I got was a bunch of garbage with some
PostScript commands mixed in.

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpM319Oxjqdx.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Polytropon
On Wed, 25 Aug 2010 09:27:20 -0600, Chad Perrin per...@apotheon.com wrote:
 Is there much I'd need to know about apsfilter to use it with lpd? 

No, just make sure to compile it with options

PAGE=A4
PAPERSIZE=a4
A4=yes

in /etc/make.conf if you need ISO A4 support. It is basically
dialog-driven (/usr/local/share/apsfilter/SETUP) and self-explaining.
Just select printer name, connection, paper, and quality. If you
want to add specific GS options (it uses Ghostscript to convert
PS into printer languages, such as PCL), you can do this via an
easy configuration file, e. g. that's the way I got my duplexer
working correctly.



 It
 seems to just be a filter used to process input and dump output, probably
 used in combination with lpr via pipes -- am I wrong about that? 

That's right; in /etc/printcap, there are references to apsfilter
only; here's an example:

Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
:lp=/dev/lpt0:\
:if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
:sd=/var/spool/lpd/Laserjet:\
:lf=/var/spool/lpd/Laserjet/log:\
:af=/var/spool/lpd/Laserjet/acct:\
:mx#0:\
:sh:

This is created by the apsfilter SETUP program, so no need to deal
with this manually (but you CAN if you want to); apsfilter keeps its
config in /usr/local/etc/apsfilter. To extent the example started,
I have /usr/local/etc/apsfilter/Laserjet/apsfilterrc:

PRINTER='ljet4d'
PAPERSIZE='a4'
METHOD='auto'
QUALITY='high'
COLOR='full'
RESOLUTION='600x600'
INTERFACE='parallel'
GS_FEATURES='-q -dBATCH -dFIXEDMEDIA -dPARANOIDSAFER -dQUIET
-dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs 
-sDeviceManufacturer=HEWLETT-PACKARD 
-sDeviceModel=HP LaserJet -dDuplex=true 
-dIjsUseOutputFD -sPAPERSIZE=a4 -r600'
HARDWARE_DUPLEX=set
DUPLEX=duplex

It's basically a repeatition from /etc/printcap so the filters used
by apsfilter itself can be properly configured. A central file is
also present as /usr/local/etc/apsfilter/apsfilterrc where you can
configure recoders, filters, pretty printing and other stuff, e. g.
you can just

% lpr foo.png

to print a picture, or

% grep void bar.c | lpr

to get some stylish pretty printed output. (By the way, I did switch
that off as it de-arranges source code.)



 If
 that's the case, I'm sure it would be pretty straightforward.

It's a quite old program complex, but yes - it never failed on getting
my old printers working that CUPS didn't even support. Just try to
add a parallel printer with CUPS that is currently *not* connected
and therefore *not* online. :-)



 I was not entirely sure before today whether the 4050N could handle
 straight PostScript instead of PCL, but the test I performed using nc to
 see if it would print properly involved using pdf2ps and no other file
 format transformations, so it seems PS is fine in this case. 

If PS is fast enough - use it, and get rid of the overhead bloat.
In my case, I intendedly wanted to use PCL as PS works, but is too
slow in comparison to PCL.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Warren Block

On Wed, 25 Aug 2010, Chip Camden wrote:


Quoth Chad Perrin on Wednesday, 25 August 2010:

On Wed, Aug 25, 2010 at 07:57:29AM -0600, Warren Block wrote:


For another test, use pdf2ps and feed the PS output directly to the
printer, bypassing CUPS.  If the LJ4050N Ethernet is connected (and it
really should be), you can use nc something like this (untested):

  # pdf2ps test.pdf - | nc lj4050hostname 9100

If that has cut off margins, it's a setting within the printer.
If it prints fine, it's CUPS.


That test worked out beautifully.  Apparently, it is a problem with CUPS
settings.


It didn't work at all for my OfficeJet.  Apparently that printer doesn't
know PostScript, because all I got was a bunch of garbage with some
PostScript commands mixed in.


Very few inkjets understand PS.  But ghostscript may have a built-in 
driver for it which can be used like the ps2pcl filter in my lpd 
article.  Maybe you'll find some of the rest of it useful:


http://www.wonkity.com/~wblock/docs/html/lpdprinting.html#_adding_a_filter

There are also the hplip and hpijs ports.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-25 Thread Warren Block

On Wed, 25 Aug 2010, Chad Perrin wrote:


I was not entirely sure before today whether the 4050N could handle
straight PostScript instead of PCL, but the test I performed using nc to
see if it would print properly involved using pdf2ps and no other file
format transformations, so it seems PS is fine in this case.


The LJ4050 is a great printer.  The PS emulation works well and it's 
very smart about paper trays and input.  Sort of the Douglas DC3 of 
lasers; I know of a couple with page counts over a million.


For further information on lpd and filters, let me repost the link to my 
lpd article, which I really should have posted yesterday but forgot:


http://www.wonkity.com/~wblock/docs/html/lpdprinting.html
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chip Camden
Quoth Chad Perrin on Tuesday, 24 August 2010:
 I'm using CUPS on FreeBSD 8.0, and any time I try to print from outside
 Firefox the top and bottom of a PDF gets cut off.  I don't have any means
 installed for printing a PDF from inside Firefox, but Webpages and the
 CUPS test page print just fine from within the browser.  For instance:
 
 /usr/local/bin/lpr -P 4050N sheet.pdf
 
 (using an HP 4050N printer)
 
 This results in the top and bottom edge of the PDF getting cut off.  I've
 tried tweaking settings in GUI tools such as GtkLP to try to force it to
 print the PDF at a smaller size on the page so it would fit within the
 cut-off points, and it still prints exactly the same way.  I've tried
 adjusting margins in such GUI tools as well, to no avail.  Trying to
 print from Xpdf produces the same problematic results.
 
 If there's a command line solution to this, I haven't encountered it.
 
 Where should I start looking to figure out the problem?  Unfortunately,
 it looks like the FreeBSD Handbook only deals with lpd.
 
 -- 
 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

I'm not seeing that here, but I don't have a PDF that prints data in the
margins.  If you have one, can you email it to me?

I'm using CUPS, too, but printing to an HP OfficeJet 7310.


-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpTrqgGWesfx.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chad Perrin
On Tue, Aug 24, 2010 at 02:04:32PM -0700, Chip Camden wrote:
 
 I'm not seeing that here, but I don't have a PDF that prints data in the
 margins.  If you have one, can you email it to me?

I don't think it prints to the margins, per se.

I also know that it's not particular to the printer, since my
girlfriend's laptop (running Ubuntu) prints the same PDF just fine.

I'll send the specific PDF I've been trying to print lately, off-list.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgp7iG4wnA2Ts.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chip Camden
Quoth Chad Perrin on Tuesday, 24 August 2010:
 On Tue, Aug 24, 2010 at 02:04:32PM -0700, Chip Camden wrote:
  
  I'm not seeing that here, but I don't have a PDF that prints data in the
  margins.  If you have one, can you email it to me?
 
 I don't think it prints to the margins, per se.
 
 I also know that it's not particular to the printer, since my
 girlfriend's laptop (running Ubuntu) prints the same PDF just fine.
 
 I'll send the specific PDF I've been trying to print lately, off-list.
 
 -- 
 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

Well, if it makes you feel any better, it does the same thing here
(truncates top and bottom).

Looks like CUPS is addressing the page as if there were no unprintable
areas on the page (i.e., it's scaled to fit an 8-1/2 x 11 piece of paper
exactly) rather than squeezing it into the printable area.  I'm afraid I
don't know enough about CUPS to say any more.

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpaZXLsEnPNY.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Warren Block

On Tue, 24 Aug 2010, Chad Perrin wrote:


I'm using CUPS on FreeBSD 8.0, and any time I try to print from outside
Firefox the top and bottom of a PDF gets cut off.  I don't have any means
installed for printing a PDF from inside Firefox, but Webpages and the
CUPS test page print just fine from within the browser.  For instance:

   /usr/local/bin/lpr -P 4050N sheet.pdf

(using an HP 4050N printer)

This results in the top and bottom edge of the PDF getting cut off.  I've
tried tweaking settings in GUI tools such as GtkLP to try to force it to
print the PDF at a smaller size on the page so it would fit within the
cut-off points, and it still prints exactly the same way.  I've tried
adjusting margins in such GUI tools as well, to no avail.  Trying to
print from Xpdf produces the same problematic results.

If there's a command line solution to this, I haven't encountered it.

Where should I start looking to figure out the problem?  Unfortunately,
it looks like the FreeBSD Handbook only deals with lpd.


The LJ4050 is a great printer, but it doesn't print PDFs natively.

So you need to find what CUPS is using to convert PDFs to PostScript and 
adjust that.  It may be an A4 to letter conversion, or it's trying to 
intelligently scale the page to fit your printer.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chad Perrin
On Tue, Aug 24, 2010 at 03:49:24PM -0600, Warren Block wrote:
 
 The LJ4050 is a great printer, but it doesn't print PDFs natively.
 
 So you need to find what CUPS is using to convert PDFs to PostScript and 
 adjust that.  It may be an A4 to letter conversion, or it's trying to 
 intelligently scale the page to fit your printer.

CUPS is a black box to me, filled with black magic.  I wave chicken bones
over it, and it works, mostly.  The documentation has always seemed
somewhat opaque and incomplete.

I've got both pdf2ps and pdftops on the system.  I'm not sure which is
being used by CUPS, and I'm not really sure where to check.  If I had to
guess, I'd say it's pdf2ps, since I think ghostscript fits into this
somewhere.

Interestingly, if I use either one of these individually to translate
from PDF to PS, then print using /usr/local/bin/lpr to print, the same
problem occurs -- so it's not specific to either of those tools.  I
really do seem to be having a problem with CUPS behavior itself.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpPUxpZz3VAn.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Warren Block

On Tue, 24 Aug 2010, Chad Perrin wrote:


On Tue, Aug 24, 2010 at 03:49:24PM -0600, Warren Block wrote:


The LJ4050 is a great printer, but it doesn't print PDFs natively.

So you need to find what CUPS is using to convert PDFs to PostScript and
adjust that.  It may be an A4 to letter conversion, or it's trying to
intelligently scale the page to fit your printer.


CUPS is a black box to me, filled with black magic.


Me too.  That's why I use lpd.


I've got both pdf2ps and pdftops on the system.  I'm not sure which is
being used by CUPS, and I'm not really sure where to check.  If I had to
guess, I'd say it's pdf2ps, since I think ghostscript fits into this
somewhere.

Interestingly, if I use either one of these individually to translate
from PDF to PS, then print using /usr/local/bin/lpr to print, the same
problem occurs -- so it's not specific to either of those tools.  I
really do seem to be having a problem with CUPS behavior itself.


Could you send me the PDF?

As Chip Camden noted, it could be a problem with the printable area not 
being correct.  CUPS should get that information from a PPD file--I 
think.  Do you have the correct PPD installed...er...wherever it should 
be installed?  Or maybe that's automatic, and you just need to set CUPS 
to the right printer.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chip Camden
Quoth Warren Block on Tuesday, 24 August 2010:
 On Tue, 24 Aug 2010, Chad Perrin wrote:
 
 On Tue, Aug 24, 2010 at 03:49:24PM -0600, Warren Block wrote:
 
 The LJ4050 is a great printer, but it doesn't print PDFs natively.
 
 So you need to find what CUPS is using to convert PDFs to PostScript and
 adjust that.  It may be an A4 to letter conversion, or it's trying to
 intelligently scale the page to fit your printer.
 
 CUPS is a black box to me, filled with black magic.
 
 Me too.  That's why I use lpd.
 
 I've got both pdf2ps and pdftops on the system.  I'm not sure which is
 being used by CUPS, and I'm not really sure where to check.  If I had to
 guess, I'd say it's pdf2ps, since I think ghostscript fits into this
 somewhere.
 
 Interestingly, if I use either one of these individually to translate
 from PDF to PS, then print using /usr/local/bin/lpr to print, the same
 problem occurs -- so it's not specific to either of those tools.  I
 really do seem to be having a problem with CUPS behavior itself.
 
 Could you send me the PDF?
 
 As Chip Camden noted, it could be a problem with the printable area not 
 being correct.  CUPS should get that information from a PPD file--I 
 think.  Do you have the correct PPD installed...er...wherever it should 
 be installed?  Or maybe that's automatic, and you just need to set CUPS 
 to the right printer.

From the CUPS help, this appears to be what needs specification:

http://localhost:631/help/api-ppd.html?QUERY=printable area#ppd_size_s

How you get to that, I'm not sure.

`lpr -o fit-to-page` didn't help, so I'm reasonably certain that CUPS
thinks the page size is the full sheet.

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpuR7J1L3O1S.pgp
Description: PGP signature


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Warren Block

On Tue, 24 Aug 2010, Chip Camden wrote:

Quoth Warren Block on Tuesday, 24 August 2010:

As Chip Camden noted, it could be a problem with the printable area not
being correct.  CUPS should get that information from a PPD file--I
think.  Do you have the correct PPD installed...er...wherever it should
be installed?  Or maybe that's automatic, and you just need to set CUPS
to the right printer.


From the CUPS help, this appears to be what needs specification:

http://localhost:631/help/api-ppd.html?QUERY=printable area#ppd_size_s

How you get to that, I'm not sure.

`lpr -o fit-to-page` didn't help, so I'm reasonably certain that CUPS
thinks the page size is the full sheet.


It appears that PPDs are stored in the reasonably-named 
/usr/local/etc/cups/ppd.  There's a PPD for the LJ4050 in 
print/foomatic-db...


And it has
  *ImageableArea Letter/Letter: 12.24 12.06 599.76 780.06

12-point margins on that printer sound about right.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: printing outside browser cuts off top and bottom of page

2010-08-24 Thread Chip Camden
Quoth Warren Block on Tuesday, 24 August 2010:
 On Tue, 24 Aug 2010, Chip Camden wrote:
 Quoth Warren Block on Tuesday, 24 August 2010:
 As Chip Camden noted, it could be a problem with the printable area not
 being correct.  CUPS should get that information from a PPD file--I
 think.  Do you have the correct PPD installed...er...wherever it should
 be installed?  Or maybe that's automatic, and you just need to set CUPS
 to the right printer.
 
 From the CUPS help, this appears to be what needs specification:
 
 http://localhost:631/help/api-ppd.html?QUERY=printable area#ppd_size_s
 
 How you get to that, I'm not sure.
 
 `lpr -o fit-to-page` didn't help, so I'm reasonably certain that CUPS
 thinks the page size is the full sheet.
 
 It appears that PPDs are stored in the reasonably-named 
 /usr/local/etc/cups/ppd.  There's a PPD for the LJ4050 in 
 print/foomatic-db...
 
 And it has
   *ImageableArea Letter/Letter: 12.24 12.06 599.76 780.06
 
 12-point margins on that printer sound about right.

Mine had 18 and 36 for the first two (for an OfficeJet 7310).  I tried
doubling them but that didn't seem to make a difference.  Did I need to
restart something to get that to take effect?

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpjbqJtl7oWD.pgp
Description: PGP signature