Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Michael_R on December 10, 2004, 10:22:25 AM

Title: Hylafax - Watermark, Backgroundimage
Post by: Michael_R on December 10, 2004, 10:22:25 AM
Hi
i ve got a running Hylafax 4.2.0 on my SME 6.0.1-machine and i want to put a watermark in the background of every fax-page. I ve allready created a faxcover. This was no problem, but the watermark. I ve searched in different mailing-lists but i found no good explanation ;(. Can anyone tell me which file of hylafax i have to edit? I ve allready converted the image that i want in the background to a ps-file.
Is it right that i ve to add a rule to the file 'typerules'?
plz help me

Michael
Title: Hylafax - Watermark, Backgroundimage
Post by: mbachmann on December 10, 2004, 12:38:00 PM
It's only a guess but haven't  you checked the hylafax docs? I think a read about it in there. But you have to dive in the secrets of postscript language.
Title: Hylafax - Watermark, Backgroundimage
Post by: chaloner on December 13, 2004, 05:07:44 PM
http://www.hylafax.org/HylaFAQ/Q701.html
Title: Hylafax - Watermark, Backgroundimage
Post by: Michael_R on December 14, 2004, 03:43:49 PM
Hi ..
@Chaloner this is one of the links i have found myself but the article there isn´t very helpfully.
I think its the smallest problem to convert a image to a postscript-file or create a postscript that prints a word diagonally accross a page.
The problem that i have is where to add the postscript that EVERY faxed page have the same background. I ve searched at the hylafax-docs but only found something about a faxcover which i ve allready included. I m not very familar with postscript, because of that i ve hoped that anyone here have done something like this before.
I´m trying to edit the ps2fax-file of hylafax at the moment but not sure if it ll work.
If i got something working out i ll post it here.
Title: Hylafax - Watermark, Backgroundimage
Post by: mbachmann on December 14, 2004, 05:14:58 PM
I have tried the same with hylafax gave it up. I tried using an image stored on a sd-card which stuck in some kyocera printer. But i was not able to convince hylafax to use that as bgimage. It was easy to make a letterhead but not both a letterhead AND a background-image onto the same page.

I think the last sentence from chaloners hint is important: Merge something like this (a exercise left to someone else) with the postscript sent to Hylafax.

Maybe there is an option hidden where you can sent an image to hylafax which then is converted to ps and then use that image?
Title: Re: Hylafax - Watermark, Backgroundimage
Post by: k_graham on December 16, 2004, 07:05:26 AM
Quote from: "Michael_R"
Hi
 I ve allready created a faxcover. This was no problem
Michael


Care to point me to the method.

Thanks,

Ken
Title: Hylafax - Watermark, Backgroundimage
Post by: Michael_R on December 16, 2004, 10:44:37 AM
Hi K_Graham,

Adding a faxcover isn´t very complex. There is a example-faxcover in the hylafax-folder. I ve only edited this one and copy it to a accessible directory for example in the Primaray-Ibay.(\\<serverip>\Primary\fax\deckblatt) Then tell WHFC  (windows-fax-client) the path of the faxcover. Now you can use the faxcover and the adress-data you typed in whfc is printed on the faxcover.

My idea for a background-image is to edit the file ps2fax.gz in the folder /var/spool/hylafax/bin .
I ve edited the end of the file that it looks like:

---------------------------------------------------
...
...
cat cover.ps > temp.ps #write the cover.ps in temp.ps
cat $fil >> temp.ps    #add fax to the end of temp.ps
fil=temp.ps            #set the fax=new ps file

$CAT $fil | $PS -q \   #print the fax
   -sDEVICE=$device \
   -dNOPAUSE \
   -dSAVER=true \
   -sPAPERSITZ=$paper \
   -dFIXEDMEDIA \
   -r$HRES\x$VRES \
   "-sOutputFile=$out" \
    -
rm temp.ps             #remove the temp-file

----------------------------------------------------
With this changes in your ps2fax.gz you can edit the ps-file which will be sent as a fax. The cover.ps is the file for the backgroundimage. You have to copy it to the folder /var/spool/hylafax or where your hylafax-install is. My problem is how to edit the cover.ps that the following data from $fil is printed on the same page. I allways got 2 pages, one for the cover.ps and one for the following faxdata.
I hope anyone can give me a hint how the cover.ps have to look.

Michael
Title: Hylafax - Watermark, Backgroundimage
Post by: mbachmann on December 16, 2004, 02:20:28 PM
... always got 2 pages, one for the cover.ps and one for the following faxdata - that's exactly where i ended up.