[mdlug] Printing a lousy #$%^&* envelope

Robert Meier list1c30fe42 at bellsouth.net
Wed Mar 25 03:26:27 EDT 2009


Jim, Jeff,

>> I have been a linux user for about 10 years. I have never tried
>> to print an envelope under Slackware Linux using KDE and Cups.
>> ... Anyone else have problems with printing envelopes under Linux?
> Haven't tried it myself.  I have used gLables to print self-adhesive
> address labels using a CSV export from a Calc spreadsheet as input.

Too lazy to write addresses on envelopes, I've been paying bills
with self-printed envelopes for years using SuSE.

I too use glabels, but most of my envelopes are still printed with
envelope-0.625.noarch.rpm , a perl program that writes a postscript program.  
(The lack of upgrade to 1.0.0 shows how solid it has been for me.)

>> The closest it came was Adobe PDF reader put something on the envelope
>> but  whoever programmed the PDF converter for KDE and OOO did not force
>> embeded/outlined fonts so it just prints boxes where the letters should be.

If you are using ghostscript for pdf converter, you may simply need to install
your X fonts in ghostscript.


"ghostscript and cups

Printer fonts are configured separately from X fonts.
A ghostscript file, Fontmap maps xfonts to postscript fonts.

bash> cat /usr/share/ghostscript/7.05/Fontmap
 ...
(Fontmap.local) .runlibfile
...
bash> cat /usr/share/ghostscript/7.05/Fontmap.local
...
/POSTNET (/usr/X11R6/lib/X11/fonts/local/POSTNET.ttf) ;
...

CUPS (Common Unix Printing System) usually calls ghostscript.
However most distros configure cups to use -dPARANOIDSAFER
to prohibit using anything (including fonts) not compiled into gs.
This must be changed to -dSAFER to add fonts.
bash> cat /usr/lib/cups/filter/pstoraster
...
gsopts ... -dSAFER ...
...
" 
   -- excerpt from "How to Install X Fonts"

# Configuration for my printer.
bash> cat ~/.enveloperc
# ~/.enveloperc

# This file is interpreted in PERL, so it is case sensitive
# lines beginning with a '#' and blank lines are ignored.
# All paper Attributes and Margin Units are in INCHES.


# ------------------------------- Paper Attributes
$normalpaper = 11       # Use your printer's page size here
$normalwidth = 8.5      # Printer's page width.
$ewidth = 9.5           # Envelope Width
$eheight = 5.125        # Envelope Height



# ------------------------------- Margins
# For printers that center the envelope on the feeder or put it all the way
# to the right, you will need to make the top margin larger.
# The $feedleft, $feedcenter, and $feedright variables should take care of
# this.  Just add the proper one to $topmargin.
$feedleft = 0
$feedright = $normalwidth - $eheight
$feedcenter = $normalwidth/2 - $eheight/2

$leftmargin = 0.35
$topmargin = 0.25



# ------------------------------- General Settings
$international=1# use international characters
$flipflop = 1   # print envelopes with flap on left
$shiplabel = 0  # print labels in a single column for easy shipping labels
$barcode = 1    # include POSTNET barcode for Zip or Zip+4?
$fromfile = ""  # file to load default return address from



# ------------------------------- Default Label Attributes
$line1 = "Times-Roman-Bold 12"  # Label font attributes, first line
$linex = "Times-Roman 12"       # Label font attributes, other lines


# ------------------------------- Default Return Address Attributes
$return1 = "Helvetica-Bold 10"  # same as above
$returnx = "Helvetica 10"       # same as above
$international = 1              # support international characters



# One of a collection of envelope descriptions:
bash> cat ~/etc/letters/envelope/MDLUG.envelope
[options]
$return1 = "Courier-Bold 10"
$returnx = "Courier 10"

[from]
  .~.   Metro Detroit Linux User's Group
  /V\\   c/o Robert Meier
 // \\\\  2.6 Torvald Ln.
/(   )\\ Rochester, MI  48307
 ^`~'^
[to]
Ann Arbor Science Fiction Association
c/o Stan Lee
19100 Computer Museum Rd.
Lapeer, MI  48446

# To print an envelope:
bash> envelope ~/etc/letters/envelope/MDLUG.envelope | lpr

-- 
Bob

  "Give me a lever long enough and a fulcrum on which to place it,
   and I shall move the world."
     -- Archimedes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MDLUG.ps
Type: application/postscript
Size: 3196 bytes
Desc: not available
URL: <http://mdlug.org/pipermail/mdlug/attachments/20090325/3b69d7aa/attachment-0001.ps>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MDLUG.png
Type: image/png
Size: 12460 bytes
Desc: not available
URL: <http://mdlug.org/pipermail/mdlug/attachments/20090325/3b69d7aa/attachment-0001.png>


More information about the mdlug mailing list