delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/07/10/22:33:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20000711023242.19852.qmail@web802.mail.yahoo.com>
Date: Mon, 10 Jul 2000 19:32:42 -0700 (PDT)
From: Rick Rankin <rick_rankin AT yahoo DOT com>
Subject: Re: Providing a working "lp" in cygwin?
To: Rod Whitby <list DOT cygwin AT rwhitby DOT net>
Cc: cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

Have you tried setting the default paper size via Control Panel?

Rick
--
Rick Rankin
rick_rankin AT yahoo DOT com

--- Rod Whitby <list DOT cygwin AT rwhitby DOT net> wrote:
> Rick Rankin <rick_rankin AT yahoo DOT com> writes:
> > FWIW, I've attached the "C" source to a very simple lpr filter I wrote a
> year
> > or more ago. I use it with Emacs, enscript, groff, et. al. Use it as you
> see
> > fit.
> 
> Thanks Rick - that was just what I was looking for today :-)
> 
> Does anyone know how to make it print A4 instead of Letter ?  I tried
> the following, but it didn't work.
> 
> *** /cygdrive/c/TEMP/T0001127	Tue Jul 11 10:56:45 2000
> --- lpr.c	Tue Jul 11 10:49:55 2000
> ***************
> *** 109,114 ****
> --- 109,116 ----
>     FILE *  inputFile;
>     int     i;
>     int     exitCode = 0;
> +   long	  size;
> +   DEVMODE *dm1;
>   
>     if ((envPtr = getenv("PRINTER")) != NULL)
>     {
> ***************
> *** 136,141 ****
> --- 138,155 ----
>       exitCode = error(1, "can't open '%s' for writing", deviceName);
>     else
>     {
> + 
> +     size = DocumentProperties(NULL, deviceHandle, NULL, NULL, NULL, 0);
> + 
> +     dm1 = (DEVMODE *)malloc(size);
> + 
> +     DocumentProperties(NULL, deviceHandle, NULL, dm1, NULL, DM_OUT_BUFFER);
> +     
> +     dm1->dmPaperSize = DMPAPER_A4;
> +     dm1->dmFields |= DM_PAPERSIZE;
> + 
> +     DocumentProperties(NULL, deviceHandle, NULL, NULL, dm1, DM_IN_BUFFER);
> + 
>       if (optind >= argc)
>         exitCode = lpr(stdin, "stdin");
>       else
> 
> -- 
> -- Rod Whitby, Snr Staff Engr, Electronic Design Automation --
> -- Motorola Australia Software Centre - Adelaide, Australia --
> -- Phone: +61 8 8203 3526, Fax: +61 8 8203 3501, <GMT+9:30> --
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
> 


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019