Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Re: Providing a working "lp" in cygwin? To: Rod Whitby Cc: cygwin AT sourceware DOT cygnus DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Have you tried setting the default paper size via Control Panel? Rick -- Rick Rankin rick_rankin AT yahoo DOT com --- Rod Whitby wrote: > Rick Rankin 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, -- > > > -- > 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