Hello, I have the same issue.
Pdf file is generated using python PyPDF4 PdfFileWriter and saved in temporary folder. Then upload that file to current dropbox folder. Upload is successful, file size is same as in temp folder. But file in temp folder can be open with any apps or web browser, uploaded file in dropbox is not opening with the notification "There was an error opening this document. The file is damaged and could not be repaired". Maybe you could help me?