Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Visual Git Diff — Images & PDFsNew to Visual Studio Code? Get it now.
Visual Git Diff — Images & PDFs

Visual Git Diff — Images & PDFs

Artem Voronov

|
4 installs
| (0) | Free
Pixel-level git diff for figures, plots, images and PDFs: see exactly which pixels changed against HEAD, the index or any ref, as a highlight, side by side or overlay. PDFs are rasterised with poppler on the machine where the repo lives.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Visual Git Diff — Images & PDFs

Works for PDFs and for images (png, jpg, gif, bmp, webp, svg, ico, avif).

VS Code's built-in diff editor is text-only, so clicking a modified PDF in Source Control either hangs or shows nothing. This extension rasterises the committed version and the working copy with pdftoppm and shows them in a webview with three modes:

  • Highlight – the working copy with every changed pixel painted. Red = ink that is new, blue = ink that was removed. Threshold slider and "dim unchanged" toggle.
  • Side by side – committed version on the left, working copy on the right.
  • Overlay – working copy drawn over the committed version with an opacity slider and a blink button.

Pages, zoom and the reference (HEAD, staged, any commit) can be changed from the toolbar. The view refreshes automatically when the PDF is rewritten on disk (e.g. after re-running the plotting script).

How to open

  • Just click the modified PDF in the Source Control view: the extension replaces VS Code's text diff tab (which cannot show PDFs) with its own view. Disable with pdfGitDiff.interceptScmDiff. (Mechanism: a read-only custom editor is associated with git:/**/*.pdf in workbench.editorAssociations; when VS Code resolves it for the committed side it opens this view instead. Logs: Output panel → "Visual Git Diff".)
  • Right-click a .pdf or image in the Explorer or in the Source Control changes list → Compare PDF with HEAD / Compare PDF with Ref…
  • Command palette → Visual Git Diff: Pick a changed PDF to compare
  • Keyboard inside the view: 1 2 3 switch modes, ← → change page, b blink, f fit.

Requirements

pdftoppm and pdfinfo (poppler-utils) and git on the machine where the repository is (the extension runs on the remote side in Remote-SSH).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft