question

Sameer Roy avatar image
Sameer Roy asked Admin 02 answered

Configuring a custom cover page

Fax can be send with cover pages, but we want to customize the default cover page by adding images, logo, text with fonts and colors.

How can we override the default page setting in fax and implement a custom cover page?

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Anirban avatar image
Anirban answered

"The RingCentral API supports over 10 different fax cover page templates "

Please check this example: https://github.com/grokify/ringcentral-demos-fax-cover-page

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ALI IMRAAN avatar image
ALI IMRAAN answered ALI IMRAAN edited

HI,

@Anirban Sen Chowdhary,
I have a sandbox account .I am using Java SDK for sending Fax. Whenever i try providing my own custom cover page file in .docx. My Sending Fax Fails. If i remove coverPage by setting it to '0' it also fails.
Only Successfully sent when i go with Default Fax Page.


I am using Below Code to send Fax.

CreateFaxMessageRequest postParameters = new CreateFaxMessageRequest();
        MessageStoreCalleeInfoRequest[] recivingNumbers = new MessageStoreCalleeInfoRequest[updateMessage
                .getReceiverNumber().size()];
        for(int i=0;i<updateMessage.getReceiverNumber().size();i++) {
            recivingNumbers[i] = new MessageStoreCalleeInfoRequest()
                    .phoneNumber(updateMessage.getReceiverNumber().get(i));
        }
        
        postParameters.to = recivingNumbers;
        postParameters.faxResolution = "High";
        postParameters.coverPageText = StringUtils.isNotBlank(updateMessage.getContent()) ? updateMessage.getContent():"" ;
        
        if(!updateMessage.getFaxFileIds().isEmpty()) {
            List<Attachment> attachments = new ArrayList<>();
            if(Objects.nonNull(updateMessage.getFaxCoverPageId())) {
                FaxAttachment  coverPage = this.queueMessageService.getFaxFileAttachment(updateMessage.getFaxCoverPageId());
                postParameters.coverIndex = 0L; 
                Attachment coverPageObj = new Attachment(); 
                coverPageObj.bytes(coverPage.getData());
                coverPageObj.contentType(coverPage.getContentType());
                coverPageObj.fileName(coverPage.getFileName()); 
                attachments.add(coverPageObj);
            } 
            for(ObjectId id:updateMessage.getFaxFileIds()) {
                FaxAttachment  fileAttachment = this.queueMessageService.getFaxFileAttachment(id);
                Attachment attachmentPageObj = new Attachment(); 
                attachmentPageObj.bytes(fileAttachment.getData());
                attachmentPageObj.contentType(fileAttachment.getContentType());
                attachmentPageObj.fileName(fileAttachment.getFileName()); 
                attachments.add(attachmentPageObj);
            }
            
            Attachment[] attachmentsArr = attachments.stream().toArray(Attachment[]::new);
            postParameters.attachments = attachmentsArr;
        }
        
        FaxResponse response = restClient.restapi().account().extension().fax().post(postParameters);
        

Also is there any limitation on Number of Pages in fax for SandBox Account; currently fax with only 2 pages is getting successfully sent.
Image of my custom .docx cover page is as below.


1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Admin 02 avatar image
Admin 02 answered

but they still dont have "page count" field on custom coverpages. smh.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys