Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,13 @@ For common scenarios like needing to republish with fixes, use the helper script

```bash
./scripts/publish-patch.sh

./scripts/publish-minor.sh

./scripts/publish-major.sh
```

This script handles:
These scripts handles:
- Version bumping
- Tag management
- Committing and pushing
Expand Down
14 changes: 7 additions & 7 deletions docs/FRAMEWORK_AGNOSTIC_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,10 @@ jobs:

## Benefits

✅ **No Version Conflicts**: Uses project's own dependencies
✅ **Smaller Bundle**: No duplicate dependencies
✅ **Framework Agnostic**: Works with any framework or vanilla JS
✅ **Type Safe**: Full TypeScript support
✅ **Tree Shakeable**: Import only what you need
✅ **Future Proof**: Easy to add more framework adapters
✅ **Wide Node Support**: Works with Node 16-22
- ✅ **No Version Conflicts**: Uses project's own dependencies
- ✅ **Smaller Bundle**: No duplicate dependencies
- ✅ **Framework Agnostic**: Works with any framework or vanilla JS
- ✅ **Type Safe**: Full TypeScript support
- ✅ **Tree Shakeable**: Import only what you need
- ✅ **Future Proof**: Easy to add more framework adapters
- ✅ **Wide Node Support**: Works with Node 16-22
20 changes: 10 additions & 10 deletions docs/NPM_READY.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ See PUBLISH.md for detailed publishing instructions.

## Key Features

✅ **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla JS
✅ **Multi-page PDFs** - Automatic page splitting with smart pagination
✅ **GoFullPage Approach** - Captures full content height, no viewport limits
✅ **TypeScript First** - Full type definitions included
✅ **Tree Shakeable** - Import only what you need
✅ **Zero Config** - Works out of the box with sensible defaults
✅ **Progress Tracking** - Real-time progress callbacks
✅ **Image Handling** - SVG conversion, optimization, background images
✅ **Table Support** - Smart table splitting with header repetition
✅ **Device Independent** - Same output on all devices
- ✅ **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla JS
- ✅ **Multi-page PDFs** - Automatic page splitting with smart pagination
- ✅ **GoFullPage Approach** - Captures full content height, no viewport limits
- ✅ **TypeScript First** - Full type definitions included
- ✅ **Tree Shakeable** - Import only what you need
- ✅ **Zero Config** - Works out of the box with sensible defaults
- ✅ **Progress Tracking** - Real-time progress callbacks
- ✅ **Image Handling** - SVG conversion, optimization, background images
- ✅ **Table Support** - Smart table splitting with header repetition
- ✅ **Device Independent** - Same output on all devices

## Package Size

Expand Down
8 changes: 6 additions & 2 deletions docs/SETUP_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ Comprehensive publishing guide covering:

### 3. Helper Scripts

