Merge branch 'main' into main

This commit is contained in:
Alam
2026-01-31 14:00:46 +05:30
committed by GitHub
285 changed files with 63028 additions and 47213 deletions

View File

@@ -1,80 +0,0 @@
---
name: '🐛 Bug / 💡 Feature / ❓ Question'
about: 'Report a bug, request a feature, or ask a question about BentoPDF'
title: '(Bug) <short title>, (Feature) <short title>, or (Question) <short title>'
labels: ['needs triage']
assignees: []
---
## Type of Issue
Please check one:
- [ ] 🐛 Bug Report <!-- Label: bug -->
- [ ] 💡 Feature Request <!-- Label: feature -->
- [ ] ❓ Question / Help <!-- Label: question -->
---
## Description
Provide a clear and concise description of the issue, feature request, or question.
---
## Steps to Reproduce (for Bugs)
1. Go to '...'
2. Run '...'
3. Observe error: '...'
**Expected Behavior:**
Describe what you expected BentoPDF to do.
**Actual Behavior:**
Describe what actually happened, including error messages.
---
## Feature Request Details (if applicable)
- What functionality are you requesting?
- Why is this useful?
- Any example or context to illustrate it?
---
## Question Details (if applicable)
- What is your question?
- What have you tried so far?
- Any relevant code snippet or scenario?
---
## Screenshots / Logs (if applicable)
Attach any screenshots, logs, or stack traces that help explain the problem or question.
---
## Environment
- **OS:** (e.g., macOS 14.0 / Ubuntu 22.04 / Windows 11)
- **Dependencies / setup details (if any):**
---
## 💭 Additional Context
Any other information, suggestions, or references that might help maintainers.
---
**Title Format Reminder:**
- `(Bug) Text alignment incorrect on multi-line paragraphs`
- `(Feature) Add support for custom PDF metadata`
- `(Question) How to embed custom fonts?`
---

122
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,122 @@
name: 🐛 Bug Report
description: Report a bug in BentoPDF
title: "(Bug) "
labels: ["bug", "needs triage"]
body:
- type: markdown
attributes:
value: |
## ⚠️ Important Notice
**Bug reports without logs or a sample file demonstrating the issue will not be investigated.**
Please help us help you by providing the information needed to reproduce and fix the problem.
- type: textarea
id: description
attributes:
label: Description
description: Provide a clear and concise description of the bug.
placeholder: What happened? What did you expect to happen?
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: How can we reproduce this issue?
placeholder: |
1. Go to '...'
2. Click on '...'
3. Upload file '...'
4. See error
validations:
required: true
- type: textarea
id: console-logs
attributes:
label: Console Logs
description: Open browser DevTools (F12 → Console tab) and paste any errors here.
placeholder: Paste console logs here...
render: shell
validations:
required: true
- type: textarea
id: sample-file
attributes:
label: Sample PDF or File
description: |
Attach a sample PDF that reproduces the issue, or describe how to create one.
If you cannot share the original, create a minimal example that shows the problem.
placeholder: Drag and drop your file here, or describe how to reproduce with any PDF...
validations:
required: true
- type: dropdown
id: browser
attributes:
label: Browser
description: Which browser are you using?
options:
- Chrome
- Firefox
- Safari
- Edge
- Brave
- Other
validations:
required: true
- type: input
id: browser-version
attributes:
label: Browser Version
description: e.g., Chrome 120, Firefox 121
placeholder: "120"
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- macOS
- Windows
- Linux
- iOS
- Android
- Other
validations:
required: true
- type: input
id: bentopdf-version
attributes:
label: BentoPDF Version
description: Check the footer or package.json
placeholder: "1.15.4"
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other information that might help us debug this issue.
placeholder: Screenshots, network errors, stack traces, etc.
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: Pre-submission Checklist
options:
- label: I have included console logs from the browser DevTools
required: true
- label: I have attached a sample file or described how to reproduce the issue
required: true
- label: I have searched existing issues to ensure this is not a duplicate
required: true

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Discord Community
url: https://discord.gg/Bgq3Ay3f2w
about: Join our Discord for quick questions and community support
- name: 📖 Documentation
url: https://github.com/nicholaschen09/BentoPDF#readme
about: Check the README for setup and usage instructions

View File

@@ -0,0 +1,39 @@
name: 💡 Feature Request
description: Suggest a new feature for BentoPDF
title: "(Feature) "
labels: ["enhancement", "needs triage"]
body:
- type: textarea
id: description
attributes:
label: Feature Description
description: What functionality are you requesting?
placeholder: Describe the feature you'd like to see...
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: Why is this feature useful? What problem does it solve?
placeholder: Explain why you need this feature...
validations:
required: true
- type: textarea
id: examples
attributes:
label: Examples
description: Any examples, mockups, or references to illustrate the feature?
placeholder: Links to similar features, screenshots, etc.
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other information about the feature request.
validations:
required: false

30
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: ❓ Question
description: Ask a question about BentoPDF
title: "(Question) "
labels: ["question"]
body:
- type: textarea
id: question
attributes:
label: Question
description: What would you like to know?
placeholder: Your question here...
validations:
required: true
- type: textarea
id: tried
attributes:
label: What have you tried?
description: What solutions have you already attempted?
placeholder: Describe what you've tried so far...
validations:
required: false
- type: textarea
id: context
attributes:
label: Additional Context
description: Any relevant code snippets, screenshots, or scenarios.
validations:
required: false

View File

