Navigation and zooming in GemBox.PdfViewer
GemBox.PdfViewer makes navigating through large PDF files seamless and intuitive. You can benefit from a variety of navigation tools that enhance the reading and browsing experience. GemBox.PdfViewer provides straightforward options for moving through the document. You can jump to any page by entering the page number, using the next and previous buttons, or scrolling through the document. This makes it easier to handle documents of any length. You can also navigate a PDF document programmatically using the API. The example below demonstrates how to navigate to the next page, if it's not the last one: For quicker access, you can view thumbnails of each page or use bookmarks that take you directly to specific sections of the PDF. This feature is particularly useful for lengthy documents, allowing you to save time and improve efficiency. The library allows you to zoom in and out of the document for better readability. You can choose to view the document in actual size, fit-to-page, or fit-to-width modes, adapting the document to the screen for optimal viewing. Zoom levels can also be set programmatically using the API. The example below illustrates how to set the zoom to 50%: Apart from viewing and navigating PDFs, the library provides essential tools to manage PDF files:Page navigation
let viewer = await GemBoxPdfViewer.create({
container: "#viewer",
initialDocument: "/document.pdf"
});
let currentPage = viewer.getCurrentPage();
if (currentPage < viewer.getPageCount() - 1)
viewer.setCurrentPage(currentPage + 1);
Thumbnails and Bookmarks
Zooming
let viewer = await GemBoxPdfViewer.create({
container: "#viewer",
initialDocument: "/document.pdf"
});
viewer.setZoom(50);
File manipulation