Composables

Overview

Overview of all composables provided by Nuxt PDF Kit.

Nuxt PDF Kit provides several composables for programmatic control of PDF documents. All composables follow Nuxt module best practices and are prefixed with usePdfKit.

Available Composables

ComposableDescription
usePdfKitDocumentPDF document loading and management
usePdfKitZoomZoom controls and scale management
usePdfKitSearchText search with highlighting
usePdfKitViewModeView mode and scroll mode
usePdfKitPageNavigationPage navigation utilities
usePdfKitRotationDocument rotation
usePdfKitVirtualScrollVirtual scrolling for large documents

Auto-Import

All composables are auto-imported. You can use them directly without importing:

<script setup>
const { scale, zoomIn, zoomOut } = usePdfKitZoom()
const { currentPage, nextPage, prevPage } = usePdfKitPageNavigation({ totalPages: 100 })
</script>

TypeScript Support

Full TypeScript support is included. Import types when needed:

import type { ZoomLevel, ViewMode, ScrollMode, SearchMatch } from 'nuxt-pdf-kit'
Copyright © 2026