In my Node/Express app I have the following code, which suppose to read a PDF document from a file, and send it to the browser:
var file = fs.createReadStrea
If you are using the Swagger/OpenAPI then you can look in responses section of below code.
/api/pdf_from_html:
post:
tags:
- PDF
description: Create PDF from html
produces:
- application/pdf
consumes:
- application/json
parameters:
- name: contents
description: HTML content to convert to pdf
in: body
required: true
schema:
$ref: "#/definitions/pdf"
responses:
200:
description: Returns a PDF encoded in base64
content:
application/pdf:
schema:
type: string
format: base64