
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Shared utilities and constants for pdfn packages.
Note: This is an internal package. Most users should use
@pdfn/reactdirectly.
@pdfn/core provides shared functionality used across the pdfn ecosystem:
npm install @pdfn/core
@pdfn/core (Browser-safe)The main entry point contains utilities safe for browser bundling:
import {
// Page sizes
PAGE_SIZES,
getPageDimensions,
getPageSizeCss,
// CSS utilities
BASE_STYLES,
generatePageCss,
extractPageConfig,
// Tailwind utilities
hasTailwindMarker,
extractPrecompiledCss,
removeTailwindMarker,
// HTML generation
generateClientHtml,
CLIENT_READY_SCRIPT,
} from '@pdfn/core';
@pdfn/core/tailwind (Server-only)Server-only Tailwind CSS compilation. Uses Node.js built-ins (fs, path) and fast-glob:
import { compileTailwind } from '@pdfn/core/tailwind';
const { css, classCount, fileCount } = await compileTailwind({
templatePatterns: ['./pdfn-templates/**/*.tsx'],
cssPath: './pdfn-templates/styles.css', // optional
cwd: process.cwd(),
debug: true,
});
Important: Only import from
@pdfn/core/tailwindin server-side code (build plugins, CLI tools). It cannot be bundled for browsers.
@pdfn/react — Uses page sizes, CSS utilities, and Tailwind markers@pdfn/client — Uses HTML generation for client-side rendering@pdfn/next — Uses Tailwind compilation for build-time CSS@pdfn/vite — Uses Tailwind compilation for build-time CSSMIT
FAQs
Core utilities and constants for pdfn packages
We found that @pdfn/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.