embedpdf/embed-pdf-viewer
 Watch   
 Star   
 Fork   
9 hours ago
embed-pdf-viewer

Release v2.2.0

@embedpdf/core@2.2.0

Minor Changes

  • #389 by @bobsingor – Add document permissions support:

    • Add useDocumentPermissions hook for React, Svelte, and Vue with reactive permission state and helper methods (hasPermission, hasAllPermissions, and shorthand booleans like canPrint, canCopyContents, etc.)
    • Add UPDATE_DOCUMENT_SECURITY action and updateDocumentSecurity action creator for updating document security state
    • Add reducer case for updating document permissions and owner unlock state
    • Add permission helper methods to BasePlugin: getDocumentPermissions, checkPermission, requirePermission
    • Export useDocumentPermissions from shared, svelte, and vue entry points
  • #389 by @bobsingor – Add permission override system with global and per-document configuration:

    • Add PermissionConfig interface for configuring permission overrides with enforceDocumentPermissions and overrides options
    • Add permissions option to PluginRegistryConfig for global permission configuration
    • Add permissions to DocumentState for per-document permission overrides
    • Add getEffectivePermission and getEffectivePermissions selectors for layered permission resolution (per-document → global → PDF)
    • Add human-readable permission names (print, modifyContents, copyContents, etc.) as alternatives to numeric flags
    • Update BasePlugin permission helpers (checkPermission, requirePermission, getDocumentPermissions) to use effective permissions
    • Update useDocumentPermissions hooks (React, Svelte, Vue) to return both effective and raw PDF permissions
    • Add config prop to EmbedPDF components for passing PluginRegistryConfig, deprecating individual logger prop
    • Export PermissionConfig, PermissionName, ALL_PERMISSION_FLAGS, and permission selectors

@embedpdf/engines@2.2.0

Minor Changes

  • #389 by @bobsingor – Add document security/encryption engine methods:
    • Add setDocumentEncryption for setting AES-256 encryption with user/owner passwords and permission flags
    • Add removeEncryption for marking documents for encryption removal on save
    • Add unlockOwnerPermissions for unlocking owner permissions on encrypted documents
    • Add isEncrypted and isOwnerUnlocked query methods
    • Implement security methods in PdfEngine orchestrator, RemoteExecutor, PdfiumNative, WebWorkerEngine, and EngineRunner
    • Query and store isEncrypted, isOwnerUnlocked, and permissions when opening documents

@embedpdf/models@2.2.0

Minor Changes

  • #389 by @bobsingor – Add PDF permission and security types:
    • Add isEncrypted, isOwnerUnlocked, and permissions properties to PdfDocumentObject
    • Add PdfPermissionFlag enum with all PDF permission flags (Print, ModifyContents, CopyContents, ModifyAnnotations, FillForms, ExtractForAccessibility, AssembleDocument, PrintHighQuality) and AllowAll combination
    • Add buildPermissions helper function for combining permission flags
    • Add PermissionDeniedError class for permission check failures
    • Add security methods to PdfEngine interface: setDocumentEncryption, removeEncryption, unlockOwnerPermissions, isEncrypted, isOwnerUnlocked
    • Add security methods to IPdfiumExecutor interface

@embedpdf/plugin-annotation@2.2.0

Minor Changes

  • #389 by @bobsingor – Add permission checking for annotation operations:
    • Check PdfPermissionFlag.ModifyAnnotations before creating, updating, or deleting annotations
    • Check permission before activating annotation tools
    • Check permission before creating annotations from text selection
    • Update AnnotationContainer components (React, Svelte, Vue) to respect canModifyAnnotations permission:
      • Disable drag/resize when permission is denied
      • Hide vertex handles when permission is denied
      • Guard double-click handlers based on permission

@embedpdf/plugin-document-manager@2.2.0

Minor Changes

  • #389 by @bobsingor – Add per-document permission overrides when opening documents:
    • Add permissions option to LoadDocumentUrlOptions for URL-based document loading
    • Add permissions option to LoadDocumentBufferOptions for buffer-based document loading
    • Add permissions option to OpenFileDialogOptions for file dialog document loading
    • Pass permission configuration to core store when documents are opened

@embedpdf/plugin-print@2.2.0

Minor Changes

  • #389 by @bobsingor – Add permission checking for print operations:
    • Check PdfPermissionFlag.Print before allowing document printing
    • Return PdfErrorCode.Security error when print permission is denied

@embedpdf/plugin-redaction@2.2.0

Minor Changes

  • #389 by @bobsingor – Add permission checking for redaction operations:
    • Check PdfPermissionFlag.ModifyContents before adding pending redaction items
    • Check permission before enabling redact selection or marquee redact modes
    • Check permission before starting redaction mode
    • Check permission before committing pending redactions (single or all)
    • Return PdfErrorCode.Security error when permission is denied for commit operations

@embedpdf/plugin-ui@2.2.0

Minor Changes

  • #389 by @bobsingor – Add overlay enable/disable functionality:
    • Add SET_OVERLAY_ENABLED action and setOverlayEnabled action creator
    • Add enabledOverlays state to UIDocumentState for tracking overlay visibility
    • Add overlay management methods to UIScope: enableOverlay, disableOverlay, toggleOverlay, isOverlayEnabled, getEnabledOverlays
    • Add onOverlayChanged event hook for overlay state changes
    • Update schema renderer to filter overlays by enabled state
    • Initialize overlay enabled state from schema's defaultEnabled property

@embedpdf/snippet@2.2.0

Minor Changes

  • #389 by @bobsingor – Add document security and protection features:

    • Add ProtectModal component for setting document encryption with user/owner passwords and permission restrictions
    • Add UnlockOwnerOverlay component to notify users when viewing protected documents with restricted permissions
    • Add ViewPermissionsModal component for viewing and unlocking document permissions
    • Add PermissionsDisplay component for showing permission status
    • Add permission-based command disabling for annotation, redaction, print, copy, and capture commands
    • Add security-related translations for English, German, Dutch, French, Spanish, and Chinese
    • Add new icons: EyeIcon, EyeOffIcon, InfoIcon, UnlockIcon
    • Update UI schema with protection modal, view permissions modal, and unlock owner overlay
  • #389 by @bobsingor – Add global permission configuration to snippet viewer:

    • Add permissions option to PDFViewerConfig for global permission overrides
    • Support enforceDocumentPermissions to ignore PDF permissions entirely
    • Support overrides with human-readable names (print, modifyAnnotations, etc.) or numeric flags
    • Update command permission checks to use effective permissions via getEffectivePermission
    • Pass permission configuration to EmbedPDF via new config prop

@embedpdf/pdfium@2.2.0

@embedpdf/plugin-attachment@2.2.0

@embedpdf/plugin-bookmark@2.2.0

@embedpdf/plugin-capture@2.2.0

@embedpdf/plugin-commands@2.2.0

@embedpdf/plugin-export@2.2.0

@embedpdf/plugin-fullscreen@2.2.0

@embedpdf/plugin-history@2.2.0

@embedpdf/plugin-i18n@2.2.0

@embedpdf/plugin-interaction-manager@2.2.0

@embedpdf/plugin-pan@2.2.0

@embedpdf/plugin-render@2.2.0

@embedpdf/plugin-rotate@2.2.0

@embedpdf/plugin-scroll@2.2.0

@embedpdf/plugin-search@2.2.0

@embedpdf/plugin-selection@2.2.0

@embedpdf/plugin-spread@2.2.0

@embedpdf/plugin-thumbnail@2.2.0

@embedpdf/plugin-tiling@2.2.0

@embedpdf/plugin-view-manager@2.2.0

@embedpdf/plugin-viewport@2.2.0

@embedpdf/plugin-zoom@2.2.0

@embedpdf/utils@2.2.0

@embedpdf/react-pdf-viewer@2.2.0

@embedpdf/svelte-pdf-viewer@2.2.0

@embedpdf/vue-pdf-viewer@2.2.0

4 days ago
embed-pdf-viewer

Release v2.1.2

@embedpdf/pdfium@2.1.2

Patch Changes

  • #369 by @bobsingor – Improved PDF content handling with the following changes:
    • Shading object support: Shading patterns (gradients, mesh shadings) are now properly preserved and regenerated when modifying PDF pages. Previously, shading objects could be lost during page content updates.
    • Shading redaction: Redaction now correctly removes shading objects that fall entirely within a redaction area, ensuring complete content removal.
    • Graphics state preservation: Existing graphics state resources (such as soft masks, overprint modes, and other advanced properties) are now preserved with their original names during content regeneration.

@embedpdf/snippet@2.1.2

Patch Changes

  • #369 by @bobsingor – Add missing translations for redaction delete and commit commands (redaction.deleteSelected and redaction.commitSelected) in all supported languages (English, German, Dutch, French, Spanish).

  • #381 by @bobsingor

    • Add i18n support for capture and print dialogs with translations for all supported languages
    • Add document:capture command to toolbar for screenshot functionality
    • Refactor hint-layer and capture components to use translation hooks
    • Remove unused @types/classnames dependency
  • #378 by @bobsingor

    • Add Simplified Chinese (zh-CN) translations for all UI elements
    • Add i18n support for annotation type labels in comment sidebar with translation keys and fallbacks
    • Fix rimraf command to use --glob flag for compatibility with rimraf v4+

@embedpdf/core@2.1.2

@embedpdf/engines@2.1.2

@embedpdf/models@2.1.2

@embedpdf/plugin-annotation@2.1.2

@embedpdf/plugin-attachment@2.1.2

@embedpdf/plugin-bookmark@2.1.2

@embedpdf/plugin-capture@2.1.2

@embedpdf/plugin-commands@2.1.2

@embedpdf/plugin-document-manager@2.1.2

@embedpdf/plugin-export@2.1.2

@embedpdf/plugin-fullscreen@2.1.2

@embedpdf/plugin-history@2.1.2

@embedpdf/plugin-i18n@2.1.2

@embedpdf/plugin-interaction-manager@2.1.2

@embedpdf/plugin-pan@2.1.2

@embedpdf/plugin-print@2.1.2

@embedpdf/plugin-redaction@2.1.2

@embedpdf/plugin-render@2.1.2

@embedpdf/plugin-rotate@2.1.2

@embedpdf/plugin-scroll@2.1.2

@embedpdf/plugin-search@2.1.2

@embedpdf/plugin-selection@2.1.2

@embedpdf/plugin-spread@2.1.2

@embedpdf/plugin-thumbnail@2.1.2

@embedpdf/plugin-tiling@2.1.2

@embedpdf/plugin-ui@2.1.2

@embedpdf/plugin-view-manager@2.1.2

@embedpdf/plugin-viewport@2.1.2

@embedpdf/plugin-zoom@2.1.2

@embedpdf/utils@2.1.2

@embedpdf/react-pdf-viewer@2.1.2

@embedpdf/svelte-pdf-viewer@2.1.2

@embedpdf/vue-pdf-viewer@2.1.2

12 days ago
embed-pdf-viewer

Release v2.1.1

@embedpdf/pdfium@2.1.1

Patch Changes

  • 04140d1 by @bobsingor – Improved PDF editing and redaction capabilities with Form XObject support and enhanced image handling

    Text Redaction Improvements

    • Individual subpath extraction and redaction for complex paths (e.g., vector text in logos)
    • Instead of removing entire path objects, individual letter glyphs can now be selectively redacted
    • Fixed image-to-page transform matrix ordering for accurate redaction positioning

    Enhanced Image Redaction

    • Added 1-bit image support with proper ImageMask handling
    • ImageMask images now correctly use the fill color from the graphics state
    • Added JPEG SMask (soft mask) decoding for proper transparency handling in WASM
    • Inline images (BI...ID...EI format) are now converted to XObject images for editing
    • Improved handling of paletted/indexed images with alpha transparency

    Form XObject Content Editing

    • Added proper support for editing content within Form XObjects (embedded forms in PDFs)
    • Form XObject streams are now edited in-place rather than attempting to add/remove separate content streams
    • Added GetMutableFormStream() API to CPDF_PageObjectHolder for direct Form XObject access

    Pattern Color Support

    • Added Pattern resource tracking in page content generation
    • Pattern colors are now properly preserved and emitted during content regeneration
    • Added fill/stroke pattern resource name tracking in color state

@embedpdf/plugin-ui@2.1.1

Patch Changes

  • #364 by @bobsingor – Fixed toolbar/sidebar/modal switching causing unnecessary component remounts

    The useSchemaRenderer hook was using the toolbar/sidebar/modal ID as the React key, which caused full component remounts when switching between different toolbars in the same slot (e.g., annotation-toolbar → shapes-toolbar). This resulted in visible flashing of sibling components like the RenderLayer.

    The fix uses stable slot-based keys (toolbar-slot-top-secondary, sidebar-slot-left-main, etc.) so that switching content within a slot only updates the children without remounting the wrapper element. This prevents React/Preact reconciliation from affecting sibling components in the tree.

@embedpdf/core@2.1.1

@embedpdf/engines@2.1.1

@embedpdf/models@2.1.1

@embedpdf/plugin-annotation@2.1.1

@embedpdf/plugin-attachment@2.1.1

@embedpdf/plugin-bookmark@2.1.1

@embedpdf/plugin-capture@2.1.1

@embedpdf/plugin-commands@2.1.1

@embedpdf/plugin-document-manager@2.1.1

@embedpdf/plugin-export@2.1.1

@embedpdf/plugin-fullscreen@2.1.1

@embedpdf/plugin-history@2.1.1

@embedpdf/plugin-i18n@2.1.1

@embedpdf/plugin-interaction-manager@2.1.1

@embedpdf/plugin-pan@2.1.1

@embedpdf/plugin-print@2.1.1

@embedpdf/plugin-redaction@2.1.1

@embedpdf/plugin-render@2.1.1

@embedpdf/plugin-rotate@2.1.1

@embedpdf/plugin-scroll@2.1.1

@embedpdf/plugin-search@2.1.1

@embedpdf/plugin-selection@2.1.1

@embedpdf/plugin-spread@2.1.1

@embedpdf/plugin-thumbnail@2.1.1

@embedpdf/plugin-tiling@2.1.1

@embedpdf/plugin-view-manager@2.1.1

@embedpdf/plugin-viewport@2.1.1

@embedpdf/plugin-zoom@2.1.1

@embedpdf/utils@2.1.1

@embedpdf/react-pdf-viewer@2.1.1

@embedpdf/snippet@2.1.1

@embedpdf/svelte-pdf-viewer@2.1.1

@embedpdf/vue-pdf-viewer@2.1.1

15 days ago
embed-pdf-viewer

Release v2.1.0

@embedpdf/engines@2.1.0

Minor Changes

  • #361 by @bobsingor – Add font fallback system for PDFs with non-embedded fonts

    • FontFallbackManager: Pure TypeScript implementation using Emscripten's addFunction API to hook into PDFium's FPDF_SYSFONTINFO interface
    • CDN font loading: Default configuration loads fonts from @embedpdf/fonts-* packages via jsDelivr CDN
    • Advanced font matching: Supports multiple font weights and italic variants with CSS-like matching algorithm
    • Node.js support: createNodeFontLoader helper for file system-based font loading
    • Framework integration: fontFallback option added to React, Vue, Svelte, and Preact hooks
    • Worker support: Font fallback enabled by default in browser worker engine (uses CDN)

    Supported charsets: Japanese (SHIFTJIS), Korean (HANGEUL), Simplified Chinese (GB2312), Traditional Chinese (CHINESEBIG5), Arabic, Hebrew, Cyrillic, Greek, Vietnamese

@embedpdf/models@2.1.0

Minor Changes

  • #361 by @bobsingor – Add font-related type definitions
    • FontCharset: Enum for PDF font charset values (SHIFTJIS, HANGEUL, GB2312, etc.)
    • FontFile: Interface for describing font file metadata (file, weight, italic)
    • FontPackageMeta: Interface for font package metadata used by @embedpdf/fonts-* packages

@embedpdf/snippet@2.1.0

Patch Changes

  • db26b8f by @bobsingor – Update documentation to use jsDelivr CDN
    • Changed import URL from https://snippet.embedpdf.com/embedpdf.js to https://cdn.jsdelivr.net/npm/@embedpdf/snippet@2/dist/embedpdf.js
    • Updated code examples to assign EmbedPDF.init() result to a viewer variable

@embedpdf/core@2.1.0

@embedpdf/pdfium@2.1.0

@embedpdf/plugin-annotation@2.1.0

@embedpdf/plugin-attachment@2.1.0

@embedpdf/plugin-bookmark@2.1.0

@embedpdf/plugin-capture@2.1.0

@embedpdf/plugin-commands@2.1.0

@embedpdf/plugin-document-manager@2.1.0

@embedpdf/plugin-export@2.1.0

@embedpdf/plugin-fullscreen@2.1.0

@embedpdf/plugin-history@2.1.0

@embedpdf/plugin-i18n@2.1.0

@embedpdf/plugin-interaction-manager@2.1.0

@embedpdf/plugin-pan@2.1.0

@embedpdf/plugin-print@2.1.0

@embedpdf/plugin-redaction@2.1.0

@embedpdf/plugin-render@2.1.0

@embedpdf/plugin-rotate@2.1.0

@embedpdf/plugin-scroll@2.1.0

@embedpdf/plugin-search@2.1.0

@embedpdf/plugin-selection@2.1.0

@embedpdf/plugin-spread@2.1.0

@embedpdf/plugin-thumbnail@2.1.0

@embedpdf/plugin-tiling@2.1.0

@embedpdf/plugin-ui@2.1.0

@embedpdf/plugin-view-manager@2.1.0

@embedpdf/plugin-viewport@2.1.0

@embedpdf/plugin-zoom@2.1.0

@embedpdf/utils@2.1.0

@embedpdf/react-pdf-viewer@2.1.0

@embedpdf/svelte-pdf-viewer@2.1.0

@embedpdf/vue-pdf-viewer@2.1.0

17 days ago
embed-pdf-viewer

Release v2.0.2

@embedpdf/engines@2.0.2

Patch Changes

  • #358 by @bobsingor – Added support for persisting custom annotation data when creating text, freetext, ink, line, polygon, polyline, shape, and stamp annotations.

  • #359 by @bobsingor – Fixed missing author field when creating stamp annotations.

@embedpdf/plugin-interaction-manager@2.0.2

Patch Changes

  • #355 by @bobsingor – Fixed an error that was thrown when activating the default interaction mode without an active document.

@embedpdf/utils@2.0.2

Patch Changes

  • #360 by @bobsingor – Fixed aspect ratio being lost when resizing annotations near canvas bounding box edges.

@embedpdf/snippet@2.0.2

Patch Changes

  • #357 by @bobsingor – Fixed search result scrolling not working while search is still in progress on large documents.

@embedpdf/core@2.0.2

@embedpdf/models@2.0.2

@embedpdf/pdfium@2.0.2

@embedpdf/plugin-annotation@2.0.2

@embedpdf/plugin-attachment@2.0.2

@embedpdf/plugin-bookmark@2.0.2

@embedpdf/plugin-capture@2.0.2

@embedpdf/plugin-commands@2.0.2

@embedpdf/plugin-document-manager@2.0.2

@embedpdf/plugin-export@2.0.2

@embedpdf/plugin-fullscreen@2.0.2

@embedpdf/plugin-history@2.0.2

@embedpdf/plugin-i18n@2.0.2

@embedpdf/plugin-pan@2.0.2

@embedpdf/plugin-print@2.0.2

@embedpdf/plugin-redaction@2.0.2

@embedpdf/plugin-render@2.0.2

@embedpdf/plugin-rotate@2.0.2

@embedpdf/plugin-scroll@2.0.2

@embedpdf/plugin-search@2.0.2

@embedpdf/plugin-selection@2.0.2

@embedpdf/plugin-spread@2.0.2

@embedpdf/plugin-thumbnail@2.0.2

@embedpdf/plugin-tiling@2.0.2

@embedpdf/plugin-ui@2.0.2

@embedpdf/plugin-view-manager@2.0.2

@embedpdf/plugin-viewport@2.0.2

@embedpdf/plugin-zoom@2.0.2

@embedpdf/react-pdf-viewer@2.0.2

@embedpdf/svelte-pdf-viewer@2.0.2

@embedpdf/vue-pdf-viewer@2.0.2

20 days ago
embed-pdf-viewer

Release v2.0.1

@embedpdf/plugin-document-manager@2.0.1

Patch Changes

  • #305 by @bobsingor – Fixed document name extraction to always include .pdf extension when extracting filename from URL.

  • #305 by @bobsingor – Added optional name property to LoadDocumentUrlOptions to allow specifying a custom document name. When not provided, the name is extracted from the URL. If extraction fails, undefined is returned to allow downstream handling of default names.

@embedpdf/snippet@2.0.1

Patch Changes

  • #307 by @bobsingor

    • Fixed iOS zoom issue on input focus by changing text size from text-sm to text-base in form inputs
    • Fullscreen button icon now dynamically updates to show exit icon when in fullscreen mode
    • Improved zoom menu UI schema with unique item IDs and better responsive behavior
  • #308 by @bobsingor – Added selection:copy-to-clipboard command with keyboard shortcuts (Ctrl+C / Cmd+C) that copies selected text without clearing the selection, providing a better user experience for keyboard-based copying.

@embedpdf/core@2.0.1

@embedpdf/engines@2.0.1

@embedpdf/models@2.0.1

@embedpdf/pdfium@2.0.1

@embedpdf/plugin-annotation@2.0.1

@embedpdf/plugin-attachment@2.0.1

@embedpdf/plugin-bookmark@2.0.1

@embedpdf/plugin-capture@2.0.1

@embedpdf/plugin-commands@2.0.1

@embedpdf/plugin-export@2.0.1

@embedpdf/plugin-fullscreen@2.0.1

@embedpdf/plugin-history@2.0.1

@embedpdf/plugin-i18n@2.0.1

@embedpdf/plugin-interaction-manager@2.0.1

@embedpdf/plugin-pan@2.0.1

@embedpdf/plugin-print@2.0.1

@embedpdf/plugin-redaction@2.0.1

@embedpdf/plugin-render@2.0.1

@embedpdf/plugin-rotate@2.0.1

@embedpdf/plugin-scroll@2.0.1

@embedpdf/plugin-search@2.0.1

@embedpdf/plugin-selection@2.0.1

@embedpdf/plugin-spread@2.0.1

@embedpdf/plugin-thumbnail@2.0.1

@embedpdf/plugin-tiling@2.0.1

@embedpdf/plugin-ui@2.0.1

@embedpdf/plugin-view-manager@2.0.1

@embedpdf/plugin-viewport@2.0.1

@embedpdf/plugin-zoom@2.0.1

@embedpdf/utils@2.0.1

@embedpdf/react-pdf-viewer@2.0.1

@embedpdf/svelte-pdf-viewer@2.0.1

@embedpdf/vue-pdf-viewer@2.0.1

24 days ago
embed-pdf-viewer

Release v2.0.0

The changelog information of each package has been omitted from this message, as the content exceeds the size limit.

@embedpdf/core@2.0.0

@embedpdf/engines@2.0.0

@embedpdf/models@2.0.0

@embedpdf/plugin-annotation@2.0.0

@embedpdf/plugin-attachment@2.0.0

@embedpdf/plugin-bookmark@2.0.0

@embedpdf/plugin-capture@2.0.0

@embedpdf/plugin-commands@2.0.0

@embedpdf/plugin-document-manager@2.0.0

@embedpdf/plugin-export@2.0.0

@embedpdf/plugin-fullscreen@2.0.0

@embedpdf/plugin-history@2.0.0

@embedpdf/plugin-i18n@2.0.0

@embedpdf/plugin-interaction-manager@2.0.0

@embedpdf/plugin-pan@2.0.0

@embedpdf/plugin-print@2.0.0

@embedpdf/plugin-redaction@2.0.0

@embedpdf/plugin-render@2.0.0

@embedpdf/plugin-rotate@2.0.0

@embedpdf/plugin-scroll@2.0.0

@embedpdf/plugin-search@2.0.0

@embedpdf/plugin-selection@2.0.0

@embedpdf/plugin-spread@2.0.0

@embedpdf/plugin-thumbnail@2.0.0

@embedpdf/plugin-tiling@2.0.0

@embedpdf/plugin-ui@2.0.0

@embedpdf/plugin-view-manager@2.0.0

@embedpdf/plugin-viewport@2.0.0

@embedpdf/plugin-zoom@2.0.0

@embedpdf/utils@2.0.0

@embedpdf/snippet@2.0.0

@embedpdf/pdfium@2.0.0

@embedpdf/react-pdf-viewer@2.0.0

@embedpdf/svelte-pdf-viewer@2.0.0

@embedpdf/vue-pdf-viewer@2.0.0

27 days ago
embed-pdf-viewer

Release Next v2.0.0-next.3

@embedpdf/engines@2.0.0-next.3

Major Changes

  • f13b2d4 by @bobsingor – # Major Engine Architecture Refactor: Orchestrator Layer & Image Encoding Pool

    This release introduces a significant architectural improvement to the PDF engine system, separating concerns between execution and orchestration while adding parallel image encoding capabilities.

    Breaking Changes

    Engine Class Renamed

    • PdfiumEnginePdfiumNative (the "dumb" executor)
    • New PdfEngine class wraps executors with orchestration logic
    • Factory functions (createPdfiumEngine) now return the orchestrated PdfEngine<Blob> wrapper

    Migration:

    // Before
    import { PdfiumEngine } from '@embedpdf/engines';
    const engine = new PdfiumEngine(wasmModule, { logger });
    
    // After
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-worker-engine';
    // or
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-direct-engine';
    
    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      logger,
      encoderPoolSize: 2, // Optional: parallel image encoding
    });

    Rendering Methods Changed

    • renderPage() → Returns final encoded result (Blob) via orchestrator
    • renderPageRaw() → New method, returns raw ImageData from executor
    • renderThumbnail()renderThumbnailRaw() for raw data
    • renderPageAnnotation()renderPageAnnotationRaw() for raw data

    Search API Simplified

    • searchAllPages() → Now orchestrated at the PdfEngine level
    • searchInPage() → New single-page search method in executor
    • Progress tracking improved with proper CompoundTask support

    Document Loading Changes

    • Removed openDocumentFromLoader() - range request loading removed from executor
    • Removed openDocumentUrl() - URL fetching now handled in orchestrator
    • openDocumentBuffer() remains as the primary method in executor

    New Features

    1. Orchestrator Architecture

    New three-layer architecture:

    • Executor Layer (PdfiumNative, RemoteExecutor): "Dumb" workers that execute PDF operations
    • Orchestrator Layer (PdfEngine): "Smart" coordinator with priority queues and scheduling
    • Worker Pool (ImageEncoderWorkerPool): Parallel image encoding

    Benefits:

    • Priority-based task scheduling
    • Visibility-aware rendering (viewport-based prioritization)
    • Parallel image encoding (non-blocking)
    • Automatic task cancellation and cleanup

    2. Image Encoder Worker Pool

    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      encoderPoolSize: 2, // Creates 2 encoder workers
    });
    • Offloads OffscreenCanvas.convertToBlob() from main PDFium worker
    • Prevents blocking during image encoding
    • Configurable pool size (default: 2 workers)
    • Automatic load balancing

    3. Task Queue System

    New WorkerTaskQueue with:

    • Priority levels: CRITICAL, HIGH, MEDIUM, LOW
    • Visibility-based ranking for render tasks
    • Automatic task deduplication
    • Graceful cancellation

    4. CompoundTask for Multi-Page Operations

    New CompoundTask class for aggregating results:

    // Automatic progress tracking
    const task = engine.searchAllPages(doc, 'keyword');
    task.onProgress((progress) => {
      console.log(`Page ${progress.page} complete`);
    });
    • CompoundTask.gather() - Like Promise.all() with progress
    • CompoundTask.gatherIndexed() - Returns Record<number, Result>
    • CompoundTask.first() - Like Promise.race()
    • Automatic child task cleanup

    API Additions

    Models Package

    • CompoundTask - Multi-task aggregation with progress
    • ImageConversionTypes type refinements
    • PdfAnnotationsProgress.result (renamed from annotations)

    Engines Package

    New exports:

    • PdfEngine - Main orchestrator class
    • RemoteExecutor - Worker communication proxy
    • ImageEncoderWorkerPool - Image encoding pool
    • WorkerTaskQueue - Priority-based queue
    • PdfiumNative - Renamed from PdfiumEngine

    New image converters:

    • browserImageDataToBlobConverter - Legacy converter
    • createWorkerPoolImageConverter() - Pool-based converter
    • createHybridImageConverter() - Fallback support

    Plugin-Render Package

    New config options:

    {
      render: {
        defaultImageType: 'image/webp',
        defaultImageQuality: 0.92
      }
    }

    Improvements

    • Performance: Parallel image encoding improves render throughput by ~40-60%
    • Responsiveness: Priority queues ensure visible pages render first
    • Memory: Better cleanup of completed tasks and worker references
    • Logging: Enhanced performance logging with duration tracking
    • Developer Experience: Clearer separation of concerns

@embedpdf/models@2.0.0-next.3

Minor Changes

  • f13b2d4 by @bobsingor – # Major Engine Architecture Refactor: Orchestrator Layer & Image Encoding Pool

    This release introduces a significant architectural improvement to the PDF engine system, separating concerns between execution and orchestration while adding parallel image encoding capabilities.

    Breaking Changes

    Engine Class Renamed

    • PdfiumEnginePdfiumNative (the "dumb" executor)
    • New PdfEngine class wraps executors with orchestration logic
    • Factory functions (createPdfiumEngine) now return the orchestrated PdfEngine<Blob> wrapper

    Migration:

    // Before
    import { PdfiumEngine } from '@embedpdf/engines';
    const engine = new PdfiumEngine(wasmModule, { logger });
    
    // After
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-worker-engine';
    // or
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-direct-engine';
    
    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      logger,
      encoderPoolSize: 2, // Optional: parallel image encoding
    });

    Rendering Methods Changed

    • renderPage() → Returns final encoded result (Blob) via orchestrator
    • renderPageRaw() → New method, returns raw ImageData from executor
    • renderThumbnail()renderThumbnailRaw() for raw data
    • renderPageAnnotation()renderPageAnnotationRaw() for raw data

    Search API Simplified

    • searchAllPages() → Now orchestrated at the PdfEngine level
    • searchInPage() → New single-page search method in executor
    • Progress tracking improved with proper CompoundTask support

    Document Loading Changes

    • Removed openDocumentFromLoader() - range request loading removed from executor
    • Removed openDocumentUrl() - URL fetching now handled in orchestrator
    • openDocumentBuffer() remains as the primary method in executor

    New Features

    1. Orchestrator Architecture

    New three-layer architecture:

    • Executor Layer (PdfiumNative, RemoteExecutor): "Dumb" workers that execute PDF operations
    • Orchestrator Layer (PdfEngine): "Smart" coordinator with priority queues and scheduling
    • Worker Pool (ImageEncoderWorkerPool): Parallel image encoding

    Benefits:

    • Priority-based task scheduling
    • Visibility-aware rendering (viewport-based prioritization)
    • Parallel image encoding (non-blocking)
    • Automatic task cancellation and cleanup

    2. Image Encoder Worker Pool

    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      encoderPoolSize: 2, // Creates 2 encoder workers
    });
    • Offloads OffscreenCanvas.convertToBlob() from main PDFium worker
    • Prevents blocking during image encoding
    • Configurable pool size (default: 2 workers)
    • Automatic load balancing

    3. Task Queue System

    New WorkerTaskQueue with:

    • Priority levels: CRITICAL, HIGH, MEDIUM, LOW
    • Visibility-based ranking for render tasks
    • Automatic task deduplication
    • Graceful cancellation

    4. CompoundTask for Multi-Page Operations

    New CompoundTask class for aggregating results:

    // Automatic progress tracking
    const task = engine.searchAllPages(doc, 'keyword');
    task.onProgress((progress) => {
      console.log(`Page ${progress.page} complete`);
    });
    • CompoundTask.gather() - Like Promise.all() with progress
    • CompoundTask.gatherIndexed() - Returns Record<number, Result>
    • CompoundTask.first() - Like Promise.race()
    • Automatic child task cleanup

    API Additions

    Models Package

    • CompoundTask - Multi-task aggregation with progress
    • ImageConversionTypes type refinements
    • PdfAnnotationsProgress.result (renamed from annotations)

    Engines Package

    New exports:

    • PdfEngine - Main orchestrator class
    • RemoteExecutor - Worker communication proxy
    • ImageEncoderWorkerPool - Image encoding pool
    • WorkerTaskQueue - Priority-based queue
    • PdfiumNative - Renamed from PdfiumEngine

    New image converters:

    • browserImageDataToBlobConverter - Legacy converter
    • createWorkerPoolImageConverter() - Pool-based converter
    • createHybridImageConverter() - Fallback support

    Plugin-Render Package

    New config options:

    {
      render: {
        defaultImageType: 'image/webp',
        defaultImageQuality: 0.92
      }
    }

    Improvements

    • Performance: Parallel image encoding improves render throughput by ~40-60%
    • Responsiveness: Priority queues ensure visible pages render first
    • Memory: Better cleanup of completed tasks and worker references
    • Logging: Enhanced performance logging with duration tracking
    • Developer Experience: Clearer separation of concerns

@embedpdf/plugin-render@2.0.0-next.3

Minor Changes

  • f13b2d4 by @bobsingor – # Major Engine Architecture Refactor: Orchestrator Layer & Image Encoding Pool

    This release introduces a significant architectural improvement to the PDF engine system, separating concerns between execution and orchestration while adding parallel image encoding capabilities.

    Breaking Changes

    Engine Class Renamed

    • PdfiumEnginePdfiumNative (the "dumb" executor)
    • New PdfEngine class wraps executors with orchestration logic
    • Factory functions (createPdfiumEngine) now return the orchestrated PdfEngine<Blob> wrapper

    Migration:

    // Before
    import { PdfiumEngine } from '@embedpdf/engines';
    const engine = new PdfiumEngine(wasmModule, { logger });
    
    // After
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-worker-engine';
    // or
    import { createPdfiumEngine } from '@embedpdf/engines/pdfium-direct-engine';
    
    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      logger,
      encoderPoolSize: 2, // Optional: parallel image encoding
    });

    Rendering Methods Changed

    • renderPage() → Returns final encoded result (Blob) via orchestrator
    • renderPageRaw() → New method, returns raw ImageData from executor
    • renderThumbnail()renderThumbnailRaw() for raw data
    • renderPageAnnotation()renderPageAnnotationRaw() for raw data

    Search API Simplified

    • searchAllPages() → Now orchestrated at the PdfEngine level
    • searchInPage() → New single-page search method in executor
    • Progress tracking improved with proper CompoundTask support

    Document Loading Changes

    • Removed openDocumentFromLoader() - range request loading removed from executor
    • Removed openDocumentUrl() - URL fetching now handled in orchestrator
    • openDocumentBuffer() remains as the primary method in executor

    New Features

    1. Orchestrator Architecture

    New three-layer architecture:

    • Executor Layer (PdfiumNative, RemoteExecutor): "Dumb" workers that execute PDF operations
    • Orchestrator Layer (PdfEngine): "Smart" coordinator with priority queues and scheduling
    • Worker Pool (ImageEncoderWorkerPool): Parallel image encoding

    Benefits:

    • Priority-based task scheduling
    • Visibility-aware rendering (viewport-based prioritization)
    • Parallel image encoding (non-blocking)
    • Automatic task cancellation and cleanup

    2. Image Encoder Worker Pool

    const engine = await createPdfiumEngine('/wasm/pdfium.wasm', {
      encoderPoolSize: 2, // Creates 2 encoder workers
    });
    • Offloads OffscreenCanvas.convertToBlob() from main PDFium worker
    • Prevents blocking during image encoding
    • Configurable pool size (default: 2 workers)
    • Automatic load balancing

    3. Task Queue System

    New WorkerTaskQueue with:

    • Priority levels: CRITICAL, HIGH, MEDIUM, LOW
    • Visibility-based ranking for render tasks
    • Automatic task deduplication
    • Graceful cancellation

    4. CompoundTask for Multi-Page Operations

    New CompoundTask class for aggregating results:

    // Automatic progress tracking
    const task = engine.searchAllPages(doc, 'keyword');
    task.onProgress((progress) => {
      console.log(`Page ${progress.page} complete`);
    });
    • CompoundTask.gather() - Like Promise.all() with progress
    • CompoundTask.gatherIndexed() - Returns Record<number, Result>
    • CompoundTask.first() - Like Promise.race()
    • Automatic child task cleanup

    API Additions

    Models Package

    • CompoundTask - Multi-task aggregation with progress
    • ImageConversionTypes type refinements
    • PdfAnnotationsProgress.result (renamed from annotations)

    Engines Package

    New exports:

    • PdfEngine - Main orchestrator class
    • RemoteExecutor - Worker communication proxy
    • ImageEncoderWorkerPool - Image encoding pool
    • WorkerTaskQueue - Priority-based queue
    • PdfiumNative - Renamed from PdfiumEngine

    New image converters:

    • browserImageDataToBlobConverter - Legacy converter
    • createWorkerPoolImageConverter() - Pool-based converter
    • createHybridImageConverter() - Fallback support

    Plugin-Render Package

    New config options:

    {
      render: {
        defaultImageType: 'image/webp',
        defaultImageQuality: 0.92
      }
    }

    Improvements

    • Performance: Parallel image encoding improves render throughput by ~40-60%
    • Responsiveness: Priority queues ensure visible pages render first
    • Memory: Better cleanup of completed tasks and worker references
    • Logging: Enhanced performance logging with duration tracking
    • Developer Experience: Clearer separation of concerns

@embedpdf/core@2.0.0-next.3

@embedpdf/pdfium@2.0.0-next.3

@embedpdf/plugin-annotation@2.0.0-next.3

@embedpdf/plugin-attachment@2.0.0-next.3

@embedpdf/plugin-bookmark@2.0.0-next.3

@embedpdf/plugin-capture@2.0.0-next.3

@embedpdf/plugin-commands@2.0.0-next.3

@embedpdf/plugin-document-manager@2.0.0-next.3

@embedpdf/plugin-export@2.0.0-next.3

@embedpdf/plugin-fullscreen@2.0.0-next.3

@embedpdf/plugin-history@2.0.0-next.3

@embedpdf/plugin-i18n@2.0.0-next.3

@embedpdf/plugin-interaction-manager@2.0.0-next.3

@embedpdf/plugin-pan@2.0.0-next.3

@embedpdf/plugin-print@2.0.0-next.3

@embedpdf/plugin-redaction@2.0.0-next.3

@embedpdf/plugin-rotate@2.0.0-next.3

@embedpdf/plugin-scroll@2.0.0-next.3

@embedpdf/plugin-search@2.0.0-next.3

@embedpdf/plugin-selection@2.0.0-next.3

@embedpdf/plugin-spread@2.0.0-next.3

@embedpdf/plugin-thumbnail@2.0.0-next.3

@embedpdf/plugin-tiling@2.0.0-next.3

@embedpdf/plugin-ui@2.0.0-next.3

@embedpdf/plugin-view-manager@2.0.0-next.3

@embedpdf/plugin-viewport@2.0.0-next.3

@embedpdf/plugin-zoom@2.0.0-next.3

@embedpdf/utils@2.0.0-next.3

@embedpdf/react-pdf-viewer@2.0.0-next.3

@embedpdf/snippet@2.0.0-next.3

@embedpdf/svelte-pdf-viewer@2.0.0-next.3

@embedpdf/vue-pdf-viewer@2.0.0-next.3

2025-12-02 23:22:17
embed-pdf-viewer

Release Next v2.0.0-next.2

@embedpdf/plugin-scroll@2.0.0-next.2

Minor Changes

  • 89b94a0 by @bobsingor – Added pageNumber and totalPages properties to LayoutReadyEvent. This allows consumers to get the current page information immediately when the layout becomes ready, without needing to subscribe to a separate onPageChange event.

@embedpdf/plugin-ui@2.0.0-next.2

Minor Changes

  • #293 by @github-actions – Added data-hidden-items attribute for efficient CSS dependency rules.

    Problem: Visibility dependency rules (e.g., hiding overflow buttons when all menu items are hidden) required exponential CSS rules when using category-based logic, causing stylesheet bloat.

    Solution:

    • Added hiddenItems state that tracks which item IDs are hidden based on disabled categories
    • Dependency rules now use data-epdf-hid attribute to check item IDs directly
    • CSS rules are now O(n) per breakpoint instead of O(m^n)

    New APIs:

    • getHiddenItems() - returns array of hidden item IDs
    • onCategoryChanged event now includes hiddenItems in payload
    • extractItemCategories(schema) - extracts item→categories mapping
    • computeHiddenItems(itemCategories, disabledCategories) - computes hidden items

    Breaking Changes: None - existing disabledCategories API unchanged

@embedpdf/snippet@2.0.0-next.2

Minor Changes

  • 89b94a0 by @bobsingor – Added comprehensive type exports for all plugin Capabilities and Scopes, enabling proper TypeScript support when using plugin APIs.

    New Type Exports

    All plugins now export their *Capability and *Scope types, allowing developers to properly type variables when using plugin.provides() and forDocument():

    • Viewport: ViewportCapability, ViewportScope, ViewportMetrics
    • Scroll: ScrollCapability, ScrollScope, ScrollMetrics, PageChangeEvent, ScrollEvent, LayoutChangeEvent
    • Spread: SpreadCapability, SpreadScope
    • Zoom: ZoomCapability, ZoomScope, ZoomLevel, ZoomChangeEvent
    • Rotate: RotateCapability, RotateScope
    • Tiling: TilingCapability, TilingScope
    • Thumbnail: ThumbnailCapability, ThumbnailScope
    • Annotation: AnnotationCapability, AnnotationScope, AnnotationEvent
    • Search: SearchCapability, SearchScope
    • Selection: SelectionCapability, SelectionScope
    • Capture: CaptureCapability, CaptureScope
    • Redaction: RedactionCapability, RedactionScope, RedactionMode, RedactionItem
    • UI: UIScope (UICapability was already exported)
    • I18n: I18nCapability, I18nScope, Locale, LocaleChangeEvent
    • Commands: CommandScope (CommandsCapability was already exported)
    • DocumentManager: DocumentManagerCapability, DocumentChangeEvent, LoadDocumentUrlOptions, LoadDocumentBufferOptions
    • Print: PrintCapability, PrintScope
    • Fullscreen: FullscreenCapability
    • Bookmark: BookmarkCapability, BookmarkScope
    • Export: ExportCapability, ExportScope
    • Pan: PanCapability, PanScope
    • History: HistoryCapability, HistoryScope
    • Attachment: AttachmentCapability, AttachmentScope
    • Render: RenderCapability, RenderScope
    • InteractionManager: InteractionManagerCapability, InteractionManagerScope

    Usage Example

    import {
      ScrollPlugin,
      type ScrollCapability,
      type ScrollScope,
      type PageChangeEvent,
    } from '@embedpdf/snippet';
    
    // Type the capability returned by provides()
    const scroll: ScrollCapability = registry
      .getPlugin<ScrollPlugin>('scroll')
      ?.provides();
    
    // Type the scoped API for a specific document
    const doc: ScrollScope = scroll.forDocument('my-document');
    
    // Type event callbacks
    scroll.onPageChange((event: PageChangeEvent) => {
      console.log(`Page ${event.pageNumber} of ${event.totalPages}`);
    });
  • #293 by @github-actions – Added global disabledCategories config and hierarchical categories for fine-grained feature control.

    Global disabledCategories Configuration

    Added disabledCategories to the root PDFViewerConfig that applies to both UI and Commands plugins:

    const config: PDFViewerConfig = {
      src: 'document.pdf',
      // Disable all annotation and redaction features globally
      disabledCategories: ['annotation', 'redaction'],
    };

    Plugin-specific settings can override the global setting:

    const config: PDFViewerConfig = {
      disabledCategories: ['annotation'], // Global default
      ui: {
        disabledCategories: ['redaction'], // Overrides for UI only
      },
      commands: {
        disabledCategories: [], // Re-enables all for commands
      },
    };

    Hierarchical Categories

    All commands and UI schema items now have hierarchical categories for granular control:

    • annotation - all annotation features
      • annotation-markup - highlight, underline, strikeout, squiggly
        • annotation-highlight, annotation-underline, etc.
      • annotation-shape - rectangle, circle, line, arrow, polygon, polyline
        • annotation-rectangle, annotation-circle, etc.
      • annotation-ink, annotation-text, annotation-stamp
    • redaction - all redaction features
      • redaction-text, redaction-area, redaction-apply, redaction-clear
    • zoom - all zoom features
      • zoom-in, zoom-out, zoom-fit-page, zoom-fit-width, zoom-marquee
      • zoom-level - all zoom level presets
    • document - document operations
      • document-open, document-close, document-print, document-export, document-fullscreen
    • panel - sidebar panels
      • panel-sidebar, panel-search, panel-comment, panel-annotation-style
    • page - page settings
      • spread, scroll, rotate
    • history - undo/redo
      • history-undo, history-redo
    • mode - viewer modes
      • mode-view, mode-annotate, mode-shapes, mode-redact
    • tools - tool buttons
      • pan, pointer, capture

    Example: Disable only print functionality while keeping export:

    disabledCategories: ['document-print'];
  • #293 by @github-actions – Added Spanish translations, improved i18n support, and enhanced plugin configuration API.

    New Features

    • Spanish Translations: Added Spanish (es) locale support with complete translations for all UI elements and commands.
    • Annotation Sidebar Translations: Sidebar titles are now properly translated using i18n keys. Added missing translation keys (annotation.freeText, annotation.square, annotation.styles, annotation.defaults) to all 5 languages.

    Improvements

    • Partial Plugin Configs: All plugin configuration options in PDFViewerConfig now use Partial<> types, making it easier to override only the settings you need without specifying all required fields.
    • Reactive Blend Mode Labels: Blend mode dropdown labels in the annotation sidebar now update reactively when the language changes.
    • Search Sidebar Layout: Changed search options checkboxes from horizontal to vertical layout for better compatibility with longer translated labels.
    // Override just specific settings
    <PDFViewer
      config={{
        src: '/document.pdf',
        zoom: { defaultZoomLevel: ZoomMode.FitWidth },
        i18n: { defaultLocale: 'es' }, // Use Spanish translations
      }}
    />

@embedpdf/core@2.0.0-next.2

@embedpdf/engines@2.0.0-next.2

@embedpdf/models@2.0.0-next.2

@embedpdf/pdfium@2.0.0-next.2

@embedpdf/plugin-annotation@2.0.0-next.2

@embedpdf/plugin-attachment@2.0.0-next.2

@embedpdf/plugin-bookmark@2.0.0-next.2

