Skip to content

Does anyone know how to handle PDF downloads/uploads? #456

Closed
@nhorton79

Description

@nhorton79

I'm using VBA-Web to access the Xero API and the API reference states I can download an invoice PDF by specifying "application/pdf" in the Accept header.

There doesn't appear to be anything as a standard WebFormat, so would need to be Custom.

I imagine that I would set the values like:

auth_Request.Method = WebMethod.HttpGet
auth_Request.RequestFormat = WebFormat.FormUrlEncoded
auth_Request.Accept = "application/pdf"
WebHelpers.RegisterConverter "pdf", "application/pdf", "MyPDFConverter", "MyPDFParser", , "Binary"
auth_Request.CustomResponseFormat = "pdf"

I imagine that this is correct?

However, I suppose my real question is how to handle the downloading of the file. How to code the two methods to parse and convert the PDF file.

Has anyone done into this before?

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