New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@embedpdf/models

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@embedpdf/models

Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.

Source
npmnpm
Version
2.12.1
Version published
Weekly downloads
132K
14.16%
Maintainers
1
Weekly downloads
 
Created
Source
EmbedPDF logo

EmbedPDF

NPM version License Join the community on GitHub

@embedpdf/models

Centralised type definitions & helper utilities shared by every EmbedPDF runtime and UI package. Keep your codebase error‑free with a single source of truth for documents, pages, annotations, geometry, async tasks, permissions, and more.

Documentation

Full reference & examples live at:

Official Documentation

Why @embedpdf/models?

  • Single source of truth – all packages agree on data shapes (e.g. PdfDocumentObject, PdfAnnotationObject).
  • Strong typing – exhaustive enums, discriminated unions, generics; a huge boost to DX.
  • Zero runtime cost – pure type exports & tiny helper functions, fully tree‑shakable.

Features

  • Geometry helpers (transformRect, rotateRect, boundingRect, …)
  • Logger with pluggable transports & log‑level filtering
  • Promise‑like Task abstraction (cancellable / abortable)
  • Rich PDF domain model: documents, pages, bookmarks, annotations, form fields, permissions, search
  • Utility helpers (unionFlags, PdfTaskHelper, …)

Installation

npm install @embedpdf/models

Basic Usage

import { Rect, transformRect, Rotation } from '@embedpdf/models';

const pageSize = { width: 612, height: 792 }; // Letter size
const annotation: Rect = {
  origin: { x: 100, y: 150 },
  size: { width: 200, height: 50 },
};

// Rotate 90° and scale by 1.5×
const transformed = transformRect(pageSize, annotation, Rotation.Degree90, 1.5);
console.log(transformed);

Learn More

Check the docs for deep dives into:

  • Geometry API – positions, quads, rectangles
  • Task abstraction – cancellable async workflows
  • Complete Type Reference – every interface & enum used across the stack

License

MIT – see the LICENSE file.

FAQs

Package last updated on 01 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts