MSG files not converting to PDF

MSG files not converting to PDF

If you are using our upload file method, this could be related to the way files are uploaded into the presigned link.

Please try to add the following header when you are uploading .msg file into the presigned URL using PUT command:

Content-Type: application/octet-stream

So it should like like this:

curl --location --request PUT '<insert link from presignedUrl generated by GET /file/upload/get-presigned-url >' \
--header 'Content-Type: application/octet-stream' \
--header 'x-api-key: {{x-api-key}}' \
--data-binary '@./sample.msg'

However, if you're storing your MSG files in Google Drive this could be caused by Google Drive. Google Drive does not allow us to force binary format for downloading. Most likely, some of your MSG files contain uncompressed html text inside with and tags and looks like this makes Google to detects and treat such files as text/html.

So, the only way for to solve this problem is to use another file sharing service instead that is not doing the auto detection inside files and not changing the way it is returned to a user.

You may also upload files directly to PDF.co instead of Google Drive using our upload file workflow (see API docs for more information).

Another workaround you may want to try is to scan file for HTML tags inside and do not upload such file into Google Drive. But it is just a suggestion because we don't know 100% for sure which algorithm is used by Google Drive.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.