question

Khanh Truong avatar image
Khanh Truong asked Phong Vu answered

Remove cover page / header in Python

Hi Team

I would like to know how to remove the cover page and the header ( showing from and to ) in python. Any help will be appreciated.


Here is the code im using to send

def send(self,file): # test.pdf

builder = self.rcsdk.create_multipart_builder()

builder.set_body({

'to': [{'phoneNumber': '+18885xxxxx'}],

'faxResolution': "High",

# 'coverPageText': "This is a demo Fax page from Python"

})

attachment = (file, open(file,'rb').read(), 'application/pdf')

builder.add(attachment)

request = builder.request('/account/~/extension/~/fax')

resp = self.platform.send_request(request)

print ('Fax sent. Message status: ' + resp.json().messageStatus)


sdk
1 |3000

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

Khanh Truong avatar image
Khanh Truong answered

Updated Figured out removing the cover page, now just need to remove headers info :)

builder = self.rcsdk.create_multipart_builder()

builder.set_body({

'to': [{'phoneNumber': '+18885575038'}],

'faxResolution': "High",

'coverIndex':0,

# 'coverPageText': "This is a demo Fax page from Python"

})

1 |3000

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

Phong Vu avatar image
Phong Vu answered

Hi Khanh,

I did some research but found no way to remove the fax header. So it seems impossible. But IMHO, it does not make sense to receive a fax without any information about the sender, date and time etc.

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