POST pdf document

Postman has a code generation feature. There you can convert the (working) Postman call into source code. Does that work for you?