|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.rfax.AcrobatFaxProducer
public class AcrobatFaxProducer
creates a fax using PDF as data source. The class uses the PDF JavaBean from Acrobat, please download it from: http://www.adobe.com/products/acrviewer/acrvdnld.html#bean
Example code for faxing:
try {
AcrobatFaxProducer pdf=new AcrobatFaxProducer();
pdf.setPDFFile("c:\\report.pdf");
FaxModem fm= new FaxModem();
pdf.pageImage=new java.awt.image.BufferedImage(800,1290,java.awt.image.BufferedImage.TYPE_INT_RGB);
FaxModem m=new FaxModem();
m.setPortName("COM1");
m.flowControl=m.FLOWCONTROL_XONXOFF;
m.faxClass=1;
m.AtFBOR=true;
m.open(p);
if (m.sendFax("11111111")) System.out.println("Success ***");
else System.out.println("FAILED");
m.close();
}
catch ( Exception e ) { e.printStackTrace();}
Field Summary | |
---|---|
java.awt.Image |
pageImage
image |
Constructor Summary | |
---|---|
AcrobatFaxProducer()
|
Method Summary | |
---|---|
java.awt.Image |
getFaxPage(int page)
get page |
void |
setPDFByte(byte[] b)
set PDF content, initialize everything |
void |
setPDFFile(java.lang.String file)
set PDF File, initialize everything |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.awt.Image pageImage
Constructor Detail |
---|
public AcrobatFaxProducer()
Method Detail |
---|
public java.awt.Image getFaxPage(int page)
FaxProducer
getFaxPage
in interface FaxProducer
public void setPDFFile(java.lang.String file) throws java.lang.Exception
java.lang.Exception
public void setPDFByte(byte[] b) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |