Resize embedded PDFs in Obsidian with the same wiki-link width syntax used for images.
See CHANGELOG.md for release history.
![[file.pdf|500]]1 to 4096 pixels and enforces a minimum rendered width of 100pxmain.js, manifest.json, and styles.css..obsidian/plugins/pdf-resize/ inside your vault.Add a pixel width after the PDF filename:
![[documents/example.pdf|500]]
The rendered PDF is 500px wide in Reading view and Live Preview. In a narrower pane, it shrinks to fit the available space. Source mode shows the Markdown text, so no resize is applied there.
Widths must be whole numbers from 1 through 4096. Values from 1 through 99 are clamped to the minimum rendered width of 100px; values from 100 through 4096 are used as written. 0, values above 4096, and malformed values are ignored:
![[example.pdf|0]]
![[example.pdf|4097]]
![[example.pdf|wide]]
For example, ![[example.pdf|10]] renders at 100px, while ![[example.pdf|500]] renders at 500px.
![[example.pdf]] keeps Obsidian's default PDF size.
Use Node.js 24 for parity with the reference plugin toolchain.
npm ci
npm run dev
npm run lint
npm test
npm run build
npm ci installs the locked dependency set used by CI and release builds.npm install is appropriate when intentionally updating dependencies.npm run dev builds in watch mode.npm run lint checks source and tests.npm test runs the Vitest suite.npm run build creates production main.js.Do not edit main.js by hand.
GitHub Releases are published by GitHub Actions when a version tag is pushed.
package.json, package-lock.json, manifest.json, versions.json, and CHANGELOG.md.npm run lint, npm test, npm run build, and npm audit --omit=dev --audit-level=high.main, and merge it.main:git tag -s -m "X.Y.Z" X.Y.Z HEAD
git push origin main
git push origin X.Y.Z
The release workflow verifies that the tag version matches package.json, manifest.json, and versions.json, audits production dependencies, runs lint and tests, rebuilds main.js, creates GitHub artifact attestations, and uploads manifest.json, main.js, and styles.css. Obsidian requires the GitHub release tag to match manifest.json exactly, so use 1.0.0, not v1.0.0.
![[file.pdf|500]] in Reading view and Live Preview.1, 10, and 99; confirm each renders at 100px with the toolbar and first PDF page visible.100, 399, 500, and 4096; confirm each uses the requested width.0, 4097, decimals, negative numbers, text, and mixed values are ignored.![[file.pdf]] and non-PDF embeds stay unchanged.PDF Resize works locally. It does not make network requests, collect data, write notes, or change PDF files.