Preview PDF HTTP responses directly in the Caido Response viewer, rendered with pdf.js.
When an HTTP response is a PDF, this plugin adds a PDF Preview tab to the response pane and renders it inline β with selectable text, a thumbnail sidebar, zoom, page navigation and download. The tab appears everywhere Caido shows a response: HTTP History, Replay, Intercept and Sitemap.
- π Automatic detection β the tab only shows up for PDFs (via
Content-Type: application/pdfor the%PDF-magic bytes). - π€ Selectable text β real pdf.js text layer, so you can select and copy.
- πΌοΈ Thumbnail sidebar β click a page to jump to it; the active page is highlighted and kept in sync while you scroll.
- β‘ Lazy rendering β pages and thumbnails render on demand, so large PDFs stay responsive.
- π Zoom & navigation β zoom in/out, previous/next page, page counter.
- πΎ Download β save the PDF from the response.
- π§± Byte-faithful β a small backend plugin reads the real response bytes and transparently handles gzip/deflate encoded bodies.
Screenshots coming soon.
Once published, open Caido β Plugins β Community Store, search for βPDF Previewβ, and install it.
- Download
plugin_package.zipfrom the latest release. - In Caido, go to Plugins β Installed β Install Package and select the zip.
- Frontend (
packages/frontend) β a Vue 3 component registered viasdk.<page>.addResponseViewMode(...). Itswhen()predicate inspects the raw response so the tab only shows for PDFs. Rendering uses pdf.js with the worker inlined into the bundle (?worker&inline), so there is no separate asset for Caido to serve. - Backend (
packages/backend) β exposesgetResponseBodyBase64(id). The frontend can only seeresponse.rawas a JS string, which is unreliable for binary data. The backend reads the real bytes throughsdk.requests.get(id).response.getBody().toRaw()and base64-encodes them so the PDF survives the JSON-RPC boundary intact, reportingContent-Encodingso the frontend can decompress. If the backend call fails, the frontend falls back to reconstructing bytes fromresponse.raw.
Requires pnpm and Node 18+.
pnpm install
pnpm build # -> dist/plugin_package.zip
pnpm watch # iterative development
pnpm -r typecheckcaido.config.ts # plugin config -> generates manifest.json + zip
packages/
backend/src/index.ts # getResponseBodyBase64 RPC endpoint
frontend/
src/index.ts # registers the PDF Preview response view mode
src/pdf.ts # pdf.js worker setup + page/text-layer rendering
src/bytes.ts # %PDF detection + gzip/deflate normalization
src/views/PdfPreview.vue
src/types.ts # typed backend API surface
See PUBLISHING.md for the full release + Caido store submission process (signing key, GitHub release, store PR).
This plugin bundles pdf.js (pdfjs-dist),
Β© Mozilla, licensed under the Apache License 2.0.
See NOTICE.
MIT Β© William Le Berre