@@ -51,11 +51,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-build-and-push:
# Build each platform natively in parallel, then merge manifests
build-amd64:
runs-on: ubuntu-latest
if: github.repository == 'alam00000/bentopdf'
permissions:
contents: write
contents: read
packages: write
strategy:
matrix:
@@ -70,18 +71,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -89,7 +81,7 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version and determine release type
- name: Extract version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
@@ -104,8 +96,7 @@ jobs:
echo "is_release=false" >> $GITHUB_OUTPUT
fi
# Build and push for releases (with 'latest' tag)
- name: Build and push ${{ matrix.mode.name }} image (release)
- name: Build and push amd64 ${{ matrix.mode.name }} (release)
if: steps.version.outputs.is_release == 'true'
uses: docker/build-push-action@v6
with:
@@ -113,18 +104,12 @@ jobs:
build-args: |
SIMPLE_MODE=${{ matrix.mode.simple_mode }}
tags: |
bentopdf/bentopdf${{ matrix.mode.suffix }}:latest
bentopdf/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }}
bentopdf/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:latest
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }}
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64
platforms: linux/amd64
cache-from: type=gha,scope=amd64-${{ matrix.mode.name }}
cache-to: type=gha,mode=max,scope=amd64-${{ matrix.mode.name }}
# Build and push for main branch (with 'edge' tag)
- name: Build and push ${{ matrix.mode.name }} image (edge)
- name: Build and push amd64 ${{ matrix.mode.name }} (edge)
if: steps.version.outputs.is_release == 'false'
uses: docker/build-push-action@v6
with:
@@ -132,10 +117,208 @@ jobs:
build-args: |
SIMPLE_MODE=${{ matrix.mode.simple_mode }}
tags: |
bentopdf/bentopdf${{ matrix.mode.suffix }}:edge
bentopdf/bentopdf${{ matrix.mode.suffix }}:sha-${{ steps.version.outputs.short_sha }}
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:sha-${{ steps.version.outputs.short_sha }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64
platforms: linux/amd64
cache-from: type=gha,scope=amd64-${{ matrix.mode.name }}
cache-to: type=gha,mode=max,scope=amd64-${{ matrix.mode.name }}
build-arm64:
runs-on: ubuntu-24.04-arm # Native ARM64 runner
permissions:
contents: read
packages: write
strategy:
matrix:
mode:
- name: default
simple_mode: false
suffix: ""
- name: simple
simple_mode: true
suffix: "-simple"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version_without_v=${VERSION#v}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
SHORT_SHA=${GITHUB_SHA::7}
echo "version=edge" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Build and push arm64 ${{ matrix.mode.name }} (release)
if: steps.version.outputs.is_release == 'true'
uses: docker/build-push-action@v6
with:
push: true
build-args: |
SIMPLE_MODE=${{ matrix.mode.simple_mode }}
tags: |
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
platforms: linux/arm64
cache-from: type=gha,scope=arm64-${{ matrix.mode.name }}
cache-to: type=gha,mode=max,scope=arm64-${{ matrix.mode.name }}
- name: Build and push arm64 ${{ matrix.mode.name }} (edge)
if: steps.version.outputs.is_release == 'false'
uses: docker/build-push-action@v6
with:
push: true
build-args: |
SIMPLE_MODE=${{ matrix.mode.simple_mode }}
tags: |
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
platforms: linux/arm64
cache-from: type=gha,scope=arm64-${{ matrix.mode.name }}
cache-to: type=gha,mode=max,scope=arm64-${{ matrix.mode.name }}
# Merge GHCR manifests after both platforms are built
merge-manifests-ghcr:
runs-on: ubuntu-latest
needs: [build-amd64, build-arm64]
permissions:
packages: write
strategy:
matrix:
mode:
- name: default
suffix: ""
- name: simple
suffix: "-simple"
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version_without_v=${VERSION#v}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
SHORT_SHA=${GITHUB_SHA::7}
echo "version=edge" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Create and push GHCR manifest (release)
if: steps.version.outputs.is_release == 'true'
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:latest \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
- name: Create and push GHCR manifest (edge)
if: steps.version.outputs.is_release == 'false'
run: |
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
docker buildx imagetools create -t ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:sha-${{ steps.version.outputs.short_sha }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
# Copy images from GHCR to DockerHub
push-to-dockerhub:
runs-on: ubuntu-latest
needs: [merge-manifests-ghcr]
continue-on-error: true
permissions:
contents: read
packages: read
strategy:
matrix:
mode:
- name: default
suffix: ""
- name: simple
suffix: "-simple"
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "version_without_v=${VERSION#v}" >> $GITHUB_OUTPUT
echo "is_release=true" >> $GITHUB_OUTPUT
else
SHORT_SHA=${GITHUB_SHA::7}
echo "version=edge" >> $GITHUB_OUTPUT
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
echo "is_release=false" >> $GITHUB_OUTPUT
fi
- name: Copy images to DockerHub (release)
if: steps.version.outputs.is_release == 'true'
run: |
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:latest \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}-arm64
- name: Copy images to DockerHub (edge)
if: steps.version.outputs.is_release == 'false'
run: |
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:edge \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64
docker buildx imagetools create -t bentopdfteam/bentopdf${{ matrix.mode.suffix }}:sha-${{ steps.version.outputs.short_sha }} \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-amd64 \
ghcr.io/${{ github.repository_owner }}/bentopdf${{ matrix.mode.suffix }}:edge-arm64

View File

@@ -59,6 +59,9 @@ jobs:
with:
# Upload entire repository
path: dist
name: github-pages-deployment
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: github-pages-deployment