Put a picture on a PDF page, such as a scanned signature, a logo or a “PAID” stamp, from an image file or the clipboard, then move and resize it and save.
Available in pre-release 3.7
Right-click where the image should go → Annotations → Create Under Cursor → Image From File…, pick the image, drag it into place, and save. At a glance:
- From a file: Insert Image… (
CmdInsertImage). - From the clipboard: Image From Clipboard (
CmdCreateAnnotImageFromClipboard). - Move / resize: drag the image, or its corner handles, in Edit PDF mode.
- Replace an image already in the PDF: right-click it → Selected Image → Replace Image… or Edit Image in Another App.
- Save:
Ctrl + Shift + Ssaves into the PDF;Ctrl + Ssaves to a new PDF.
The image is added as an image stamp annotation. It prints and shows in other PDF readers, and can still be moved or deleted until you flatten the PDF.
Note: the image is a picture of a signature, not a digital signature. To sign with a certificate, see Sign a PDF.
Insert an image from a file #

- Start Insert Image… in any of these ways:
- Right-click the page where the image should go → Annotations → Create Under Cursor → Image From File…
- Right-click the page → Document → Insert Image…
Ctrl + K, thenInsert Imagein Command Palette
- Pick an image: PNG, JPEG, BMP, GIF, TIFF, WebP, HEIC or ICO.
- The image is placed with its top-left corner where you right-clicked (from the Command Palette: at the mouse pointer). It keeps its natural size (96 DPI unless the file says otherwise).
SumatraPDF turns on Edit PDF mode and selects the image, so you can move it right away.

