Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This has excellent performance, and is incredibly fast. Well done!

Mutools is fantastic for PDF I use it as a backup converter when imagemagick fails in my document viewer: https://github.com/dosyago/chai



This WASM "demo" is literally the only viewer on Windows I've found that can handle documents like the Baldur's Gate 3 Artbook (around 300MB of high-res artworks in PDF format). Native and browser-based viewers all choke even on a decent system with lots of memory.


I’m curious, have you tried SumatraPDF (uses muPDF under the hood)?

https://github.com/sumatrapdfreader/sumatrapdf


That should literally be impossibly surpising

Checked Sumatrapdf on Windows and it's better - while on some fast mouse wheel scrolling the web version is more responsive, but then it doesn't adjust text quality, so shows blurry version (though zooming seems to fix it) while the local versionalways shows high quality text (sometimes after a delay)

Pageup/down scroll is without a delay locally but it scrolls through blank pages, so I guess mouse scroll just always does quality rendering, thus it's the only operation that's slower locally

So while pages load faster in the web version, they are of much worse quality initially


Even the MuPDF native app fails?


If that is indeed the case, we'd appreciate a bug report over at https://bugs.ghostscript.com It is hard to fix issues we don't know about. :)


Even okular?


Off-topic: Chai's license seems to be proprietary now. 7 months ago the license was AGPL as given by the LICENSE and README.md files [1][2]. 1 month ago, the LICENSE file was changed to the text of the PolyForm Noncommercial License 1.0.0 [3], but the README.md still says AGPL. If Chai continues to use MuPDF (AGPL [4]), then isn't Chai's new license contradictory (unless the Chai developers got a license exception from Artifex Software)?

[1] https://github.com/dosyago/chai/blob/a6b7fb50647ae001185bdc8...

[2] https://github.com/dosyago/chai/blob/a6b7fb50647ae001185bdc8...

[3] https://github.com/dosyago/chai/commit/45da5f12ab8a817dc4f74...

[4] https://github.com/ArtifexSoftware/mupdf/blob/master/COPYING


Don't worry about it, you're confused, it's okay. Hahahaha! :) AGPL requires you release the source and we do that.

As an aside — would be interesting to get Artifex's comment on this — but I'm not even sure it applies as we install the mutool binary via apt, call it from bash, and we don't modify or use their libraries at all. Would this even need to comply with AGPL at all? I don't know.

If you'd carried on your search of our source a little bit further, you'd see we use the mutool binary: https://github.com/dosyago/chai/blob/37c1a1ec0941d81e0d6f8af... ; and you also may have discovered what the AGPL means: https://artifex.com/licensing/agpl/ Hahahaha! :)


I would highly suggest you read the actual license text, because its a lot more than "just share the source".


Looks like they’re calling the mupdf CLI, which makes chai not a derived work of mupdf IIUC. This would mean that AGPL applies to mupdf only.


Hahaha! :) Thank you! This is correct!

Appreciate you droppin by with your dose of clarity! Hahaha :)


I don't know why our threads have been covered with concern trolling around licensing regarding anything to do with our products, trying to provoke confusion and mistrust!!! Hahaha :)

Actually I think I do know: there are a couple of competitors to BrowserBox operating around the world, one based in Europe, one in the Americas, that all use a similar WebRTC video streaming method out of containerized headful Chrome with getUserMedia extensions.

Our method is different, but lower resource usage, and more customizable. Theirs requires GPUs and has higher base costs. But that's not the thing they're mad about: it's actually much more inflexible because they are not instrumenting headless Chrome, they are just streaming the viewport of headful using xvfb.

They can't 'downgrade' off GPUs because their whole video codec depends on it, and they don't / can't control if the browser is paused via an alert modal, doing a basic auth prompt, downloading a file. Even multiple tabs are a major challenge for that method, and mobile form factors? Basically a non-starter.

These competitors resent our flexibility and are jealous of our larger control of the browser that enables us to more easily deliver all these things. They're concerned that implementing the same will run them afoul of our codebase, and they actually hoped to use/test/deploy BrowserBox when it was open-source, but became furious when we made it require a paid license for commercial use.

Consequently, they've been acting shady across a range of threads, trying to "not compete" with us by using concern trolling in an attempt to tarnish our reputation. Shadily and dodgily not competing but being abusive and dishonest!

The sad thing is: I like their products! I respect their technical accomplishments and admit they have better quality video streaming! At least right now -- but we never optimized for that.

The issue is we can "snap in" a video codec layer whenever we please, if we want. They have 'run the experiment' and proved it is indeed possible to achieve real-time interactive streaming at relatively low latency, albeit higher fixed resource cost. This is appropriate for some applications!

It's just that the method they chose has less control and customizability, and they cannot "downgrade" out of their rigid set up because they have no alternative. They were lured by the promise of higher quality streaming into a more inflexible architecture, while we pursued the "low end" of virtual browsers for automation which ended up giving us abundant control, and low latency streaming that's more flexible overall, not just across devices, but on low resource situations, while also performing very well at the high end.

They have really ramped up their shady tactics since we launched CloudTabs and integrated with Puter. CloudTabs is our BrowserBox demo Saas, that was just meant to be a big funnel for licensees but ended up growing independently. Since launching 18 days ago we already have 6500+ users, just through Puter. We have a bunch more going straight to CloudTabs. It's crazy. Nothing can stop this train! Not even the lies of phoney 'competitors' acting shadily from the corners instead of actually competing with integrity! Hahaha!!! :)


Hahaha! :) You want to pretend we're doing something wrong, right? Okay you read it and point out something. Hahahaha! :) You know you're quoted "just share the source" comes from their page, right? Hahaha! :)


You need to share the source under the same license, you need to publish changes under the same license, and there are quite a few gotchas in relation to who you have to publish it to (not anyone who asks).


Haha! :) Oh I get you're confused. I was a confused a lot about licenses when I started out. I'm probably still confused a lot! Hahaha :)

Another commenter has dealt with that:

https://news.ycombinator.com/item?id=40105915

This usage is considered "at arms length".

If you're interested in chai, I encourage you to check out a way it's being used for real in this live demo of BrowserBox / CloudTabs: https://browse.cloudtabs.net/signupless_sessions

Search for a docx, PDF file whatever and you can convert to images without ever downloading to your device. We've got 6000+ users in 17 days on our Puter Browser app: https://puter.com/app/cloudtabs-browserbox

We have a lot of exciting things coming soon, too. :)


Hahaha!


Hehehe :)


Indeed, this appears to have the same advantage over other viewers as the standalone MuPDF, i.e. much greater rendering and navigating speed.

MuPDF is my main PDF viewer, due to its unmatched performance and good full-screen UX, even if I sometimes encounter PDF files that cannot be rendered by MuPDF, when I have to fall back to other viewers, e.g. Okular.


Coming from someone who is clearly in academia / research adjacent (!! judging by your comments) this is high praise!! PDFs are close to currency of the realm. Haha! :)


The developers of muPDF would likely be interested in the files that are rendered incorrectly so that can be fixed


The performance is astonishing. On my underpowered android, the PDF was super smooth. It's miles ahead of other PDF viewers (the worst offender is the Google Docs in browser pdf viewer, it's just horrible on my phone to a point where I refuse to even look at those documents on my phone). Really impressive


I don't see it having any better performance than integrated chrome pdf viewer. Furthermore, with it using wasm i'd expected it to have custom renderer, but it's just pdf to html converter.

And loading times are quite bad (10 times slower - compared to firefox or chrome pdf viewers).


Loading the mupdf.js bundle is slow right now. When I checked it out it was super fast. Guess it's a server/ratelimit/caching issue with the HN hug being top of front page.

Which is what I guess you mean about 10x slower -- so you're making an unfair comparison as you're counting the network at peak, whereas browser plugins load from disk or memory.

But I actually thought the load of the PDF (once the app was loaded) was, for MuPDF.js, slightly faster than the browser plugin. When I watched it, tho I have not benched it. Do you have any benchmarks?


I downloaded this file https://indico.cta-observatory.org/event/5245/contributions/... and tried timing how long it took for the standard firefox vs this MuPDF viewer to render the first slide and there is like at least 3 second difference.

As others in the thread also report significant speed gains I think you either have some weird issue with your setup or how you measure performance.


It uses a custom renderer, which seems to just blit its image data onto a canvas. The HTML is just there so you can actually select the text.


Does this generally satisfy accessibility needs too?


[flagged]


Hahaha! :) Which words would you have used a thesaurus for? I don't see anything that complex there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: