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
| Composable | Description |
|---|---|
usePdfKitDocument | PDF document loading and management |
usePdfKitZoom | Zoom controls and scale management |
usePdfKitSearch | Text search with highlighting |
usePdfKitViewMode | View mode and scroll mode |
usePdfKitPageNavigation | Page navigation utilities |
usePdfKitRotation | Document rotation |
usePdfKitVirtualScroll | Virtual 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'