Gedit and Printing

Asheville Joe josephj at main.nc.us
Mon Jun 23 10:47:35 EDT 2003


It's fixed.  Just had to sleep on it and RTFM again.

I would really appreciate some feedback on my scripts - especially if 
any of you find them useful.
They are organized so that duplex should be generally useful and dplx 
customizes it for what you usually want to do.  Then print is mostly 
hard coded options that would have to be modified for your preferences 
or even parameterized.

Joe

Asheville Joe wrote:

> Wow! enscript is cool. I'm going to try it out.
> Do you have any idea what the following option does? That's all there 
> was about it in the man page.
>
> -A align, --file-align=align
> Align separate input files to even align page count. This
> option is useful in two-side and 2-up printings
>
> Tried it out. It rocks!
> BUT, then I wrote a script called "print" to use it with my duplex 
> printing emulator (dplx/duplex). Stand alone, it works great, but when 
> I tell gedit to use "print" as the spooler, it starts printing some 
> file 207 pages long that might be postscript source code. (When I told 
> gedit to use dplx as the spooler, it worked fine - minus the new 
> features from enscript). I am attaching the scripts if anyone has time 
> to look at them. The dplx/duplex scripts have been used and tested a 
> lot and have never done anything like this. print is new. The 
> documentation for dplx/duplex is in duplex.0.5.txt. enscript knows 
> about dplx from .enscript which goes in your user home directory. 
> .enscriptrc is slightly modified for for my printer, so don't just use 
> it as is unless you have an HP Deskjet. The few things I changed are 
> all followed by # JJP on the end of the line.
>
> Help would be appreciated. It must be something simple like somebody 
> deciding they don't have to rip the file for my printer.
>
> dlpx/duplex are worth taking a look at in their own right. They 
> provide emulation of duplex printing - almost as nice as in Windoze 
> and you don't have to manually set all the options and print the file 
> twice like you do with xpp. One note - these scripts use Xdialog to 
> communicate with the user, but it's widely available as an rpm etc.
>
> Thanks.
>
> Joe
>
>
> Robert Meyer wrote:
>
>> --- Joe <josephj at buffnet.net> wrote:
>>  
>>
>>> Two questions:
>>> 1) When I print from gedit, lines get wrapped on the page, but 
>>> they're  a little too long and the last word or two gets rewraped 
>>> midword on the printed page.  Is there a way to tell gedit how wide 
>>> a page should be?
>>>
>>> 2) When I print from gedit (and elsewhere) fonts get selected and it 
>>> prints the way I want it to.  When I print directly (cat file > lp), 
>>> it has to choose some font, but the one it chooses is microscopic.  
>>> Where do I tell the sytem what font to use if none is selected?
>>> I'm using Mandrake 9.1 rc2, kdesktop, if that matters.
>>>   
>>
>>
>> Well, if you poke around in gedit a bit, you'll find that under
>> Edit->preferences, there is an item for editor fonts and printer 
>> fonts.  That's
>> where you tell it what to use.
>>
>> Rather than catting the file to the printer, just use 'lpr filename' 
>> and it
>> will format the file into postscript and feed it to the cups print 
>> driver which
>> will make something reasonable with it.  I think that it picks 
>> something like
>> courier 10.  You could also use 'a2ps' or 'enscript' (check the 
>> manpages for
>> them) to get it to do lots of different things.  Enscript writes 
>> straight to
>> the printer daemon and a2ps needs to be told or it will write to 
>> standard
>> output.
>>
>> Hope this helps...
>>
>> Cheers!
>>
>> Bob
>>
>> __________________________________
>> Do you Yahoo!?
>> SBC Yahoo! DSL - Now only $29.95 per month!
>> http://sbc.yahoo.com
>>
>>  
>>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: print
Url: http://www.nflug.org/pipermail/nflug/attachments/20030623/e91bf47f/print-0001.ksh


More information about the nflug mailing list