測試路由
ResponseBody:
{
"status": 200,
"message": "ok"
}
將上傳 text-based PDF 轉換成 image-based PDF,並根據需求回傳 Buffer 或下載檔案
note: 目前 responseType 只支援 buffer 或 file
RequestBody:
{
"responseType": "buffer",
"quality": 3,
"file": {UPLOAD_PDF_FILE}
}
ResponseBody if response type is buffer:
{
"status": 200,
"data": {
"message": "convert PDF to image success!",
"buffer": {
"type": "Buffer",
"data": [PDF_FILE_BUFFER]
}
}
}
ResponseHeader if response type is file:
{
"Content-Type": "application/pdf",
"Content-Disposition": "attachment; filename=xxx_converted.pdf"
}
ResponseBody if response type is file:
{DOWNLOAD_PDF_FILE}