UNPKG

@vue-pdf-viewer/viewer

Version:

A vue-pdf-viewer component for Vue and Nuxt. Suitable for vue-pdf document.

22 lines (21 loc) 959 B
import { Reactive } from 'vue'; import { ViewerPdfPage, ViewerState } from '@/utils/types'; /** * Composable for managing PDF pages at base scale (100%). * * Returns pages with viewports at scale=1. Components that need the viewport * at current scale should use: `page.getViewport({ scale: currentScale, rotation })` * * This pattern follows pdf.js approach where base viewport is stored and * scale is applied at render time. * * @param props - The viewer state containing PDF document and rotation settings * @returns Object containing pdfPages (all pages) and filteredPages (view-mode filtered) */ declare function usePdfActualPages(props: Reactive<ViewerState>): { /** All pages at base scale (100%) */ pdfPages: import("vue").ShallowRef<ViewerPdfPage[], ViewerPdfPage[]>; /** Pages filtered by view mode (for page scroll mode) */ filteredPages: import("vue").ComputedRef<ViewerPdfPage[]>; }; export default usePdfActualPages;