mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-05 03:50:29 +01:00
Compare commits
9
Commits
f3ccab1f28
...
ef0c91040f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef0c91040f | ||
|
|
0a3dd8e48f | ||
|
|
72b70be757 | ||
|
|
f638f8e4db | ||
|
|
24b060a134 | ||
|
|
6dca41aeb4 | ||
|
|
2a8ce12b6e | ||
|
|
a25c6511ce | ||
|
|
6d8ef7d694 |
@@ -1 +1,2 @@
|
||||
https://www.bentopdf.com/funding.json
|
||||
https://bentopdf.com/funding.json
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.0.9
|
||||
version: 1.0.10
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: '2.8.10'
|
||||
appVersion: '2.8.11'
|
||||
|
||||
Generated
+1599
-1957
File diff suppressed because it is too large
Load Diff
+50
-50
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "bento-pdf",
|
||||
"private": true,
|
||||
"version": "2.8.10",
|
||||
"version": "2.8.11",
|
||||
"license": "AGPL-3.0-only",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -44,44 +44,44 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/dom": "^10.4.2",
|
||||
"@types/blob-stream": "^0.1.33",
|
||||
"@types/html2canvas": "^1.0.0",
|
||||
"@types/pdfkit": "^0.17.5",
|
||||
"@types/pdfkit": "^0.17.7",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@types/utif": "^3.0.6",
|
||||
"@vitejs/plugin-basic-ssl": "^2.1.4",
|
||||
"@vitest/coverage-v8": "^4.0.18",
|
||||
"@vitest/ui": "^4.0.18",
|
||||
"eslint": "^10.0.2",
|
||||
"@vitejs/plugin-basic-ssl": "^2.3.0",
|
||||
"@vitest/coverage-v8": "^5.0.5",
|
||||
"@vitest/ui": "^5.0.5",
|
||||
"eslint": "^10.14.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-no-unsanitized": "^4.1.5",
|
||||
"eslint-plugin-security": "^4.0.0",
|
||||
"globals": "^17.4.0",
|
||||
"eslint-plugin-security": "^4.2.1",
|
||||
"globals": "^17.13.0",
|
||||
"husky": "^9.1.7",
|
||||
"jsdom": "^28.1.0",
|
||||
"lint-staged": "^16.3.1",
|
||||
"marked": "^16.4.2",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.56.1",
|
||||
"jsdom": "^30.1.3",
|
||||
"lint-staged": "^17.6.0",
|
||||
"marked": "^18.1.2",
|
||||
"prettier": "^3.9.10",
|
||||
"typescript": "~7.0.2",
|
||||
"typescript-eslint": "^8.72.1",
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-handlebars": "^2.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.26.0",
|
||||
"vite-plugin-node-polyfills": "^0.28.0",
|
||||
"vitepress": "^1.6.4",
|
||||
"vitest": "^4.0.18",
|
||||
"vitest": "^5.0.5",
|
||||
"vue": "^3.5.29"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/cedarville-cursive": "^5.2.7",
|
||||
"@fontsource/dancing-script": "^5.2.8",
|
||||
"@fontsource/dm-sans": "^5.2.8",
|
||||
"@fontsource/great-vibes": "^5.2.8",
|
||||
"@fontsource/kalam": "^5.2.8",
|
||||
"@fontsource/lato": "^5.2.7",
|
||||
"@fontsource/merriweather": "^5.2.11",
|
||||
"@kenjiuno/msgreader": "^1.28.0",
|
||||
"@matbee/libreoffice-converter": "^2.5.0",
|
||||
"@fontsource/cedarville-cursive": "^5.3.0",
|
||||
"@fontsource/dancing-script": "^5.3.0",
|
||||
"@fontsource/dm-sans": "^5.3.0",
|
||||
"@fontsource/great-vibes": "^5.3.0",
|
||||
"@fontsource/kalam": "^5.3.0",
|
||||
"@fontsource/lato": "^5.3.0",
|
||||
"@fontsource/merriweather": "^5.3.0",
|
||||
"@kenjiuno/msgreader": "^1.29.0",
|
||||
"@matbee/libreoffice-converter": "^2.7.2",
|
||||
"@mdit/plugin-abbr": "^1.1.3",
|
||||
"@mdit/plugin-anchor": "^2.2.3",
|
||||
"@mdit/plugin-dl": "^1.1.3",
|
||||
@@ -96,56 +96,56 @@
|
||||
"@neslinesli93/qpdf-wasm": "^0.3.0",
|
||||
"@pdf-lib/fontkit": "^1.1.1",
|
||||
"@phosphor-icons/web": "^2.1.2",
|
||||
"@retejs/lit-plugin": "^2.0.7",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"@retejs/lit-plugin": "^2.0.8",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"@types/node-forge": "^1.3.14",
|
||||
"@types/papaparse": "^5.5.2",
|
||||
"archiver": "^7.0.1",
|
||||
"archiver": "^8.0.0",
|
||||
"bentopdf-pdfium": "file:vendor/bentopdf-pdfium/bentopdf-pdfium-3f6b6114b166.tgz",
|
||||
"bentopdf-viewer": "file:vendor/bentopdf-viewer/bentopdf-viewer-3f6b6114b166.tgz",
|
||||
"blob-stream": "^0.1.3",
|
||||
"bwip-js": "^4.8.0",
|
||||
"cropperjs": "^1.6.2",
|
||||
"diff": "^8.0.3",
|
||||
"bwip-js": "^4.11.4",
|
||||
"cropperjs": "^2.3.1",
|
||||
"diff": "^9.0.0",
|
||||
"dompurify": "^3.4.17",
|
||||
"fast-xml-parser": "^5.7.1",
|
||||
"fast-xml-parser": "^5.11.2",
|
||||
"heic2any": "^0.0.4",
|
||||
"highlight.js": "^11.12.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"hyper-compress-wasm": "file:vendor/hyper-compress-wasm/hyper-compress-wasm-1.0.3.tgz",
|
||||
"i18next": "^25.8.13",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"i18next-http-backend": "^4.0.2",
|
||||
"i18next": "^26.5.12",
|
||||
"i18next-browser-languagedetector": "^8.2.4",
|
||||
"i18next-http-backend": "^4.0.7",
|
||||
"jspdf": "^4.2.1",
|
||||
"jspdf-autotable": "^5.0.2",
|
||||
"jszip": "^3.10.1",
|
||||
"jspdf-autotable": "^5.0.9",
|
||||
"jszip": "^3.10.2",
|
||||
"katex": "^0.19.1",
|
||||
"lit": "^3.3.2",
|
||||
"lucide": "^0.575.0",
|
||||
"lit": "^3.3.3",
|
||||
"lucide": "^1.65.0",
|
||||
"markdown-it": "^15.0.3",
|
||||
"markdown-it-table-of-contents": "^1.2.0",
|
||||
"mermaid": "^12.2.0",
|
||||
"microdiff": "^1.5.0",
|
||||
"microdiff": "^1.6.0",
|
||||
"node-forge": "^1.4.0",
|
||||
"papaparse": "^5.5.3",
|
||||
"papaparse": "^5.7.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"pdfjs-dist": "^5.4.624",
|
||||
"pdfkit": "^0.17.2",
|
||||
"pixelmatch": "^7.1.0",
|
||||
"postal-mime": "^2.7.3",
|
||||
"pdfjs-dist": "^6.4.299",
|
||||
"pdfkit": "^0.20.2",
|
||||
"pixelmatch": "^8.0.0",
|
||||
"postal-mime": "^4.2.0",
|
||||
"rete": "^2.0.6",
|
||||
"rete-area-plugin": "^2.1.5",
|
||||
"rete-area-plugin": "^2.3.2",
|
||||
"rete-connection-plugin": "^2.0.5",
|
||||
"rete-engine": "^2.1.1",
|
||||
"rete-render-utils": "^2.0.3",
|
||||
"sortablejs": "^1.15.7",
|
||||
"tailwindcss": "^4.1.14",
|
||||
"terser": "^5.46.0",
|
||||
"terser": "^5.51.2",
|
||||
"tesseract.js": "^7.0.0",
|
||||
"tiff": "^7.1.2",
|
||||
"utif": "^3.1.0",
|
||||
"vite-plugin-static-copy": "^3.2.0",
|
||||
"wasm-vips": "^0.0.17",
|
||||
"vite-plugin-static-copy": "^4.1.1",
|
||||
"wasm-vips": "^0.0.19",
|
||||
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
||||
"zgapdfsigner": "^2.7.5"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
https://www.bentopdf.com/funding.json
|
||||
https://bentopdf.com/funding.json
|
||||
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"$schema": "https://fundingjson.org/schema/v1.1.0.json",
|
||||
"version": "v1.1.0",
|
||||
"entity": {
|
||||
"type": "organisation",
|
||||
"role": "owner",
|
||||
"name": "BentoPDF",
|
||||
"email": "[email protected]",
|
||||
"description": "BentoPDF is building an independent, open source document technology ecosystem. Our goal is to replace the external dependencies behind PDF processing and document understanding with engines we develop and maintain ourselves: Kura for PDF processing, standards and preflight, Hyper Compress for compression, and BentoParse, a lightweight document understanding engine that runs fully offline on ordinary CPUs (not yet public). BentoPDF, our browser based PDF toolkit, is the application through which these engines reach users.\n\nOur software runs locally, including in the browser through WebAssembly, so documents never have to leave the user's device. BentoPDF, Kura and Hyper Compress are licensed under AGPL-3.0, and the work is sustained by commercial licenses sold to companies that embed them in closed-source products, alongside community sponsorships.",
|
||||
"webpageUrl": {
|
||||
"url": "https://www.bentopdf.com",
|
||||
"wellKnown": "https://www.bentopdf.com/.well-known/funding-manifest-urls"
|
||||
}
|
||||
},
|
||||
"projects": [
|
||||
{
|
||||
"guid": "bentopdf",
|
||||
"name": "BentoPDF",
|
||||
"description": "BentoPDF is a privacy first PDF toolkit with 100+ tools that run entirely in the browser: merge, split, compress, edit, sign, OCR, convert and more, with no uploads, no accounts and no task limits. Files are processed on the user's device through WebAssembly, and BentoPDF is the application through which our own engines reach users. Hyper Compress already powers its compression tool.\n\nIt can be self hosted with a single Docker command, including in air gapped environments, which makes it a fit for people and organisations that cannot send documents to third party servers. BentoPDF has over 15 million Docker downloads, more than 16,000 GitHub stars and 1,400 forks, and its interface is available in 24 languages.",
|
||||
"webpageUrl": {
|
||||
"url": "https://www.bentopdf.com",
|
||||
"wellKnown": "https://www.bentopdf.com/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"repositoryUrl": {
|
||||
"url": "https://github.com/alam00000/bentopdf",
|
||||
"wellKnown": "https://github.com/alam00000/bentopdf/raw/main/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"licenses": ["spdx:AGPL-3.0-only"],
|
||||
"tags": [
|
||||
"pdf",
|
||||
"privacy",
|
||||
"productivity",
|
||||
"document-processing",
|
||||
"webassembly",
|
||||
"self-hosted",
|
||||
"security"
|
||||
]
|
||||
},
|
||||
{
|
||||
"guid": "kura",
|
||||
"name": "Kura",
|
||||
"description": "Kura is an independent engine for PDF processing, conversion, repair, archival, standards validation and print preflight. One engine covers all eleven PDF/A levels, PDF/UA-1 and UA-2, PDF/X-1a through X-6, PDF/E-1 and PDF/VT, plus Factur-X, ZUGFeRD, XRechnung and Order-X e-invoices. It repairs what is wrong, embeds what is missing, and runs 396 bundled preflight profiles covering print checks such as hairlines, rich black, image resolution, overprint, transparency and fonts.\n\nWhere existing tools split this work across renderers, converters and separate validators, Kura brings it into one engine that ships as a CLI, a C library, an npm package, a Docker image and a WebAssembly build that runs entirely in the browser.",
|
||||
"webpageUrl": {
|
||||
"url": "https://www.bentopdf.com/kura",
|
||||
"wellKnown": "https://www.bentopdf.com/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"repositoryUrl": {
|
||||
"url": "https://github.com/alam00000/bentopdf-kura",
|
||||
"wellKnown": "https://github.com/alam00000/bentopdf-kura/raw/main/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"licenses": ["spdx:AGPL-3.0-only"],
|
||||
"tags": [
|
||||
"pdf",
|
||||
"pdf-a",
|
||||
"accessibility",
|
||||
"archival",
|
||||
"preflight",
|
||||
"e-invoicing",
|
||||
"publishing",
|
||||
"webassembly"
|
||||
]
|
||||
},
|
||||
{
|
||||
"guid": "hyper-compress",
|
||||
"name": "Hyper Compress",
|
||||
"description": "Hyper Compress is a PDF compression engine built around verified transformations and document fidelity. It offers a true lossless mode and visual preserving presets, verifies every change that can affect how a page looks and rolls it back when the check fails, and never returns a file larger than the original.\n\nBenchmarked against Ghostscript, MuPDF and qpdf on 2,104 real world PDFs (27,352 engine runs), it achieved median size reductions of 22.4% in lossless mode and 52.3% at the 300 DPI preset, with the lowest corruption rate of any engine measured. It ships as a CLI, Node SDK, C library, self hosted service and a WebAssembly build that runs in the browser.",
|
||||
"webpageUrl": {
|
||||
"url": "https://www.bentopdf.com/hyper-compress",
|
||||
"wellKnown": "https://www.bentopdf.com/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"repositoryUrl": {
|
||||
"url": "https://github.com/alam00000/bentopdf-hyper-compress",
|
||||
"wellKnown": "https://github.com/alam00000/bentopdf-hyper-compress/raw/main/.well-known/funding-manifest-urls"
|
||||
},
|
||||
"licenses": ["spdx:AGPL-3.0-only"],
|
||||
"tags": [
|
||||
"pdf",
|
||||
"compression",
|
||||
"document-processing",
|
||||
"webassembly",
|
||||
"storage",
|
||||
"privacy"
|
||||
]
|
||||
}
|
||||
],
|
||||
"funding": {
|
||||
"channels": [
|
||||
{
|
||||
"guid": "bank-transfer",
|
||||
"type": "bank",
|
||||
"address": "",
|
||||
"description": "International bank transfer. Account details are shared privately on request."
|
||||
},
|
||||
{
|
||||
"guid": "github-sponsors",
|
||||
"type": "payment-provider",
|
||||
"address": "https://github.com/sponsors/alam00000"
|
||||
}
|
||||
],
|
||||
"plans": [
|
||||
{
|
||||
"guid": "core-development",
|
||||
"status": "active",
|
||||
"name": "Core development and maintenance",
|
||||
"description": "Funds sustained engineering time on Kura, Hyper Compress and BentoParse, and on BentoPDF as the application that brings them to users: new engine capabilities, standards coverage, security and bug fixes, benchmarks, WebAssembly builds, and reviewing issues and pull requests.",
|
||||
"amount": 50000,
|
||||
"currency": "USD",
|
||||
"frequency": "yearly",
|
||||
"channels": ["bank-transfer"]
|
||||
},
|
||||
{
|
||||
"guid": "community-sponsorship",
|
||||
"status": "active",
|
||||
"name": "Community sponsorship",
|
||||
"description": "Any amount, one-time or recurring, through GitHub Sponsors.",
|
||||
"amount": 0,
|
||||
"currency": "USD",
|
||||
"frequency": "monthly",
|
||||
"channels": ["github-sponsors"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -424,7 +424,7 @@ async function performFlatteningCrop(
|
||||
return newPdfDoc.save();
|
||||
}
|
||||
|
||||
function resetState() {
|
||||
export function resetState() {
|
||||
if (cropperState.cropper) {
|
||||
cropperState.cropper.destroy();
|
||||
cropperState.cropper = null;
|
||||
@@ -447,4 +447,6 @@ function resetState() {
|
||||
|
||||
const cropBtn = document.getElementById('crop-button') as HTMLButtonElement;
|
||||
if (cropBtn) cropBtn.disabled = true;
|
||||
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ const ESCAPED_MATH: ReadonlyArray<[string, string, boolean]> = [
|
||||
['\\\\[', '\\\\]', true],
|
||||
['\\\\(', '\\\\)', false],
|
||||
['\\[', '\\]', true],
|
||||
['$`', '`$', false],
|
||||
];
|
||||
|
||||
function escapedMath(state: StateInline, silent: boolean): boolean {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { resetState } from '../js/logic/crop-pdf-page.ts';
|
||||
|
||||
// Test resetState function for cropping
|
||||
describe('resetState', () => {
|
||||
beforeEach(() => {
|
||||
vi.spyOn(window, 'scrollTo').mockImplementation(() => {});
|
||||
});
|
||||
|
||||
it('scrolls the page to the top after resetting', () => {
|
||||
resetState();
|
||||
|
||||
expect(window.scrollTo).toHaveBeenCalledWith({
|
||||
top: 0,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -58,10 +58,17 @@ describe('Markdown to PDF rendering', () => {
|
||||
'',
|
||||
'```math\n\\int x\n```',
|
||||
'',
|
||||
'GitHub $`\\sqrt{3}`$ inline.',
|
||||
'',
|
||||
'Price $5 and $10, escaped \\$3, code `$q$`.',
|
||||
].join('\n')
|
||||
);
|
||||
expect(root.querySelectorAll('.katex').length).toBe(8);
|
||||
expect(root.querySelectorAll('.katex').length).toBe(9);
|
||||
const github = [...root.querySelectorAll('p')].find((p) =>
|
||||
p.textContent?.startsWith('GitHub')
|
||||
);
|
||||
expect(github?.querySelector('.katex')).not.toBeNull();
|
||||
expect(github?.textContent).not.toMatch(/[$`‘’]/);
|
||||
expect(root.querySelectorAll('.katex-display').length).toBe(5);
|
||||
expect(root.querySelector('em')).toBeNull();
|
||||
expect(root.textContent).toContain('Price $5 and $10, escaped $3');
|
||||
|
||||
Reference in New Issue
Block a user