Xref: utzoo alt.fax:535 comp.lang.postscript:4169 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!sam.cs.cmu.edu!vac From: vac@sam.cs.cmu.edu (Vincent Cate) Newsgroups: alt.fax,comp.lang.postscript Subject: Re: G3 Fax <--> (E)PS (and compressed bitmaps in postscript) Summary: Found some stuff that lets you go from group 3 to postscript. The same package also can produce postscript with a compressed bitmap. Message-ID: <8027@pt.cs.cmu.edu> Date: 16 Feb 90 20:52:18 GMT References: <10260@hoptoad.uucp> Organization: Carnegie-Mellon University, CS/RI Lines: 86 >galen@hoptoad.UUCP (Galen Wolf) >I'm interested to find any hardware or software which allows translating >electronically between G3 Fax and either plain or encapsulated PostScript. I also am interested in this. Here is what I have found so far. There is a package called pbmplus that can convert many bitmap formats into other formats. Among these is a pbmtog3 and g3topbm. These handle only one-dimensional group III FAX. PBM stands for "Portable BitMap". There is also a pgmtops which can take pbm files, so you can do a: cat file.g3 | g3topbm | pgmtops | lpr And it works just fine. You can FTP pbmplus from: expo.lcs.mit.edu:contrib/pbmplus.tar.Z There is also a faxtopbm and pbmtofax in the ISO Development package (ISODE-6.0) that also does two dimensional encoding. The whole package (something like 4 MB) can be FTPed from: nisc.nyser.net:pub/isode/isode-6.tar.Z And the files are in isode-6.0/others/quipu/photo. However, they are a little tied to the rest of the package. I have the pbmtofax working and am probably going to pull faxtopbm out of the package (anyone else already done this?). You can FTP just these files from me at sam.cs.cmu.edu:/afs/cs/user/vac/photo.tar.Z Also, pgmtops can do run length encoding so that the postscript file is smaller (for my file it was about a factor of 4) but the printer was so slow at decompressing that it was better to send the file without this even with a 1 KB/second serial link to the printer. Below is the head of the file that "pgmtops -rle" produced. Are there any postscript hackers than can recode the "readrlestring" so that it runs faster? Vince Cate vac@cs.cmu.edu %!PS-Adobe-2.0 EPSF-2.0 %%Creator: pgmtops %%Title: r240.ps %%Pages: 1 %%BoundingBox: -7 -9 619 801 %%EndComments %%EndProlog /rlestr1 1 string def /rlestr 128 string def /readrlestring { currentfile rlestr1 readhexstring pop 0 get dup 127 le { currentfile rlestr 0 4 3 roll 1 add getinterval readhexstring pop } { 256 exch sub dup currentfile rlestr1 readhexstring pop 0 get exch 0 exch 1 exch 1 sub { rlestr exch 2 index put } for pop rlestr exch 0 exch getinterval } ifelse } bind def %%EndProlog %%Page 1 1 gsave -7.59399 -9.90759 translate 627.188 811.815 scale 2040 2641 1 [ 2040 0 0 -2641 0 2641 ] { readrlestring } image 00f88000820000f88000820000f88000820000f88000820000f880008200 00fc8000820000f88000820000f88000820000f88000820000f880008200 00f88000820000f88000820000f88000820000f88000820000f880008200 00fc8000820000fc8000820000f88000820000f88000820000f880008200 00f88000820000f88000820000f88000820000f88000820000f880008200 00f88000820000f88000820000f88000820000f88000820000f88f000e04 40510000001101f7d40400040014820000f8ad000415001d1541f7001541 7000000004000051c444400000004157ffffdf51c5faff03577ffffff600 023d0404900000f8bf000545fffd404010f9000205515ff8ff0675500000 0145dff2ff01d71deeff07fc5400041001177ffbff015940930000f0bf00