Skip to content

Commit fc09b64

Browse files
committed
fix(pdf-server): isEditing on page.render so stamps always divert to annotationCanvasMap
StampAnnotation.hasOwnCanvas defaults to noRotate; stamps without that flag composited onto the main canvas, so deleting the 'imported' overlay left an unclickable pixel. isEditing forces hasOwnCanvas=true for stamps (via mustBeViewedWhenEditing) so the appearance lands in the per-id canvas and our DOM element is the only render.
1 parent b03a230 commit fc09b64

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/pdf-server/src/mcp-app.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,6 +3246,13 @@ async function renderPage() {
32463246
canvasContext: ctx,
32473247
viewport,
32483248
annotationCanvasMap,
3249+
// isEditing forces hasOwnCanvas=true for stamps regardless of /F
3250+
// NoRotate (StampAnnotation.mustBeViewedWhenEditing in pdf.worker).
3251+
// Without this, stamps without NoRotate composite onto the main canvas
3252+
// and deleting the "imported" overlay leaves an unclickable pixel
3253+
// behind. Other markup types still gate on noRotate; for those the
3254+
// overlay stays a transparent click-box (delete is UI-only until save).
3255+
isEditing: true,
32493256
});
32503257
currentRenderTask = renderTask;
32513258

0 commit comments

Comments
 (0)