Mail Archives: cygwin/2000/07/10/22:33:37
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 -