Documentation Index
Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
Use this file to discover all available pages before exploring further.
Example Response Data
{"pdf":"<BASE64_ENCODED_DATA>"}
Displaying in Browser
import groovy.json.JsonSlurper
import java.util.Base64
def slurper = new JsonSlurper()
def parsedJson = slurper.parseText(responseBodyTextFromTargetAPI)
def pdfAsBase64 = parsedJson.data;
responseBodyTextToClient = new String(Base64.decoder.decode(pdfAsBase64), "UTF-8")
responseHeaderMapToClient.put("Content-Type", "application/pdf")
responseHeaderMapToClient.put("Content-Disposition", "inline")
Not every web browser may provide this display.
PDF Download Operation
import groovy.json.JsonSlurper
import java.util.Base64
def slurper = new JsonSlurper()
def parsedJson = slurper.parseText(responseBodyTextFromTargetAPI)
def pdfAsBase64 = parsedJson.data;
responseBodyTextToClient = new String(Base64.decoder.decode(pdfAsBase64), "UTF-8")
responseHeaderMapToClient.put("Content-Type", "application/pdf")
responseHeaderMapToClient.put("Content-Disposition", "attachment")
In both operations, it should be verified that the PDF content is reflected correctly. This script should be run on the response line (Response Policy).