Scan your whole stack
From OX Research Newsroom
Are you using pdfboss?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.16.3
pdfboss was last scanned on 27 Nov 2026 at version 2.16.3. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.16.3 LATEST | 27 Nov 2026 | No rules fired |
| 2.16.2 | 13 Nov 2026 | No rules fired |
| 2.16.1 | 28 Oct 2026 | No rules fired |
| 2.16.0 | 26 Oct 2026 | Not shown |
| 2.15.1 | 12 Oct 2026 | Not shown |
Findings for v2.16.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.16.3; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Reading a PDF should not require a C library. pdfboss is a clean-room reader built from the ISO 32000 specification: safe Rust, no C dependencies, no bindings to another engine, one core behind the CLI and the native Python extension. It is a lenient reader: real-world files are damaged, so it reconstructs broken cross-reference tables, tolerates wrong stream lengths, and skips garbage operators instead of refusing.
format= in Python and by the -o extension on the CLI (guide).http(s):// URLs and fetch only the byte ranges they need, never the whole file.pdfboss tui): element tree, object inspector, hex view, page and Markdown previews.pip install pdfboss # prebuilt abi3 wheels (CPython 3.12+), no toolchain required
cargo install pdfboss-cli # the `pdfboss` binary
Coding agents get a bundled skill: pdfboss skill install writes it into the agent's skill directory, and npx skills add 4thel00z/pdfboss installs it from skills.sh.
pdfboss info report.pdf # version, page count, sizes, metadata
pdfboss text report.pdf --page 2 # extract text (omit --page for all)
pdfboss md report.pdf # markdown: headings, lists, tables from layout
pdfboss render report.pdf --page 1 -o page.png --scale 2.0 # or .ppm / .bmp / .jpg
pdfboss images report.pdf # extract embedded images as native-size PNGs
pdfboss tui report.pdf # interactive terminal explorer
pdfboss meta report.pdf -o out.pdf --set title="Q3 Report" # edit metadata, appended as an update
pdfboss encrypt report.pdf -o locked.pdf --user-password hunter2 # AES-256 protect a fresh copy
pdfboss decrypt locked.pdf -o report.pdf --password hunter2 # remove protection, a fresh plain copy
pdfboss create blank -o out.pdf --pages 3 # new PDF: empty pages
pdfboss create text notes.txt -o out.pdf # new PDF: word-wrapped text
pdfboss create images a.png b.jpg -o out.pdf # new PDF: one page per image
pdfboss create md notes.md -o out.pdf # new PDF: markdown composed with a CSS theme
pdfboss create manifest q3.toml -o out.pdf # new PDF: TOML manifest (metadata, pages, text, paragraphs, images, links)
import pdfboss
doc = pdfboss.Document("report.pdf") # or Document(data=raw_bytes)
text = doc.extract_text()
md = doc.extract_markdown() # headings, lists and tables inferred from layout
png = doc[0].render(scale=2.0) # PNG bytes; format="ppm"/"bmp" for raw pixels, "jpeg" for lossy
imgs = doc[0].extract_images() # embedded images: .data (PNG), .width, .height
fields = doc.form_fields() # interactive form: .name, .field_type, .text, .checked, .selected
toc = doc.outline() # bookmarks: .title, .page, .children; also page_labels(), embedded_files()
intents = doc.output_intents() # also is_linearized(), articles(), permission_handlers(), doc[0].thumbnail_image(), doc[0].presentation()
layers = doc.optional_content_groups() # PDF layers: .name, .intent, .usage.print, .visible on screen; event="print" | "export" | None
scales = doc[0].viewports() # measurement viewports: .bbox, .measure.distance; also doc[0].separation_info(), doc.requirements(), doc.legal_attestation()
notes = doc[0].annotations() # annotations: .subtype, .rect, .contents, .markup.title, .destination.page, .action.uri; also .additional_actions()
items = doc[0].content_items() # tagged page in structure-tree order: .kind ("sequence"/"object"), .mcid, .ref, .rank, .standard_type
pdf = pdfboss.md.to_pdf(open("notes.md").read()) # markdown -> themed PDF bytes
pdfboss.write composes a Pdf from Python: pages and elements join with |, and save/to_bytes builds the file bytes once:
from pdfboss.write import Link, Metadata, Page, Paragraph, Pdf, Standard14, Text
cover = (
Page(size="a4")
| Text("Q3 Report", at=(72, 770), font=Standard14.HELVETICA_BOLD, size=28)
| Paragraph("Prepared for the board.", rect=(72, 700, 500, 740))
| Link(rect=(72, 60, 200, 80), url="https://example.com/q3")
)
data = (Pdf() | Metadata(title="Q3 Report") | cover).to_bytes()
An Outline of nested Bookmarks becomes the document's bookmark panel (Pdf.outline); Attachment objects embed arbitrary files inside the document (Pdf.attachments); PageLabel ranges control how page numbers render in viewer UI (Pdf.page_labels); and a Viewer sets the document's opening layout, mode, and page (Pdf.viewer). Each slots into Pdf with |, exactly like Metadata.
Existing files are watermarked in place: pdfboss.write.watermark(data, overlay) returns data with the first page of overlay drawn over every page, as an incremental update appended to the original bytes, so the result grows by the overlay page's size and takes no longer than parsing the two files. rewrite=True writes a fresh, compressed file instead, which usually comes out smaller than the original; under=True draws the overlay beneath the page's own content instead of on top of it. The CLI form is pdfboss overlay report.pdf draft.pdf -o out.pdf --under.
pdfboss.write.Update edits an existing file's metadata the same way, and pdfboss meta (above) is its CLI: staged set_metadata fields become an appended update, the base file's bytes untouched; an encrypted base is refused.
import pdfboss
from pdfboss.write import Update
update = Update(pdfboss.Document("report.pdf"))
update.set_metadata(title="Q3 Report", author="Finance")
update.save("report-titled.pdf")
use pdfboss_core::Document;
use pdfboss_write::{Metadata, Update};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let doc = Document::open("report.pdf")?;
let mut update = Update::new(&doc)?;
update.set_metadata(Metadata {
title: Some("Q3 Report".to_string()),
author: Some("Finance".to_string()),
..Metadata::default()
})?;
update.save("report-titled.pdf")?;
Ok(())
}
Seven more commands assemble or protect documents out of existing ones, each also available from pdfboss.write and pdfboss_write directly:
| Command | What it does | Default | Full rewrite |
|---|---|---|---|
pdfboss merge |
Combine selected pages from several inputs into one fresh document, in argument order | always a fresh document | (its only mode) |
pdfboss split |
Cut a document into consecutive chunks of pages | always fresh documents | (its only mode) |
pdfboss rotate |
Rotate selected pages by a quarter-turn multiple, clockwise | appends an incremental update | --rewrite |
pdfboss overlay |
Draw one file's first page onto every page of another, on top or beneath its content | appends an incremental update | --rewrite |
pdfboss rewrite |
Rewrite a document fresh, with no page change | always a fresh document | (its only mode) |
pdfboss encrypt |
AES-256 protect a document, restricted by --allow |
always a fresh document | (its only mode) |
pdfboss decrypt |
Remove AES-256 protection from a document | always a fresh document | (its only mode) |
merge, split, rewrite, encrypt and decrypt always run on pdfboss_write::Importer, which renumbers each source object once and copies it into the output; rotate's and overlay's --rewrite modes do too, but their defaults instead append through Update, the same way meta does. A merged document keeps only the pages it imports, so document-level trees carried by the inputs, such as outlines, name trees and optional content, are not part of the result. At the CLI, merge, split, rotate, rewrite and overlay refuse every encrypted input outright, whether or not the password opened it; overlay checks its base and its overlay file separately, so the error names whichever one is encrypted. encrypt and decrypt are the exception: --password opens an already-encrypted input, so encrypt re-protects it under new passwords and decrypt strips it.
A split can also hand out its parts one at a time instead of all at once. In Python, pdfboss.write.split_parts yields each part as it is built, under for or async for, and split_stream does the same for a PDF arriving as an async iterable of chunks, such as an upload body. In Rust, pdfboss_write::copy_pages_with builds one part from any document, sync or async, into any byte sink. See One part at a time.
Explorer subcommands. Each except obj accepts a local path or an http(s):// URL, fetched in ranges and never downloaded whole:
pdfboss json report.pdf # dump the document as a JSON value tree
pdfboss json report.pdf --layout # ...plus per-page layout blocks
pdfboss hex report.pdf obj:5 # hexdump the file or a selected element
pdfboss q report.pdf '.header.version' # jq-style queries over the JSON tree
pdfboss obj report.pdf 5 # pretty-print object 5
page = doc[0]
print(page.width, page.height, page.rotation)
for element in doc.elements(): # lazy: physical + logical, byte spans included
print(element.kind, element.span)
# Async access over files or http(s) URLs, without reading the whole document.
doc = await pdfboss.AsyncDocument.open_url("https://example.com/report.pdf")
async for element in doc.elements():
print(element.kind, element.value())
# Headers ride on every request, the HEAD included, for URLs behind a token.
doc = await pdfboss.AsyncDocument.open_url(
"https://example.com/private/report.pdf", headers={"Authorization": "Bearer …"}
)
Rust: the library crates are on crates.io (cargo add pdfboss-core pdfboss-text pdfboss-output pdfboss-render pdfboss-write pdfboss-markdown pdfboss-aio pdfboss-tui):
use pdfboss_core::Document;
use pdfboss_output::ReadingOrder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let doc = Document::open("report.pdf")?;
let page = doc.page(0)?;
let text = pdfboss_output::extract_text(&doc, &page, ReadingOrder::Content)?;
let markdown = pdfboss_output::extract_markdown(&doc, ReadingOrder::Content)?;
println!("{text}\n{markdown}");
let pixmap = pdfboss_render::render_page(&doc, &page, 2.0)?;
pixmap.save_png("page.png")?;
let images = pdfboss_render::extract_page_images(&doc, &page)?;
println!("{} embedded images", images.len());
Ok(())
}
pdfboss images, Page.extract_images() and pdfboss_render::extract_page_images decode every image a page draws (inline images included) at the image's own pixel dimensions, in drawing order, with /SMask alpha applied. An image drawn twice appears twice, and stencil masks (/ImageMask true) paint a fill color rather than carrying pixels of their own, so they are skipped.
Real pages draw one-pixel strips and spacers; a size filter keeps the pictures:
import pdfboss
doc = pdfboss.Document("report.pdf")
for index in range(len(doc)):
for n, image in enumerate(doc[index].extract_images()):
if image.width < 64 or image.height < 64:
continue
with open(f"page-{index}-img-{n}.png", "wb") as out:
out.write(image.data)
The same walk from Rust, one Pixmap per image:
use pdfboss_core::Document;
use pdfboss_render::extract_page_images;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let doc = Document::open("report.pdf")?;
for index in 0..doc.page_count() {
let page = doc.page(index)?;
for (n, image) in extract_page_images(&doc, &page)?.iter().enumerate() {
if image.width < 64 || image.height < 64 {
continue;
}
image.save_png(format!("page-{index}-img-{n}.png"))?;
}
}
Ok(())
}
pdfboss-write is the write-side twin of the reader: plain structs compose the document (Pdf, Page, PageSize), a Canvas paints content, and a COS-level writer serializes it. Output is deterministic: the same input produces byte-identical files, and the crate never reads clocks or randomness, so dates appear only when supplied.
use pdfboss_write::{Color, ImageData, Page, PageSize, Pdf, Standard14};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut page = Page::new(PageSize::A4);
let canvas = &mut page.canvas;
canvas.text("Quarterly report", 72.0, 760.0, Standard14::HelveticaBold, 24.0)?;
canvas.set_fill(Color::Rgb(0.13, 0.45, 0.85));
canvas.rect(72.0, 744.0, 451.0, 4.0);
canvas.fill();
let chart = canvas.add_image(ImageData::png(&std::fs::read("chart.png")?)?);
canvas.draw_image(chart, 72.0, 480.0, 320.0, 240.0);
let pdf = Pdf {
pages: vec![page],
..Pdf::default()
};
pdf.save("report.pdf")?;
Ok(())
}
The CLI covers the common shapes as one-liners:
pdfboss create blank -o blank.pdf --pages 3 --size letter
pdfboss create text notes.txt -o notes.pdf --font times-roman --font-size 12
pdfboss create images scan1.png photo.jpg -o scans.pdf
And CommonMark+GFM composes straight into a themed, paginated PDF (headings, lists, tables, code blocks, clickable links and images), deterministically, from all three surfaces. A theme is a small CSS subset over element-type selectors, overlaid on the built-in default; the Helvetica, Times and Courier families are available, and characters outside them are replaced with ? and reported:
body { font-family: times; font-size: 10.5pt; color: #222; }
h1 { font-family: helvetica; font-size: 2.2em; color: #a33; }
code { font-family: courier; background-color: #eee; }
pre { background-color: #eee; padding: 8pt; }
from pathlib import Path
import pdfboss
pdf = pdfboss.md.to_pdf(
Path("notes.md").read_text(),
theme=Path("theme.css").read_text(), # CSS source text, not a path
size="letter",
)
Path("notes.pdf").write_bytes(pdf)
pdfboss create md notes.md -o notes.pdf --theme theme.css --size letter
In Rust, pdfboss_markdown::to_pdf returns the composed Pdf value plus a report of anything sanitized, ready for save/to_bytes or further canvas work.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.