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] How to send PDF file?
Using the Gnu Hylafax Java Sources:
http://www.net-foundry.com/java/gnu/hylafax/
The following should be a good example of sending a pdf as a fax to a
hylafax server. It is no different to sending any other file. You will need
to modify the strings to work with your service and files however.
I hope it helps.
Chris Parsons,
InfoTec Communications.
**************************************
import gnu.hylafax.*;
public class sendfax {
public static void main(String[] args) {
sendfax sender = new Sendfax();
}
public sendfax() {
private HylaFAXClient faxc = new HylaFAXClient();
faxc = new HylaFAXClient();
faxc.setDebug(true); // enable debug messages
faxc.open("faxserver"); // connect to the faxserver.
if(faxc.user("user")){ //Supply username.
faxc.pass("password"); //Supply password if called for it.
}
faxc.noop(); // for the heck of it
faxc.tzone(HylaFAXClientProtocol.TZONE_LOCAL);
//Set local timezone.
faxc.setPassive(false);
} catch (Exception e) {
System.err.println("Cannot connect to the faxserver.....");
e.printStackTrace();
}
Job job= faxc.createJob(); // start a new job
// set job properties
job.setFromUser("User");
job.setNotifyAddress("faxsender@xxxxxxxx");
job.setKilltime("000259"); //Set killtime to just under 3 hours
job.setMaximumDials(12); //Set maximum number of dials.
job.setMaximumTries(3); //Set maximum number of retries
job.setPriority(127); //Set standard priority.
job.setVerticalResolution(job.RESOLUTION_MEDIUM); //Low Res....
job.setNotifyType("none"); //Dont notify me.
job.setChopThreshold(3);
job.setDialstring("1800800800"); //Set the dialstring to be
used.
job.setExternalNumber("1800800800"); //Set the number to be
displayed.
job.setToCompany("InfoTec");
job.setToLocation("Main Office");
job.addDocument("~user/testfile.pdf"); //Add an attachment (PDF
File.)
job.addDocument("~user/testfile2.pdf"); //Add another attachment
job.addDocument("~user/testfile3.pdf"); //Add another attachment
faxc.submit(job); //Send the job.
}
} //end class.
****************************
> -----Original Message-----
> From: hylafax-users-bounce@xxxxxxxxxxx
> [mailto:hylafax-users-bounce@xxxxxxxxxxx]On Behalf Of George xu(163)
> Sent: Monday, 19 April 2004 11:06 AM
> To: Chris Parsons; 'Lee Howard'
> Cc: hylafax-users@xxxxxxxxxxx
> Subject: Re: [hylafax-users] How to send PDF file?
>
>
> Thanks for you guys feedback.
>
> Would you please share some code in Java to me how I can send
> PostScript,
> PDF, and TIFF?
>
> Thanks again.
> Rabbit.
>
> ----- Original Message -----
> From: "Chris Parsons" <chrisp@xxxxxxxxxxxxxx>
> To: "'Lee Howard'" <faxguy@xxxxxxxxxxxxxxxx>; "'George xu(163)'"
> <rabbitxu@xxxxxxx>
> Cc: <hylafax-users@xxxxxxxxxxx>
> Sent: Monday, April 19, 2004 7:53 AM
> Subject: RE: [hylafax-users] How to send PDF file?
>
>
> > Thats exactly what we do here... Build and then send a PDF
> from a Java
> > client. Very effective.
> > So as mentioned before, Yes you can send PDF's from a Java Client.
> >
> >
> > Chris.
> > Infotec Communications.
> >
> > > -----Original Message-----
> > > From: hylafax-users-bounce@xxxxxxxxxxx
> > > [mailto:hylafax-users-bounce@xxxxxxxxxxx]On Behalf Of Lee Howard
> > > Sent: Sunday, 18 April 2004 12:56 AM
> > > To: George xu(163)
> > > Cc: hylafax-users@xxxxxxxxxxx
> > > Subject: Re: [hylafax-users] How to send PDF file?
> > >
> > >
> > > HylaFAX server can use PostScript, PDF, and TIFF. So yes,
> > > you can use
> > > PDF with Java clients.
> > >
> > > Lee.
> > >
> > >
> > > On 2004.04.17 00:37 George xu(163) wrote:
> > > > Thanks for Pual's answer.
> > > >
> > > > I want to use JAVA to send PDF, not only the the
> sendfax command.
> > > >
> > > > Can anyone has this experience?
> > > >
> > > > Thanks you!
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Paul Eden" <paul@xxxxxxxxxxxxx>
> > > > To: "George xu(163)" <rabbitxu@xxxxxxx>
> > > > Cc: <hylafax-users@xxxxxxxxxxx>
> > > > Sent: Saturday, April 17, 2004 3:34 PM
> > > > Subject: Re: [hylafax-users] How to send PDF file?
> > > >
> > > >
> > > > > > I want to send the PDF document via hylafax server,
> do I need to
> > > > > > convert PDF to PS before I send the PDF file or Hylafax
> > > server can
> > > > > > accept PDF file?
> > > > > >
> > > > > Hylafax can send pdf files as well, at least if you are using
> > > > sendfax.
> > > > > I am not sure about other sending programs.
> > > > >
> > > > > Paul Eden
> > > > >
> > > >
> > > >
> > > > ____________________ 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*
> > > >
> > >
> > > ____________________ 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*
> > >
> > >
> >
>
>
>
> ____________________ 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*
____________________ 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*