This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/web/knowledge-base/how-do-i-disable-scrolling-on-page-edges.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Disable PDF page edge scrolling | Nutrient

By default, when using the NutrientViewer.ScrollMode PER_SPREAD, tapping the edges of a page will navigate to the next or previous page. To disable this behavior, use the following workaround to ignore those touch events:

instance.contentDocument.addEventListener(
"click",
function (event) {
if (
instance.contentDocument
.querySelector(".PSPDFKit-Viewport")
.contains(event.target) &&
!event.target.closest(".PSPDFKit-Page")
) {
event.stopImmediatePropagation();
}
},
{ capture: true }
);