HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] faxing multiple documents using sendfax & STDIN



* Ross McKerchar <it@xxxxxxxxxxxx> [060118 10:48]:

> However, I would like to be able to sendmail multiple seperate PS or PDF 
> documents in this manner. I have naively tried simpling concatenating 
> the two documents (i.e. "cat test1.ps test2.ps | sendfax -d test@000") 
> but I unsuprisingly get an email telling me the job as failed - sendfax 
> understandably gets confused after reading the 1st  '%%EOF' marker.

Ya, that would result in an invalid PS file.

> Is there any delimiter I can insert to allow sendfax to accept multiple 
> documents via the standard input? I have tried quite hard to avoid 
> writing temporary files to disk in my setup and it would be a shame to 
> have to use them now. I had a quick scan of sendfax.c++ but didn't see 
> anything obvious, although that is most likely attributed to my poor C++ 
> skills.

If you want sendfax to read STDIN, you *need* to have it be a single
document.  One think you could try is using something like psmerge (or
code like it - it's in perl) to "merge" the multiple documents into one
PS document.  But it's not guaranteed to work,the documents have to
have similar structure, etc.

> For a bit of background, this is part of a wider setup I have spent a 
> fair bit of time on which performs faxing of MS Office documents via an 
> email gateway. Once I get it all setup I'll post a wee howto as I'm 
> aware this is an often requested feature.

What is this application written in? It may be just as easy to hand the
documents of to HylaFAX (hfaxd) directly instead of invoking sendfax.
Perl's Net::FTP is great for this.

a.
-- 
Aidan Van Dyk                                             aidan@xxxxxxxx
Senior Software Developer                          +1 215 438-4638 x8103
iFAX Solutions, Inc.                                http://www.ifax.com/

Attachment: signature.asc
Description: Digital signature




Project hosted by iFAX Solutions