#### `scripts/publish-patch.sh`
Automated patch version publishing:
#### `scripts/publish-*.sh`
Automated version publishing:
```bash
./scripts/publish-patch.sh

./scripts/publish-minor.sh

./scripts/publish-major.sh
```
- Bumps version
- Manages tags
Expand Down
8 changes: 4 additions & 4 deletions docs/WEB_SEARCH_IMPLEMENTATION_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ imageOptions: {

**Version 1.0.0 addresses ALL critical pain points** identified in web research:

✅ **Image Quality** - Completely solved with Phase 4 enhancements
✅ **Text Searchability** - Built-in from day 1
✅ **Core Features** - All high-demand features implemented
✅ **Production Ready** - 50+ exports, full TypeScript, 4 framework adapters
- ✅ **Image Quality** - Completely solved with Phase 4 enhancements
- ✅ **Text Searchability** - Built-in from day 1
- ✅ **Core Features** - All high-demand features implemented
- ✅ **Production Ready** - 50+ exports, full TypeScript, 4 framework adapters

The library is **production-ready** and addresses the most common user complaints found in web research. Future enhancements (forms, multi-column, PDF/A) are lower priority features that can be added based on user demand.

Expand Down
45 changes: 29 additions & 16 deletions documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ function MyComponent() {

## Key Features at a Glance

✅ **Multi-page support** with smart pagination
✅ **Framework adapters** for React, Vue, Svelte
✅ **OKLCH color support** and Tailwind CSS compatibility
✅ **Image optimization** with SVG conversion & DPI control
✅ **Table pagination** with header repetition
✅ **Watermarks** (text and image)
✅ **Headers/Footers** with dynamic template variables
✅ **PDF Metadata** (title, author, subject, keywords)
✅ **PDF Security** (password protection & permissions)
✅ **PDF Preview** (real-time preview with live updates)
✅ **Media type emulation** (@media print support)
✅ **Full TypeScript support**
✅ **Progress tracking**
✅ **Batch generation** with PDF merging
- ✅ **Multi-page support** with smart pagination
- ✅ **Framework adapters** for React, Vue, Svelte
- ✅ **OKLCH color support** and Tailwind CSS compatibility
- ✅ **Image optimization** with SVG conversion & DPI control
- ✅ **Table pagination** with header repetition
- ✅ **Watermarks** (text and image)
- ✅ **Headers/Footers** with dynamic template variables
- ✅ **PDF Metadata** (title, author, subject, keywords)
- ✅ **PDF Security** (password protection & permissions)
- ✅ **PDF Preview** (real-time preview with live updates)
- ✅ **Media type emulation** (@media print support)
- ✅ **Full TypeScript support**
- ✅ **Progress tracking**
- ✅ **Batch generation** with PDF merging

---

Expand All @@ -114,8 +114,8 @@ documentation/
├── index.md (you are here)
├── guides/
│ ├── getting-started.md # Quick start tutorial
│ ├── installation.md # Installation guide
│ ├── getting-started.md # Quick start tutorial
│ ├── installation.md # Installation guide
│ ├── react-guide.md # React integration
│ ├── vue-guide.md # Vue integration
│ ├── svelte-guide.md # Svelte integration
Expand All @@ -125,13 +125,26 @@ documentation/
│ └── troubleshooting.md # Common issues
├── features/
│ └── colors.md # Color support
│ └── images.md # Image support
│ └── page-breaks.md # Handling page break
│ └── multi-page.md # Page splitting
│ └── tables.md # Table support
├── advanced/
│ └── batch-generation.md # Combine multiple content items
│ └── headers-footers.md # Dynamic header/footer templates
│ └── image-optimization.md # DPI control & print quality
│ └── metadata.md # Set document properties
│ └── preview.md # Real-time PDF preview with live updates
│ └── security.md # Password protection & permissions
│ └── url-to-pdf.md # Convert web pages to PDF
│ └── watermarks.md # Add text & image watermarks
├── api/
│ └── options.md # All options
|
├── tutorials/* # Tutorials for react, svelte, vue & vanilla JS
└── examples/
├── code-examples.md # Code samples
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@encryptioner/html-to-pdf-generator",
"version": "1.0.2",
"version": "1.0.3",
"description": "Modern multi-page PDF generator from HTML content with smart pagination and styling support",
"keywords": [
"pdf",
Expand Down
109 changes: 103 additions & 6 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
# Publishing Scripts

Helper scripts for managing package releases.
Helper scripts for managing package releases following semantic versioning.

## Overview

Three scripts automate version bumping and publishing:
- **publish-patch.sh** - Bug fixes (1.0.0 → 1.0.1)
- **publish-minor.sh** - New features (1.0.5 → 1.1.0)
- **publish-major.sh** - Breaking changes (1.5.3 → 2.0.0)

All scripts:
- Automatically calculate the new version
- Commit the version bump
- Clean up any existing tags (from previous failed attempts)
- Create and push new version tag
- Trigger GitHub Actions publish workflow

**Making scripts executable:**
```bash
chmod +x scripts/publish-patch.sh scripts/publish-minor.sh scripts/publish-major.sh
```

## publish-patch.sh

Automates the complete patch version release workflow.
Automates patch version releases for bug fixes and minor improvements.

**What it does:**
1. Bumps patch version in package.json (e.g., 1.0.0 → 1.0.1)
2. Commits the version bump
3. Deletes old tag if it exists (both local and remote)
3. Deletes NEW version tag if it exists (from previous failed attempt)
4. Creates new version tag
5. Pushes everything to trigger GitHub Actions publish workflow

Expand All @@ -21,8 +40,8 @@ Automates the complete patch version release workflow.
**When to use:**
- Publishing bug fixes
- After making workflow/configuration changes
- When you need to republish after fixing issues
- Moving a tag to a newer commit
- Documentation updates
- Performance improvements without API changes

**Prerequisites:**
- All changes committed
Expand All @@ -45,14 +64,92 @@ Continue? (y/n) y

Step 1: Updating version to 1.0.1...
Step 2: Committing version bump...
Step 3: Deleting old v1.0.0 tag if it exists...
Step 3: Deleting v1.0.1 tag if it exists (from previous failed attempt)...
Step 4: Creating v1.0.1 tag...
Step 5: Getting current branch...
Step 6: Pushing to remote...

✅ Done!
```

## publish-minor.sh

Automates minor version releases for new features.

**What it does:**
1. Bumps minor version in package.json (e.g., 1.0.5 → 1.1.0)
2. Commits the version bump
3. Deletes NEW version tag if it exists (from previous failed attempt)
4. Creates new version tag
5. Pushes everything to trigger GitHub Actions publish workflow

**Usage:**
```bash
./scripts/publish-minor.sh
```

**When to use:**
- Adding new features
- New framework adapters
- New configuration options
- Backwards-compatible API additions

**Prerequisites:**
- All changes committed
- Clean working directory
- On the correct branch
- New features tested and documented

**Example:**
```
Current: 1.2.5
New: 1.3.0
```

## publish-major.sh

Automates major version releases for breaking changes.

**What it does:**
1. Bumps major version in package.json (e.g., 1.5.3 → 2.0.0)
2. Commits the version bump with BREAKING CHANGE notice
3. Deletes NEW version tag if it exists (from previous failed attempt)
4. Creates new version tag
5. Pushes everything to trigger GitHub Actions publish workflow

**Usage:**
```bash
./scripts/publish-major.sh
```

**When to use:**
- Breaking API changes
- Removing deprecated features
- Major refactoring that affects public API
- Incompatible updates to dependencies

**Prerequisites:**
- All changes committed
- Clean working directory
- **CHANGELOG.md updated with breaking changes**
- **Migration guide prepared**
- Breaking changes reviewed and documented

**Example:**
```
⚠️ WARNING: This is a MAJOR version bump!

Current version: 1.5.3
New version will be: 2.0.0

⚠️ This is a breaking change! Make sure you've:
- Updated CHANGELOG.md with breaking changes
- Updated migration guide
- Reviewed all breaking API changes

Are you sure you want to continue? (y/n)
```

## verify-package.cjs

Verifies package structure before publishing.
Expand Down
Loading