1 diff -uNr pbm2ppa-0.8.6/CALIBRATION pbm2ppa-20000205/CALIBRATION
2 --- pbm2ppa-0.8.6/CALIBRATION Sat Aug 22 09:44:07 1998
3 +++ pbm2ppa-20000205/CALIBRATION Sun Feb 6 01:32:25 2000
5 The 'pbmtpg' program generates a full-page (8.5"x11") test pattern in
6 pbmraw (P4) format on stdout. The output may be fed directly into pbm2ppa
7 in order to print a calibration pattern on your printer with commands such as:
8 +Assuming you printer is on /dev/lp0
10 - pbmtpg | pbm2ppa > /dev/lp1
11 + pbmtpg | pbm2ppa > /dev/lp0
13 +(Note: /dev/lp0 is the default device for the primary parallel port on systems
14 +with 2.2.x or later Linux kernels; it is /dev/lp1 on systems with
15 +older Linux 2.0.x kernels)
17 +For other papersizes, the command must specify a valid size, for both
20 + pbmtpg -a4 | pbm2ppa -s a4 > /dev/lp0
21 + pbmtpg -legal | pbm2ppa -s legal > /dev/lp0
22 + pbmtpg -letter | pbm2ppa -s letter > /dev/lp0
24 +For A4, US Legal of US Letter (default).
29 causing the printer to choke with 'blinking lights syndrome'.
31 [TODO: Add shearing adjustments to pbm2ppa and explain here]
36 diff -uNr pbm2ppa-0.8.6/INSTALL pbm2ppa-20000205/INSTALL
37 --- pbm2ppa-0.8.6/INSTALL Sun Oct 18 21:27:16 1998
38 +++ pbm2ppa-20000205/INSTALL Sat Feb 5 14:14:54 2000
42 -This file contains some quick notes on installation in general. For a
43 + This file contains some quick notes on installation in general. For a
44 complete step-by-step instruction on how to install pbm2ppa for your
45 printer, please see INSTALL-MORE. (It was written for the 820, but it
46 should work for all supported models) Thanks to Michael Buehlmann for
50 To compile, you should simply run 'make' with the series of your
51 -printer. The following options are supported:
52 +printer. This will set the default printer to the HP720 series.
53 +To specify a different default printyer, the following options are supported:
55 make 720 # for 720 series - e.g. 722C
56 make 820 # for 820 series - e.g. 820Cse
57 make 1000 # for 1000 series
59 -If you choose to recompile for a different printer series, you must 'make
61 + If you choose to recompile for a different default printer series,
62 +you must 'make clean' first. However, the default printer choice
63 +selected at compilation time can be overridden with e.g., the
64 +"pbm2pppa -v 820 ..." command line option, or specified by e.g.,
65 +a "version 820" entry in the /etc/pbm2ppa.conf file.
66 +Type "pbm2ppa -h" to see the list of options.
72 The other binary created, pbm2ppa, is a converter from a PBM
73 image to a stream of PPA data that can be sent directly to the printer.
74 -The PBM image is expected to be 600 dpi, 8.5"x11". These files can be
75 +The PBM image is expected to be 600 dpi, and the paper size
76 +can be 8.5"x11" (US Letter), 8.5"x14" (US Legal) or A4. These files can be
77 generated with ghostscript. Both the pbm and pbmraw devices are supported.
78 pbmraw is MUCH faster, so use it if you have it available!
79 +IMPORTANT: the PAPERSIZE option passed to ghostscript must match
80 +the paper size specified for pbm2ppa.
81 +Valid papersizes are: "letter" = "us" , "legal" , and "a4" .
85 - To print a postscript file with this program, I use a simple
87 + To print a postscript file with this program, on US Letter
88 +paper and a HP 710/720 series printer, I use a simple shell script:
90 -cat $1 | gs -sDEVICE=pbm -q -dNOPAUSE -r600 -sOutputFile=- - | \
92 +cat $1 | gs -sDEVICE=pbm -q -dNOPAUSE -r600 -sPAPERSIZE=letter -sOutputFile=- - | \
93 +pbm2ppa -s letter -v 720 - - | lpr -l
95 +Valid printer versions are "720", "820" and "1000".
97 You can also set up a printer filter. See the documentation for
98 your print spooler for information on how to do that, or look in
99 diff -uNr pbm2ppa-0.8.6/INSTALL-MORE pbm2ppa-20000205/INSTALL-MORE
100 --- pbm2ppa-0.8.6/INSTALL-MORE Sun Oct 18 21:27:17 1998
101 +++ pbm2ppa-20000205/INSTALL-MORE Sat Feb 5 04:34:45 2000
106 -2. To adjust the paper size to DIN A4, use the -s a4 option to pbm2ppa or
107 +2. To adjust the paper size to US Legal (8.5"x14"), use the -s legal option
108 +to pbm2ppa or change your pbm2ppa.conf file to read "papersize legal"
109 +To adjust the paper size to DIN A4, use the -s a4 option to pbm2ppa or
110 change your pbm2ppa.conf file to read "papersize a4" (see step 5).
112 +For US Letter (8.5"x11") paper is the default; "-s us", "-s letter",
113 +"papersize us" and "papersize letter" also specif this size.
115 3. You can now calibrate the printer with
118 +For US Letter size paper:
119 # pbmtpg | pbm2ppa > /dev/lp1 ( as root )
121 +# pbmtpg -letter | pbm2ppa > /dev/lp1 ( as root )
122 +For US Legal size paper:
123 +# pbmtpg -legal | pbm2ppa -s a4 > /dev/lp1 ( as root )
125 # pbmtpg -a4 | pbm2ppa -s a4 > /dev/lp1 ( as root )
127 diff -uNr pbm2ppa-0.8.6/Makefile pbm2ppa-20000205/Makefile
128 --- pbm2ppa-0.8.6/Makefile Sun Oct 11 11:17:16 1998
129 +++ pbm2ppa-20000205/Makefile Sat Feb 5 04:34:45 2000
138 - @echo Please specify the type of printer you wish to compile this
139 - @echo software for. Supported options are:
149 - cp defaults.720.h defaults.h
154 - cp defaults.820.h defaults.h
159 - cp defaults.1000.h defaults.h
160 +1000: PRINTER=HP1000
169 -all: defaults.h pbm2ppa pbmtpg
173 - rm -f *.o *~ pbmtpg pbm2ppa defaults.h
174 + rm -f *.o *~ pbmtpg pbm2ppa
176 pbm2ppa: pbm2ppa.o ppa.o pbm.o cutswath.o
177 $(CC) $(LDFLAGS) -o pbm2ppa pbm2ppa.o ppa.o pbm.o cutswath.o
179 $(CC) $(CFLAGS) -o pbmtpg pbmtpg.o -lm
181 .c.o: $*.c ppa.h pbm.h
182 - $(CC) $(CFLAGS) -c $*.c
183 + $(CC) $(CFLAGS) -DDEFAULT_PRINTER=$(PRINTER) -c $*.c
191 diff -uNr pbm2ppa-0.8.6/README.REDHAT pbm2ppa-20000205/README.REDHAT
192 --- pbm2ppa-0.8.6/README.REDHAT Sat Aug 22 09:48:40 1998
193 +++ pbm2ppa-20000205/README.REDHAT Sun Feb 6 00:53:29 2000
195 -RedHat users may find the following tip from Panayotis Vryonis <vrypan@hol.gr>
197 +The best way to integrate support for the HP PPA Printers into RedHat's
198 +Linux Print System Manager (printtool) is to replace e.g., the
199 +rhs-printfilters-1.57-3 RPM package that comes with Red Hat 6.1,
200 +with a PPA-aware version from the pnm2ppa project whic h has a
201 +homepage at http://www.sourceforge.net/projects/?group_id=1322
203 -Here is a tip to intergrate HP720C support in RedHat's printtool:
204 +At the time of writing, the latest release is
205 + rhs-printfilters-1.57-4ppa1
206 +This package includes support for both pbm2ppa and the new
207 +color driver pnm2ppa.
209 -Install pbm2ppa. Copy pbm2ppa to /usr/bin.
210 -Edit "printerdb" (in my system it is found in
211 -/usr/lib/rhs/rhs-printfilters )
212 -and append the following lines:
213 + -------------------------------------
215 +If for some reason, they cannot use this PPA-aware version of
216 +rhs-printfilters, RedHat users may still find the following tip from
217 +Panayotis Vryonis <vrypan@hol.gr> helpful!
218 +It will work with the standard rhs-printfilters that comes with the
221 + Here is a tip to integrate HP720C support in RedHat's printtool:
223 + Install pbm2ppa. Copy pbm2ppa to /usr/bin.
224 + Edit "printerdb" (in my system it is found in
225 + /usr/lib/rhs/rhs-printfilters )
226 + and append the following lines:
227 ----------------------Cut here
228 -------------------------------------------
229 StartEntry: DeskJet720C
232 --------------------------------------------------------------------------
234 -Now you can add an HP720C printer just like any other, using printtool.
235 + Now you can add an HP720C printer just like any other, using printtool.
237 + [Author's (P. Vryonis) Note: The same should work for the 820 and
238 + 1000, but it hasn't been tested. Also, use the pbmraw GSDriver if
239 + you have it; it's faster. ]
243 -[Author's Note: The same should work for the 820 and 1000, but it hasn't
244 -been tested. Also, use the pbmraw GSDriver if you have it; it's faster. ]
245 diff -uNr pbm2ppa-0.8.6/defaults.1000.h pbm2ppa-20000205/defaults.1000.h
246 --- pbm2ppa-0.8.6/defaults.1000.h Sat Aug 22 09:44:12 1998
247 +++ pbm2ppa-20000205/defaults.1000.h Wed Dec 31 19:00:00 1969
250 - * Default printer values. Edit these and recompile if so desired.
251 - * [Note: a /etc/pbm2ppa.conf file will override these]
256 -#define DEFAULT_PRINTER ( HP1000 )
258 -/* Refer to CALIBRATION file about these settings */
259 -#define DEFAULT_X_OFFSET ( 100 )
260 -#define DEFAULT_Y_OFFSET ( -650 )
262 -#define DEFAULT_TOP_MARGIN ( 150 )
263 -#define DEFAULT_LEFT_MARGIN ( 150 )
264 -#define DEFAULT_RIGHT_MARGIN ( 150 )
265 -#define DEFAULT_BOTTOM_MARGIN ( 150 )
268 diff -uNr pbm2ppa-0.8.6/defaults.720.h pbm2ppa-20000205/defaults.720.h
269 --- pbm2ppa-0.8.6/defaults.720.h Sat Aug 22 09:44:12 1998
270 +++ pbm2ppa-20000205/defaults.720.h Wed Dec 31 19:00:00 1969
273 - * Default printer values. Edit these and recompile if so desired.
274 - * [Note: a /etc/pbm2ppa.conf file will override these]
279 -#define DEFAULT_PRINTER ( HP720 )
281 -/* Refer to CALIBRATION file about these settings */
282 -#define DEFAULT_X_OFFSET ( 169 )
283 -#define DEFAULT_Y_OFFSET ( -569 )
285 -#define DEFAULT_TOP_MARGIN ( 150 )
286 -#define DEFAULT_LEFT_MARGIN ( 150 )
287 -#define DEFAULT_RIGHT_MARGIN ( 150 )
288 -#define DEFAULT_BOTTOM_MARGIN ( 150 )
291 diff -uNr pbm2ppa-0.8.6/defaults.820.h pbm2ppa-20000205/defaults.820.h
292 --- pbm2ppa-0.8.6/defaults.820.h Sat Aug 22 09:44:12 1998
293 +++ pbm2ppa-20000205/defaults.820.h Wed Dec 31 19:00:00 1969
296 - * Default printer values. Edit these and recompile if so desired.
297 - * [Note: a /etc/pbm2ppa.conf file will override these]
302 -#define DEFAULT_PRINTER ( HP820 )
304 -/* Refer to CALIBRATION file about these settings */
305 -#define DEFAULT_X_OFFSET ( 75 )
306 -#define DEFAULT_Y_OFFSET ( -500 )
308 -#define DEFAULT_TOP_MARGIN ( 80 )
309 -#define DEFAULT_LEFT_MARGIN ( 80 )
310 -#define DEFAULT_RIGHT_MARGIN ( 80 )
311 -#define DEFAULT_BOTTOM_MARGIN ( 150 )
314 diff -uNr pbm2ppa-0.8.6/defaults.h pbm2ppa-20000205/defaults.h
315 --- pbm2ppa-0.8.6/defaults.h Wed Dec 31 19:00:00 1969
316 +++ pbm2ppa-20000205/defaults.h Sat Feb 5 04:34:45 2000
319 + * Default printer values. Edit these and recompile if so desired.
320 + * [Note: a /etc/pbm2ppa.conf file will override these]
326 +#ifndef DEFAULT_PRINTER
327 +#define DEFAULT_PRINTER ( HP720 )
330 +/* for HP720 series */
331 +/* Refer to CALIBRATION file about these settings */
332 +#define HP720_X_OFFSET ( 169 )
333 +#define HP720_Y_OFFSET ( -569 )
335 +#define HP720_TOP_MARGIN ( 150 )
336 +#define HP720_LEFT_MARGIN ( 150 )
337 +#define HP720_RIGHT_MARGIN ( 150 )
338 +#define HP720_BOTTOM_MARGIN ( 150 )
340 +/* for HP820 series */
341 +/* Refer to CALIBRATION file about these settings */
342 +#define HP820_X_OFFSET ( 75 )
343 +#define HP820_Y_OFFSET ( -500 )
345 +#define HP820_TOP_MARGIN ( 80 )
346 +#define HP820_LEFT_MARGIN ( 80 )
347 +#define HP820_RIGHT_MARGIN ( 80 )
348 +#define HP820_BOTTOM_MARGIN ( 150 )
350 +/* for HP1000 series */
351 +/* Refer to CALIBRATION file about these settings */
352 +#define HP1000_X_OFFSET ( 100 )
353 +#define HP1000_Y_OFFSET ( -650 )
355 +#define HP1000_TOP_MARGIN ( 150 )
356 +#define HP1000_LEFT_MARGIN ( 150 )
357 +#define HP1000_RIGHT_MARGIN ( 150 )
358 +#define HP1000_BOTTOM_MARGIN ( 150 )
371 diff -uNr pbm2ppa-0.8.6/pbm2ppa.1 pbm2ppa-20000205/pbm2ppa.1
372 --- pbm2ppa-0.8.6/pbm2ppa.1 Wed Dec 31 19:00:00 1969
373 +++ pbm2ppa-20000205/pbm2ppa.1 Sun Feb 6 00:11:42 2000
375 +.TH pnm2ppa "5 Feb 2000"
377 +pbm2ppa - convert portable bitmap (PBM) to HP's Printing Performance Architecture (PPA) file format
379 +pbm2ppa [options] [ <\fIinfile\fR] > [ <\fIoutfile\fR]> ] ]
382 +Reads portable bitmap (PBM) format as input. Outputs a stream suitable for
383 +processing by Hewlett-Packard's range of Printing Performance Architecture
385 +pnm2ppa supports the HP 710c, 712c, 720c, 722c, 820c, and 1000c
388 +(Portable bitmap (PBM) format output can be produced from PostScript(tm) input
389 +by the GhostScript driver "pbmraw".)
395 +.IP "\fB\\fIinfile\fR \fP"
396 +Input file \fIinfile\fR is either a path to a file or device, or '-' to indicate stdin (defaults to stdin)
401 +.IP "\fB\\fIoutfile\fR \fP"
402 +Output file \fIoutfile\fR is either a path to a file or device, or '-' to indicate stdout (defaults to stdout)
406 +.\"{{{ -b bottommargin
407 +.IP "\fB\-b \fIbottommargin\fR\fP"
408 +Sets the bottom margin \fIbottommargin\fR in units of 1/600 inches (e.g., -b 150 = 0.25")
414 +Displays the current configuration
418 +.\"{{{ -f configfile
419 +.IP "\fB\-f \fIconfigfile\fR\fP"
420 +Overrides reading the configuration from /etc/pnm2ppa.conf, and uses
421 +\fIconfigfile\fR instead.
427 +Displays program usage
432 +.\"{{{ -l leftmargin
433 +.IP "\fB\-l \fIleftmargin\fR\fP"
434 +Sets the left margin \fIleftmargin\fR in units of 1/600 inches (e.g., -l 150 = 0.25")
438 +.\"{{{ -r rightmargin
439 +.IP "\fB\-r \fIrightmargin\fR\fP"
440 +Sets the right margin \fIrightmargin\fR in units of 1/600 inches (e.g., -r 150 = 0.25")
444 +.IP "\fB\-s \fIpapersize\fR\fP"
445 +Sets the paper size. Possible values for \fIpapersize\fR are \fBa4\fP (A4),
446 +\fBletter\fP or \fBus\fP (US Letter, 8.5"x11"), and \fBlegal\fR (US Legal,
448 +The default is US Letter.
452 +.IP "\fB\-t \fItopmargin\fR\fP"
453 +Sets the top margin \fItopmargin\fR in units of 1/600 inches (ie -t 150 = 0.25")
456 +.\"{{{ -v printertype
457 +.IP "\fB\-v \fIprintertype\fP"
458 +Selects the printer model. Possible values of \fIprintertype\fR are:
459 +\fB710\fP, \fB712\fP, \fB720\fP, \fB722\fP, \fB820\fP and \fB1000\fP.
460 +The default is the HP DeskJet 7X0 Series (710, 712, 720, 722).
465 +.IP "\fB\-x \fIxoffset\fR\fP"
466 +Sets the x-offset \fBxoffset\fR from the left of the page. Units are 1/600 inches
470 +.IP "\fB\-y \fIyoffset\fR\fP"
471 +Sets the y-offset \fByoffset\fR from the top of the page. Units are 1/600 inches
476 +The configuration file is read in first. Command line arguments then modify the resulting definitions.
478 +The -x and -y options accumulate. The -v option resets all definitions back to
479 +an inbuilt default for that printer and should be used before subsequent -b -l -r, -t, -x, and -y arguments.
485 +.\"{{{ /etc/pbm2ppa.conf
486 +.IP "\fB\fI/etc/pbm2ppa.conf\fR\fP"
487 +Default configuration file
492 +This code is licensed under the GNU Public License version 2. See
493 +LICENSE for details.
498 +This program was written by Tim Norman. It originally
499 +supported black and white output on the 820 series. This program is
500 +almost obsolete; its successor pnm2ppa will support color printing.
502 +This is a stable driver, but does not support color printing.
510 diff -uNr pbm2ppa-0.8.6/pbm2ppa.c pbm2ppa-20000205/pbm2ppa.c
511 --- pbm2ppa-0.8.6/pbm2ppa.c Tue Sep 15 20:00:27 1998
512 +++ pbm2ppa-20000205/pbm2ppa.c Sat Feb 5 17:27:58 2000
515 /* Paper sizes in 600ths of an inch. */
517 -/* US is 8.5 in by 11 in */
518 +/* US Letter is 8.5 in by 11 in */
520 -#define USWIDTH (5100)
521 -#define USHEIGHT (6600)
522 +#define LETTERWIDTH (5100)
523 +#define LETTERHEIGHT (6600)
525 +/* US Legal is 8.5 in by 14 in */
527 +#define LEGALWIDTH (5100)
528 +#define LEGALHEIGHT (8400)
530 /* A4 is 210 mm by 297 mm == 8.27 in by 11.69 in */
532 @@ -121,16 +126,35 @@
534 void set_printer_specific_defaults()
536 - printer.x_offset=DEFAULT_X_OFFSET;
537 - printer.y_offset=DEFAULT_Y_OFFSET;
538 switch(printer.version)
541 + printer.x_offset=HP720_X_OFFSET;
542 + printer.y_offset=HP720_Y_OFFSET;
543 + printer.top_margin=HP720_TOP_MARGIN;
544 + printer.left_margin=HP720_LEFT_MARGIN;
545 + printer.right_margin=HP720_RIGHT_MARGIN;
546 + printer.bottom_margin=HP720_BOTTOM_MARGIN;
548 printer.bufsize = 200*1024;
551 + printer.x_offset=HP820_X_OFFSET;
552 + printer.y_offset=HP820_Y_OFFSET;
553 + printer.top_margin=HP820_TOP_MARGIN;
554 + printer.left_margin=HP820_LEFT_MARGIN;
555 + printer.right_margin=HP820_RIGHT_MARGIN;
556 + printer.bottom_margin=HP820_BOTTOM_MARGIN;
557 + printer.marg_diff=0x62;
558 + printer.bufsize = 100*1024;
561 + printer.x_offset=HP1000_X_OFFSET;
562 + printer.y_offset=HP1000_Y_OFFSET;
563 + printer.top_margin=HP1000_TOP_MARGIN;
564 + printer.left_margin=HP1000_LEFT_MARGIN;
565 + printer.right_margin=HP1000_RIGHT_MARGIN;
566 + printer.bottom_margin=HP1000_BOTTOM_MARGIN;
567 printer.marg_diff=0x62;
568 printer.bufsize = 100*1024;
570 @@ -144,15 +168,17 @@
572 printf("usage: %s [ options ] [ <infile> [ <outfile> ] ]\n\n",prog);
573 printf(" Prints a pbm- or pbmraw-format <infile> to HP720/820/1000-format <outfile>.\n\n");
574 - printf(" -v <version> printer version (720, 820, or 1000)\n");
575 - printf(" -x <xoff> vertical offset adjustment in 1\"/600\n");
576 - printf(" -y <yoff> horizontal offset adjustment in 1\"/600\n");
577 - printf(" -t <topmarg> top margin in 1\"/600 (default: 150 = 0.25\")\n");
578 - printf(" -l <leftmarg> left margin in 1\"/600 (default: 150 = 0.25\")\n");
579 - printf(" -r <rightmarg> right margin in 1\"/600 (default: 150 = 0.25\")\n");
580 - printf(" -b <botmarg> bottom margin in 1\"/600 (default: 150 = 0.25\")\n");
581 - printf(" -s <paper> paper size (us, a4, default: us)\n");
582 + printf(" -b <margin> bottom margin in 1\"/600 (default: 150 = 0.25\")\n");
583 + printf(" -d dumps the configuration to stdout");
584 printf(" -f <cfgfile> read <cfgfile> as parameters\n\n");
585 + printf(" -h displays this help text");
586 + printf(" -l <margin> left margin in 1\"/600 (default: 150 = 0.25\")\n");
587 + printf(" -r <margin> right margin in 1\"/600 (default: 150 = 0.25\")\n");
588 + printf(" -s <paper> paper size (us,letter,legal,a4, default: us)\n");
589 + printf(" -t <margin> top margin in 1\"/600 (default: 150 = 0.25\")\n");
590 + printf(" -v <model> printer model (710, 712, 720, 722, 820, or 1000)\n");
591 + printf(" -x <offset> vertical offset adjustment in 1\"/600\n");
592 + printf(" -y <offset> horizontal offset adjustment in 1\"/600\n");
593 printf(" The -x and -y options accumulate. The -v option resets the horizontal and\n");
594 printf(" vertical adjustments to an internal default. <infile> and <outfile> default\n");
595 printf(" to stdin and stdout. '-' is a synonym for stdin and stdout.\n\n");
598 void parm_version(char* arg)
600 - if(!strcasecmp(arg,"hp720") || !strcmp(arg,"720"))
601 + if(!strcasecmp(arg,"hp710") || !strcmp(arg,"710"))
602 + printer.version=HP720;
603 + else if(!strcasecmp(arg,"hp712") || !strcmp(arg,"712"))
604 + printer.version=HP720;
605 + else if(!strcasecmp(arg,"hp720") || !strcmp(arg,"720"))
606 + printer.version=HP720;
607 + else if(!strcasecmp(arg,"hp722") || !strcmp(arg,"722"))
608 printer.version=HP720;
609 else if(!strcasecmp(arg,"hp820") || !strcmp(arg,"820"))
610 printer.version=HP820;
619 printer.version=HP720;
622 @@ -262,10 +297,15 @@
623 printer.bottom_margin=value;
624 else if(!strncmp(key,"papersize",len))
626 - if(!strcmp(buf,"us"))
627 + if(!strcmp(buf,"us") || !strcmp(buf,"letter"))
629 + Width = LETTERWIDTH;
630 + Height = LETTERHEIGHT;
632 + else if(!strcmp(buf,"legal"))
636 + Width = LEGALWIDTH;
637 + Height = LEGALHEIGHT;
639 else if(!strcmp(buf,"a4"))
642 FILE *in=stdin, *out=stdout;
645 - printer.version = DEFAULT_PRINTER;
646 - printer.x_offset = DEFAULT_X_OFFSET;
647 - printer.y_offset = DEFAULT_Y_OFFSET;
648 - printer.top_margin = DEFAULT_TOP_MARGIN;
649 - printer.left_margin = DEFAULT_LEFT_MARGIN;
650 - printer.right_margin = DEFAULT_RIGHT_MARGIN;
651 - printer.bottom_margin = DEFAULT_BOTTOM_MARGIN;
654 + printer.version = DEFAULT_PRINTER;
655 + Width = LETTERWIDTH;
656 + Height = LETTERHEIGHT;
657 set_printer_specific_defaults();
659 if(!stat(defaultcfgfile,&tmpstat))
660 @@ -356,10 +390,15 @@
661 else if(!strcmp(argv[argn],"-s"))
664 - if(!strcmp(argv[argn],"us"))
665 + if(!strcmp(argv[argn],"us") || !strcmp(argv[argn],"letter"))
669 + Width = LETTERWIDTH;
670 + Height = LETTERHEIGHT;
672 + else if(!strcmp(argv[argn],"legal"))
674 + Width = LEGALWIDTH;
675 + Height = LEGALHEIGHT;
677 else if(!strcmp(argv[argn],"a4"))
681 return print_pbm (in);
685 diff -uNr pbm2ppa-0.8.6/pbm2ppa.conf pbm2ppa-20000205/pbm2ppa.conf
686 --- pbm2ppa-0.8.6/pbm2ppa.conf Wed Dec 31 19:00:00 1969
687 +++ pbm2ppa-20000205/pbm2ppa.conf Sat Feb 5 17:27:58 2000
689 +# Sample configuration file for the HP720/HP820/HP1000 PPA Printers
691 +# This file will be automatically read upon startup if it's placed in
695 +# uncomment options (remove "#" at beginning of line) to activate them
697 +#valid printer versions are 710, 712, 720, 722. 820, 100
698 +# 710 = 712 = 720 = 722: HP DeskJet 710C, 712C, 720C, 722C (default)
699 +# 820: HP DeskJet 820Cse, 820Cxi
700 +# 1000: HP DeskJet 1000Cse, 1000Cxi
706 +# valid papersizes are us, letter, legal, a4
707 +# US Letter (8.5"x11"): us, letter (default)
708 +# US Legal (8.5"x14"): legal
715 +#Defaults for 720 series:
716 +# X-offset, Y-Offset: (Adjust these for your printer, see CALIBRATE)
719 +# 1/4 inch margins all around (at 600 DPI)
725 +#Defaults for 820 series:
726 +# X-offset, Y-Offset: (Adjust these for your printer, see CALIBRATE)
729 +# 1/4 inch margins all around (at 600 DPI)
735 +#Defaults for 820 series:
736 +# X-offset, Y-Offset: (Adjust these for your printer, see CALIBRATE)
739 +# 1/4 inch margins all around (at 600 DPI)
747 diff -uNr pbm2ppa-0.8.6/pbm2ppa.conf.hp1000 pbm2ppa-20000205/pbm2ppa.conf.hp1000
748 --- pbm2ppa-0.8.6/pbm2ppa.conf.hp1000 Sun Oct 18 21:27:19 1998
749 +++ pbm2ppa-20000205/pbm2ppa.conf.hp1000 Wed Dec 31 19:00:00 1969
751 -# Sample configuration file for the HP720
753 -# This file will be automatically read upon startup if it's placed in
761 -xoff 100 # \ Adjust these for your printer.
762 -yoff -650 # / (see CALIBRATE)
764 -# 1/4 inch margins all around (at 600 DPI)
769 diff -uNr pbm2ppa-0.8.6/pbm2ppa.conf.hp720 pbm2ppa-20000205/pbm2ppa.conf.hp720
770 --- pbm2ppa-0.8.6/pbm2ppa.conf.hp720 Sun Oct 18 21:27:20 1998
771 +++ pbm2ppa-20000205/pbm2ppa.conf.hp720 Wed Dec 31 19:00:00 1969
773 -# Sample configuration file for the HP720
775 -# This file will be automatically read upon startup if it's placed in
783 -xoff 169 # \ Adjust these for your printer.
784 -yoff -569 # / (see CALIBRATE)
786 -# 1/4 inch margins all around (at 600 DPI)
791 diff -uNr pbm2ppa-0.8.6/pbm2ppa.conf.hp820 pbm2ppa-20000205/pbm2ppa.conf.hp820
792 --- pbm2ppa-0.8.6/pbm2ppa.conf.hp820 Sun Oct 18 21:27:21 1998
793 +++ pbm2ppa-20000205/pbm2ppa.conf.hp820 Wed Dec 31 19:00:00 1969
795 -# Sample configuration file for the HP820
797 -# This file will be automatically read upon startup if it's placed in
805 -xoff 75 # \ Adjust these for your printer.
806 -yoff -500 # / (see CALIBRATE)
808 -# 1/4 inch margins all around (at 600 DPI)
813 diff -uNr pbm2ppa-0.8.6/pbmtpg.c pbm2ppa-20000205/pbmtpg.c
814 --- pbm2ppa-0.8.6/pbmtpg.c Tue Sep 15 20:00:28 1998
815 +++ pbm2ppa-20000205/pbmtpg.c Sat Feb 5 04:34:45 2000
820 -/* Support both US and A4. */
821 +/* Support US Letter, Legal, and A4. */
823 -/* US is 8.5 in by 11 in */
824 +/* US Letter is 8.5 in by 11 in */
826 -#define USWIDTH (5100)
827 -#define USHEIGHT (6600)
828 +#define LETTERWIDTH (5100)
829 +#define LETTERHEIGHT (6600)
831 +/* US Legal is 8.5 in by 14 in */
833 +#define LEGALWIDTH (5100)
834 +#define LEGALHEIGHT (8400)
836 /* A4 is 210 mm by 297 mm == 8.27 in by 11.69 in */
840 char *progname = *argv;
844 + Width = LETTERWIDTH;
845 + Height = LETTERHEIGHT;
846 + if(argc>1 && strcmp(argv[1], "-letter")==0)
848 + Width = LETTERWIDTH;
849 + Height = LETTERHEIGHT;
854 + if(argc>1 && strcmp(argv[1], "-legal")==0)
856 + Width = LEGALWIDTH;
857 + Height = LEGALHEIGHT;
862 if(argc>1 && strcmp(argv[1], "-a4")==0)
872 Pwidth = (Width+7)/8;
873 bitmap = (char *)malloc(Pwidth*Height);
879 + Width = 8*Pwidth ; /* here need 8*Pwidth as the Width ! */
880 printf("P4\n%d %d\n",Width,Height);
882 for(x=0; x<Pwidth*Height; x++)