Can you share simple Program for sending attached PDF document via FAX using JobSubmit service.
Comments
-
Click on the URL for JobSubmit Fax sample.
https://apiforums.easylink.com/content/c-sample-jobsubmit-fax-options
0 -
Hi @Prabhakr_2018 ,
I'm looking for a sample implementation for Java. I have a code but it doesn't attach a jpeg/tiff document to the fax using JobSubmit Service. There's no DocumentType in the job submit service so I'm using the code below instead. I tried using setting DocumentSet in the request but it doesn't work. On another option, I also tried setting the document in the ContentPartType but I'm getting errors with the treatment, pulltypeoptions and addrtypeuse.
Below is the code that I used:
DocDataType data =
new DocDataType();
data.setFormat(DocEncodingFormat.base64);
data.set_value("This is a test.");
DocumentType doc =
new DocumentType();
doc.setDocType("JPEG");
doc.setDocData(data);
doc.setRef("test");
doc.setFilename(new EncodableStringType());
doc.getFilename().set_value("C:\\Users\\Administrator\\Downloads\\eyes.jpeg"); //D:\\test.txt");
DocumentType[] docArr = {doc};
req.setDocumentSet(docArr);
// Message(s)
MessageType msg =
new MessageType();
ContentsType contents =
new ContentsType();
ContentPartType part =
new ContentPartType();
// AddressType[] addressType = {AddressType.fax};
part.setTreatment(TreatmentType.attachment);
// part.setAddrTypeUse(addressType);
// part.setPullfileOptions(new PullfileOptionsType());
part.setDocRef("test");
// part.setDocument(doc);
System.out.println("getDocument:::: "+part.getDocument());
ContentPartType[] partArr = {part};
contents.setPart(partArr);
msg.setContents(contents);
Can you please advise on how to proceed? Thanks.
0 -
Hi Angief,
If you want to attach PDF or JPEG or any type of acceptable formats by Jobsubmit API then you need to encode it to base64 and you set encoded value in DocData element as shown below:
DocDataType data =new DocDataType();
data.setFormat(DocEncodingFormat.base64);
data.set_value("/9j/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQk4fD3wCv8O1k9QRlbUSshija6RjS5rLBrRmJyl1nBJLGNkkkksYSSSSxhJJJLGEkkksYSSSSxhJJJLGEkkksYSSSSxj//2Q==");
DocumentType doc =new DocumentType();
doc.setDocType("JPEG");
doc.setDocData(data);
doc.setRef("test");
doc.setFilename(new EncodableStringType());
doc.getFilename().set_value("test.jpeg");
0 -
Thanks for your reply.
In our cover page, we have "Notes" and we assigned it in data.set_value with a text value but in your example above., you assigned it with a base64 data. where can I assign the notes value now as shown in our cover page below: Is there anywhere else in the API where I can assign a text value to Notes?
used
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories