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] Should i converto to PostScript or PDF?



A J Stiles wrote:

On Tuesday 21 June 2005 20:08, Mark Ratering wrote:


I am going to be sending faxes from a web based order system. When the
web button is pushed, i will take the form information and use it to
cell the faxsend command. The fax that is being sent will start as a
dynamically generated HTML page then be converted into either PDF or
PostScript. Should i convert the HTML to PDF or to PostScript? What
format will HylaFax handle the most gracefully?



Use PostScript, because (1) it's a standard format and (2) there's already a command to do the job, html2ps. "man html2ps" will display the manpage. First of all you probably want to generate a html test page in a file; then you can experiment with this. You want to be able to pipe the html2ps output straight into sendfax, so something like
cat test.php |html2ps -g |sendfax -d$faxno
but you probably will need to play with the options. Once you have a command pipeline that just works, then you can use that in your script instead of outputting to a file. In Perl, you would use something like
open FH, "|html2ps -g |sendfax -d$faxno";
or in PHP,
$fh = popen("html2ps -g |sendfax -d$faxno", "w");


When I did something like this, I just placed the HTML code that makes up the fax into a scalar variable; then it was ready to pipe through html2ps and sendfax and just as easy to display on stdout.

AJS

____________________ HylaFAX(tm) Users Mailing List _______________________
 To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
 *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




There is also a command (htmldoc) that can do a direct conversion to PDF. Postscript looks like it may be the way to go. I think i will develop scripts for both so i can quickly switch is something goes wrong.


____________________ HylaFAX(tm) Users Mailing List _______________________
 To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
 *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions