[CBH] BentoPDF can now edit existing PDF text along with two new engines.

a month ago by alam to c/selfhosted

Hello folks!

I would like to share an update about BentoPDF. It's an open source privacy first PDF toolkit that runs in your browser.

1. You can now actually edit text inside PDFs

BentoPDF now allows you to click existing text, edit it, and have the text reflow while preserving the original fonts and styling.

It also includes:

  • Bold, italic, underline, strikethrough, superscript, subscript, font family/size, colours, outlines, character spacing and line spacing
  • Left, centre, right and justified alignment
  • Bulleted and numbered lists with indentation
  • RTL and LTR text alignment
  • Find and replace across the document
  • Edit images by rotating, flipping, duplicating, resizing or deleting them
  • Object alignment, distribution, rotation, flipping, duplication

Please note this is a work in progress. You may encounter bugs, which you can report and I will look into.

2. Hyper Compress

Hyper is an open source PDF compression engine built to solve specific problems.

  • Compression sometimes returns a file larger than the original. Hyper's result is always binary: it either produces a smaller PDF or returns the original. This helps create predictable workflows.
  • Hyper includes a true lossless mode. It preserves searchable text, document structure and PDF conformance, rather than rebuilding the document from scratch like Ghostscript.
  • It runs everywhere: CLI, Node SDK, C API, self hosted service, and WebAssembly build.

Repository and benchmarks: https://github.com/...

I also compared it to Adobe's compression API, but only managed around 100 PDFs where results were within 5%. Testing on a bigger corpus got expensive.

3. Kura

Kura is a PDF standards, conversion and preflight engine.

It supports:

  • All 11 PDF/A conformance levels: PDF/A-1a, PDF/A-1b, PDF/A-2a, PDF/A-2b, PDF/A-2u, PDF/A-3a, PDF/A-3b, PDF/A-3u, PDF/A-4, PDF/A-4e and PDF/A-4f
  • Accessibility: PDF/UA-1 and PDF/UA-2
  • Print production: PDF/X-1a, PDF/X-3, PDF/X-4, PDF/X-4p, PDF/X-5g, PDF/X-5n and PDF/X-5pg
  • Engineering and variable data printing: PDF/E-1 and PDF/VT
  • E-invoices: Factur-X, ZUGFeRD, XRechnung and Order-X
  • 396 bundled print-preflight profiles

It has been tested against several standards suites, including the veraPDF corpus, Isartor, BFO, Ghent Output Suite 5.0, the PDF/UA Reference Suite and Cal Poly's PDF/VT suite.

Across 30,677 PDF conversions it had zero crashes and zero timeouts, with a 0.05 second median conversion time.

Like Hyper, it ships as a CLI, C library, npm package, Docker image and WebAssembly build.

Repository and benchmarks: https://github.com/alam00000/bentopdf-kura

The release also contains other improvements and bug fixes: https://github.com/...

Thank you and have a great weekend!

DonutsRMeh 50 points a month ago

A couple of years ago, I complained about not many options for PDF editing on Linux, now there are too many of them and I’m 100% ok with that. Thank you for this.

path: 0 25552781, hotness: undefined, score: 50, children: 6
Kirk 5 points a month ago

What others are there? This is the first I know of!

path: 0 25552781 25558500, hotness: undefined, score: 5, children: 5
lIlIllIlIIIllIlIlII 6 points a month ago

Stirling pdf, but is going with the freemium path.

path: 0 25552781 25558500 25561113, hotness: undefined, score: 6, children: 1
WillieShen 1 point a month ago

I selfhosted it on my phone and laptop. Great as a replacement of ILovePDF and those CLI tools that have no common interface (I could write some functions to make one tho).

path: 0 25552781 25558500 25561113 25578676, hotness: undefined, score: 1, children: 0
HubertManne 1 point a month ago

im curious to. this would be a competitor for firefox for me.

path: 0 25552781 25558500 25560752, hotness: undefined, score: 1, children: 2
Kirk 1 point a month ago

Firefox can edit existing pdf text?

path: 0 25552781 25558500 25560752 25565468, hotness: undefined, score: 1, children: 1
HubertManne 1 point a month ago

