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)


cover pagepython
1 |1000

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 |1000

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 |1000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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