@embedpdf/plugin-capture@2.0.0-next.2

@embedpdf/plugin-commands@2.0.0-next.2

@embedpdf/plugin-document-manager@2.0.0-next.2

@embedpdf/plugin-export@2.0.0-next.2

@embedpdf/plugin-fullscreen@2.0.0-next.2

@embedpdf/plugin-history@2.0.0-next.2

@embedpdf/plugin-i18n@2.0.0-next.2

@embedpdf/plugin-interaction-manager@2.0.0-next.2

@embedpdf/plugin-pan@2.0.0-next.2

@embedpdf/plugin-print@2.0.0-next.2

@embedpdf/plugin-redaction@2.0.0-next.2

@embedpdf/plugin-render@2.0.0-next.2

@embedpdf/plugin-rotate@2.0.0-next.2

@embedpdf/plugin-search@2.0.0-next.2

@embedpdf/plugin-selection@2.0.0-next.2

@embedpdf/plugin-spread@2.0.0-next.2

@embedpdf/plugin-thumbnail@2.0.0-next.2

@embedpdf/plugin-tiling@2.0.0-next.2

@embedpdf/plugin-view-manager@2.0.0-next.2

@embedpdf/plugin-viewport@2.0.0-next.2

@embedpdf/plugin-zoom@2.0.0-next.2

@embedpdf/utils@2.0.0-next.2

@embedpdf/react-pdf-viewer@2.0.0-next.2

@embedpdf/svelte-pdf-viewer@2.0.0-next.2

@embedpdf/vue-pdf-viewer@2.0.0-next.2

2025-12-02 23:22:17
embed-pdf-viewer

Release Next v2.0.0-next.1

@embedpdf/plugin-scroll@2.0.0-next.1

Minor Changes

  • #283 by @github-actions – ## Remove initialPage Config & Add isInitial to LayoutReadyEvent

    Breaking Changes

    • Removed initialPage config option: The initialPage configuration option has been removed from ScrollPluginConfig. With multi-document support, a global initial page setting no longer makes sense.

    Migration

    To scroll to a specific page when a document loads, use the onLayoutReady event instead:

    import { useCapability } from '@embedpdf/core/react';
    import type { ScrollPlugin } from '@embedpdf/plugin-scroll';
    
    const ScrollToPageOnLoad = ({ documentId, initialPage }) => {
      const { provides: scrollCapability } =
        useCapability<ScrollPlugin>('scroll');
    
      useEffect(() => {
        if (!scrollCapability) return;
    
        const unsubscribe = scrollCapability.onLayoutReady((event) => {
          if (event.documentId === documentId && event.isInitial) {
            scrollCapability.forDocument(documentId).scrollToPage({
              pageNumber: initialPage,
              behavior: 'instant',
            });
          }
        });
    
        return unsubscribe;
      }, [scrollCapability, documentId, initialPage]);
    
      return null;
    };

    New Features

    • isInitial flag on LayoutReadyEvent: The onLayoutReady event now includes an isInitial boolean that is true only on the first layout after document load, and false on subsequent layouts (e.g., when switching between tabs). This allows distinguishing between initial document load and tab reactivation.

@embedpdf/plugin-commands@2.0.0-next.1

Patch Changes

  • caec11d by @bobsingor – Updated useCommand hook to return { current: ResolvedCommand | null } instead of { command: ResolvedCommand | null } for consistency with other Svelte hooks. Updated KeyboardShortcuts component to use the new pattern.

    Migration:

    <!-- Before -->
    const cmd = useCommand(() => 'nav.next', () => documentId); // Access: cmd.command?.execute()
    
    <!-- After -->
    const cmd = useCommand(() => 'nav.next', () => documentId); // Access: cmd.current?.execute()

@embedpdf/plugin-document-manager@2.0.0-next.1

Patch Changes

  • caec11d by @bobsingor – Fixed useOpenDocuments hook to correctly handle empty documentIds arrays. Previously, passing an empty array would fall through to returning all documents; now it correctly returns an empty array. This fix applies to React, Vue, and Svelte hooks.

@embedpdf/plugin-i18n@2.0.0-next.1

Patch Changes

  • caec11d by @bobsingor – Fixed Vue useTranslations hook reactivity for locale computed property. The locale value now correctly updates when the locale changes.

@embedpdf/plugin-selection@2.0.0-next.1

Patch Changes

  • caec11d by @bobsingor – Added configurable menuHeight option to SelectionPluginConfig. This allows customizing the height used to determine whether the selection menu appears above or below the selection. Default value is 40 pixels. Also fixed type imports in Svelte SelectionLayer component.

    createPluginRegistration(SelectionPluginPackage, {
      enabled: true,
      menuHeight: 50, // Custom menu height for placement calculations
    });

@embedpdf/utils@2.0.0-next.1

Patch Changes

  • caec11d by @bobsingor – Refactored CounterRotateContainer to use a Svelte action (action: Action<HTMLElement>) instead of a ref callback (ref: (el: HTMLElement | null) => void). This is the idiomatic Svelte pattern for attaching lifecycle-managed behavior to DOM elements. Updated MenuWrapperProps type accordingly.

    Migration:

    <!-- Before -->
    <span bind:this={el} style={menuWrapperProps.style}>
    $effect(() => { menuWrapperProps.ref(el); });
    
    <!-- After -->
    <span use:menuWrapperProps.action style={menuWrapperProps.style}>

@embedpdf/core@2.0.0-next.1

@embedpdf/engines@2.0.0-next.1

@embedpdf/models@2.0.0-next.1

@embedpdf/pdfium@2.0.0-next.1

@embedpdf/plugin-annotation@2.0.0-next.1

@embedpdf/plugin-attachment@2.0.0-next.1

@embedpdf/plugin-bookmark@2.0.0-next.1

@embedpdf/plugin-capture@2.0.0-next.1

@embedpdf/plugin-export@2.0.0-next.1

@embedpdf/plugin-fullscreen@2.0.0-next.1

@embedpdf/plugin-history@2.0.0-next.1

@embedpdf/plugin-interaction-manager@2.0.0-next.1

@embedpdf/plugin-pan@2.0.0-next.1

@embedpdf/plugin-print@2.0.0-next.1

@embedpdf/plugin-redaction@2.0.0-next.1

@embedpdf/plugin-render@2.0.0-next.1

@embedpdf/plugin-rotate@2.0.0-next.1

@embedpdf/plugin-search@2.0.0-next.1

@embedpdf/plugin-spread@2.0.0-next.1

@embedpdf/plugin-thumbnail@2.0.0-next.1

@embedpdf/plugin-tiling@2.0.0-next.1

@embedpdf/plugin-ui@2.0.0-next.1

@embedpdf/plugin-view-manager@2.0.0-next.1

@embedpdf/plugin-viewport@2.0.0-next.1

@embedpdf/plugin-zoom@2.0.0-next.1