PDF → PNG/JPEG descriptors (page model)
Computes per-page filename, MIME, pixel dimensions and orientation from width/height, rotation and DPI; emits descriptors only, with zero raster bytes and no image files.
Inputs and parameters
document— Single document page model (JSON)format— Target formatdpi— DPI (integer 72–300, default 144)
Real example
document={"id":"mixed","pages":[{"id":"land","width":842,"height":595},{"id":"port","width":595,"height":842},{"id":"rot","width":595,"height":842,"rotation":90}]}; format=jpg; dpi=144
→ plan.pageCount=3; descriptors[0]={filename:"page-001.jpg",mime:"image/jpeg",widthPx:1684,heightPx:1190,orientation:"landscape"}; a 90°-rotated portrait page becomes 1684×1190 landscape; every rasterBytes=null and rendered=false.
Limits and failure handling
Only png/jpeg descriptors with integer DPI 72–300; no pixel rendering and no image files; transparency, CJK fonts and searchability of scans are untested (no browser/WASM/real PDF engine this round).
FAQ
Will a PNG be downloaded?
No. There is no image encoder this round; output is an application/json descriptor list with a .json filename.
Is WebP supported?
No, INVALID_IMAGE_FORMAT is returned; only png / jpeg are allowed (jpg normalises to jpeg).