How to display pdf

Hi @kje,

We have the same request performed by http node, which returns the file response correctly:

Our node output:

Code for our operation:

        let responseData;
		const returnData = [];

if (operation === 'downloadDocument') {
					const documentID = this.getNodeParameter('documentID', i) as string;
					const options: OptionsWithUri = {
						headers: {
							Accept: 'application/pdf',
						},
						method: 'GET',
						body: {},
						uri: `https://${tenant}.${server}/v1/document/id/${documentID}/download`,
						json: true,
					};

					responseData = await this.helpers.requestWithAuthentication.call(
						this,
						'weclappApi',
						options,
					);
					returnData.push(responseData);
				}

return [this.helpers.returnJsonArray(returnData)];

We can see here that http request node returns the file in the Binary form. Also, it is possible to download it and view it. How can we adjust our node to output the binary file correctly like the http request node?