JDBC Driver for Xero

Build 25.0.9434

DownloadPDF

Downloads a specified document in PDF format from Xero. It's useful for obtaining physical copies of invoices, quotes, or other reports.

Input

Name Type Required Accepts Output Streams Description
Table String True False The name of the table containing the document to be downloaded. This specifies the source location where the document resides, such as 'Invoices', 'Orders', or 'Contracts', helping to identify the correct document to retrieve.

The allowed values are Invoices, CreditNotes, Quotes.

ObjectId String True False The unique identifier of the item (such as an invoice, order, or contract) to download as a PDF. This ID ensures that the correct document is retrieved and converted into PDF format.
DownloadPath String False False The full file path where the downloaded PDF document will be saved. This field must specify a complete path, including the directory and filename, to properly store the PDF on the file system.
FileStream String False True An output stream instance used to write the file data. This is used when 'DownloadPath' is not provided, allowing the file to be streamed to an external location, such as an API or remote server.
TenantId String False False The unique identifier of the tenant. This ensures the query is performed for a specific tenant's data, useful in multi-tenant systems to isolate the data for a particular organization or account.

Result Set Columns

Name Type Description
Success String A boolean indicating whether the operation was successful. 'True' means the document was successfully downloaded and converted into PDF format, while 'false' indicates an error occurred during the process.
FileData String Contains the base64-encoded content of the document. This is populated when neither 'DownloadPath' nor 'FileStream' is provided, allowing the document to be transferred or stored in Base64-encoded format instead of as a file.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434