no that is why this would be a better option. it can only add text.

path: 0 25552781 25558500 25560752 25565468 25565769, hotness: undefined, score: 1, children: 0
cannedtuna 40 points a month ago

Thanks for your work man. Bento is great.

I mostly use it to unlock PDFs that really shouldn’t be locked in the first place. I’ve been meaning to try out some of the other features but hadn’t gotten around to it yet.

Keep it up!

path: 0 25550932, hotness: undefined, score: 40, children: 1
alam 23 points a month ago

Thanks a lot! I am glad it helped

path: 0 25550932 25551038, hotness: undefined, score: 23, children: 0
zer0squar3d 11 points a month ago

This is great! Keep it up!

path: 0 25553219, hotness: undefined, score: 11, children: 0
curbstickle 8 points a month ago

@alam@lemmy.world Please update your post with a tag and disclosure as needed per rules 7 & 8.

path: 0 25550433, hotness: undefined, score: 8, children: 4
alam 42 points a month ago

Hi, I just wanted to clarify the AI disclosure requirement again.

I used AI to help generate a large number of malformed PDF files including edge case PDFs that break PDF conformance, which I then used for testing and validating both the engines. However, AI was not used to write the engine's code or the actual test cases.

Would this require me to tag the post as [AIH] / AI-involved? Thank you

path: 0 25550433 25550628, hotness: undefined, score: 42, children: 2
curbstickle 26 points a month ago

That wouldn't count as anything other than CBH, since it wasn't involved in any stage of programming/documentation/etc - more like testing samples, which is no different than users sending crappy pdf's along imo.

path: 0 25550433 25550628 25550696, hotness: undefined, score: 26, children: 1
alam 22 points a month ago

Great thank you very much. I have updated it to reflect the same

path: 0 25550433 25550628 25550696 25550788, hotness: undefined, score: 22, children: 0
alam 13 points a month ago

Hello! Thank you I have updated it. I believe if its CBH then rule 8 does not apply? If I missed anything then kindly let me know

path: 0 25550433 25550587, hotness: undefined, score: 13, children: 0
warmaster 5 points a month ago

Does Kura allow for user defined checks?

path: 0 25551374, hotness: undefined, score: 5, children: 1
alam 8 points a month ago path: 0 25551374 25551893, hotness: undefined, score: 8, children: 0
enchantedgoldapple 5 points a month ago

I really appreciate the work you're doing! I mostly local PDF viewers and editors for my daily work, but for situations where those apps fail, BentoPDF reliably helps me out.

I recall having used tinywow.com for bite-sized tasks with files which I found quite convenient at the time. While I have stopped using it in favour of better and privacy respecting applications, I love how BentoPDF brings about a similar level of convenience, as a FOSS app no less.

path: 0 25552973, hotness: undefined, score: 5, children: 0
Schlemmy 4 points a month ago

Huge fan of Bento PDF. We don't have a decent PDF suite at work so most of my colleagues turn to online tools that are likely to collect your data.

I selfhosted Bento for my team and their reactions are very positive.

path: 0 25578430, hotness: undefined, score: 4, children: 1
alam 1 point a month ago

That's great to know! (:

path: 0 25578430 25579885, hotness: undefined, score: 1, children: 0
ABasilPlant 3 points a month ago

Hi! I just wanted to say thank you very much for making BentoPDF - I'm a big fan! It's a tool I use regularly and I'm always very happy that it's so intuitive and easy to use. I learnt about it from lemmy here (your post 8 months ago), btw!

path: 0 25567526, hotness: undefined, score: 3, children: 1
alam 3 points a month ago

Wow you were one of the very first users then. Thank you for your support!

path: 0 25567526 25579880, hotness: undefined, score: 3, children: 0
Voroxpete 1 point a month ago

Oh hell yes! Awesome update.

path: 0 25560441, hotness: undefined, score: 1, children: 1
alam 2 points a month ago

Thank you! Hope you like it

path: 0 25560441 25579882, hotness: undefined, score: 2, children: 0
selfhosted
selfhosted

@lemmy.world

login for more options
62900
6787
5509

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

go to feed...