Insert an image from the clipboard #
- Copy an image in another program (for example Copy image in a web browser, or a screenshot).
- Right-click the page where the image should go → Annotations → Create Under Cursor → Image From Clipboard, or
Ctrl + K, thenCreate Image Annotation From Clipboard(placed at the mouse pointer).
When the clipboard has no image, the menu item is greyed out and the command is not in the Command Palette.
Note:
Ctrl + V (Paste Image From Clipboard, CmdPasteClipboardImage) does not put the image on the page. It saves the clipboard image as clipboard.png in the SumatraPDF data folder and opens it in a new tab. In Edit PDF mode, Ctrl + V pastes a copied annotation instead.Move and resize the image #
In Edit PDF mode:
- Move: drag the image.
- Resize: click the image to select it, then drag a resize handle. The image keeps its proportions.
- Delete: select it and press
Delete. - Copy to another page or PDF:
Ctrl + C, thenCtrl + Vat the new spot. See Copy, cut and paste annotations. - Undo:
Ctrl + Z.
Save the PDF #
Ctrl + Shift + Ssaves into the PDF (CmdSaveAnnotations).Ctrl + Ssaves to a new PDF (CmdSaveAnnotationsNewFile). It suggests<name> Copy.pdf.- Or use the Save button at the end of the Edit PDF toolbar. Hover over it for Save changes to a new PDF and Discard changes.
For more ways to save, and the prompt you get when closing with unsaved changes, see Save annotations to the PDF.
Replace an image in the PDF #
An image that is part of the page (a photo, a logo, a scanned figure), not one added as an annotation, can be swapped for another one. Right-click it → Selected Image:
- Replace Image… (
CmdReplaceImage): pick an image file. It is drawn where the old image was, stretched to the same size. - Edit Image in Another App (
CmdEditImageExternally): the image opens in the app Windows edits PNG files with (Paint, unless you changed it). Every time you save in that app, the image in the PDF is replaced with your edit.
Each replacement can be undone with
Ctrl + Z. Save the PDF (Ctrl + Shift + S) to keep it. Only this page changes: if the same image is used on other pages, they keep the old one. An image written inline in the page’s content (rare) can’t be replaced. Windows only.Add an image from the command line #
sumatrapdf-tool run with a short JavaScript program adds an image stamp. Save it as stamp-image.js, or download it. In SumatraPDF: Ctrl + K, Run PDF Script…, Example Scripts, Stamp an image on PDF pages. See Run PDF Script.// Add an image stamp annotation to PDF pages.
// Info: Stamp an image on PDF pages.
// Arg: <INPUT> : Input PDF
// Arg: : Image file, PNG or JPEG
// Arg: <OUTPUT> : New output PDF
// Arg: 1 : Pages: all, 2, 1,3-5, 4-N, odd or even (N is the last page)
// Arg: top-right : Position: top-left, top-right, bottom-left, bottom-right or center
// Usage: sumatrapdf-tool run stamp-image.js in.pdf image.png out.pdf [pages] [position]
// Settings, used when not given on the command line
var PAGES = "1";
var POSITION = "top-right";
var MARGIN = 36; // distance from the page edge, in points (72 = 1 inch)
var MAX_WIDTH = 1 / 3; // the largest image width, as a fraction of the page width
if (!scriptArgs[0] || !scriptArgs[1] || !scriptArgs[2]) {
print("usage: sumatrapdf-tool run stamp-image.js in.pdf image.png out.pdf [pages] [position]");
quit(1);
}
if (scriptArgs[3]) PAGES = scriptArgs[3];
if (scriptArgs[4]) POSITION = scriptArgs[4];
var doc = Document.openDocument(scriptArgs[0]);
var img = new Image(scriptArgs[1]);
var n = doc.countPages();
// turn "1,3-5,N" into [1, 3, 4, 5, n]
function parsePages(spec) {
var pages = [];
spec.split(",").forEach(function (part) {
part = part.trim();
if (part == "all") part = "1-N";
if (part == "odd" || part == "even") {
for (var p = part == "odd" ? 1 : 2; p <= n; p += 2) pages.push(p);
return;
}
var r = part.replace(/N/g, n).split("-");
for (var p = parseInt(r[0]); p <= parseInt(r[r.length - 1]); p++) pages.push(p);
});
return pages;
}
var done = {};
parsePages(PAGES).forEach(function (p) {
if (p < 1 || p > n || done[p]) return;
done[p] = true;
var page = doc.loadPage(p - 1);
// page as you see it: [left, top, right, bottom] in points
var b = page.getBounds();
var w = img.getWidth() / 2,
h = img.getHeight() / 2;
var maxW = (b[2] - b[0]) * MAX_WIDTH;
if (w > maxW) {
h = (h * maxW) / w;
w = maxW;
}
var x = b[0] + MARGIN,
y = b[1] + MARGIN;
if (POSITION.indexOf("right") >= 0) x = b[2] - MARGIN - w;
if (POSITION.indexOf("bottom") >= 0) y = b[3] - MARGIN - h;
if (POSITION == "center") {
x = (b[0] + b[2] - w) / 2;
y = (b[1] + b[3] - h) / 2;
}
var annot = page.createAnnotation("Stamp");
annot.setRect([x, y, x + w, y + h]);
annot.setStampImage(img);
annot.update();
});
doc.save(scriptArgs[2]);
print("Saved " + scriptArgs[2]);
sumatrapdf-tool run stamp-image.js invoice.pdf logo.png out.pdf
The optional arguments after
out.pdf:- pages:
1(the default),all,2,5-7,4-N(Nis the last page),oddoreven - position:
top-right(the default),top-left,bottom-left,bottom-rightorcenter
sumatrapdf-tool run stamp-image.js invoice.pdf logo.png out.pdf all bottom-right
The image is drawn at half its pixel size in points, at most a third of the page width, 36 points (half an inch) from the edges. Change
MARGIN and MAX_WIDTH in the script to adjust.Tips #
- Use a PNG with a transparent background for a signature, so only the ink covers the page.
- Scan or photograph your signature at a high resolution and scale it down on the page, so it stays sharp when printed.
- Put the image on the clipboard once and use Image From Clipboard on every page that needs it.
- Flatten the PDF before sending it if the image shouldn’t be moved or removed.
See also #
- Sign a PDF: a digital signature, which can also show your signature image
- Fill a PDF form
- Editing annotations: other annotations, Edit PDF mode, saving
- Flatten PDF forms and annotations