Skip to content
This repository was archived by the owner on Sep 27, 2021. It is now read-only.
This repository was archived by the owner on Sep 27, 2021. It is now read-only.

How to extract PDF from a multipart email #17

@winko

Description

@winko

Hello !
Is it possible to read and write to a file a part of a multipart email which is of type application/pdf ???

I have already tried with

    \    ${content-type}=    Get Multipart Content Type
    \    ${payload}=    Get Multipart Payload
    \    Run Keyword If    '${content-type}' == 'application/pdf'    Create File    blablabla_NotDecoded.pdf    ${payload}

but the generated file could not be read by Adobe Reader.

And also

    \    ${content-type}=    Get Multipart Content Type
    \    ${payload}=    Get Multipart Payload    decode=True
    \    Run Keyword If    '${content-type}' == 'application/pdf'    Create File    blablabla_Decoded.pdf    ${payload}

didn't work since RF said: "UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 11: ordinal not in range(128)"

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions