HylaFAX The world's
most advanced open source fax server
|
|
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
Re: HELP ! Faxmail and PDF attachment...
>
> Oh, cheez, yes. Using TIFF, which is a graphical bitmap format, then
> turning it into Postscript, which is a language for describing objects
That's not really true; Postscript is a procedural programming language
optimised for drawing on pages; it is does not carry information about the
original object structure except in as much that reverse compilation might
recover some of it.
> and can be masticated into dealing with bitmaps, then turning *THAT*
> into PDF, which is *ANOTHER* language for objects but is always
> bulkier than Postscript, is just asking for your life to suck.
PDF can be less bulky than Postscript, because Distiller would normally
invoke all the level 2 and beyond Postscript compression options, whereas
a raw Postscript file is most likely to be uncompressed level 1 Postscript.
PDF is capable of wrapping group 3 FAX efficiently, especially if permitted
to create binary mode files (I think the overhead would not be much more
than the TIFF overhead). The problems arise because fax2ps is a
level one Postscript tool and loses the original compression, and ghostscript
doesn't currently (gs5.10) compress images, although it does compress text.
It also doesn't necessarily handle the custom fonts constructed by fax2ps
well.)
> Why not just directly use ghostscript to go from TIFF to PDF? Write a
> custom fax2pdf script?
I did wonder about this, but thought it would be unacceptable for the
responder. I've half written a plain text to PDF filter,
in a relatively small number of lines (110 without the full page tree
construction code) of awk (the original intention was
for business use, and that may still mean I can't release the source code;
Perl was not politically acceptable). Wrapping up the G3 encoded data
from the TIFFs is probably very easy. Extracting it from the TIFF file
may be the part that is difficult to do with something like Perl. Creating
the page tree is a bit fiddly, but you probably don't need an efficient
page tree for relatively small faxes.
I think the real problem here, though, is that most people on the list
nowadays are black box users and don't have the understanding of how things
work which would allow them to know when it is better to not chain tools
together but go direct. They possibly see programs like Distiller and
ghostscript, and assume that every possible PDF creating application has
to be that big.
On the other hand, I read the original question as converting PDF to fax;
it mentions faxmail, in the subject, which is only involved in the outbound
path. This ought to be a fairly straighforward customisation if people
use the correct MIME media type, although with "modern" email clients, that
is unlikely.