Better HN
topnewbestaskshowjobs
Log inSign up

RedMindZ

107 karma · joined Nov 18, 2026 (2w ago) · 22 submissions

Submissions

comment 13h ago · link · parent

When you ask about a comparison to MuPDF, it depends on the dimension you are talking about.

If you refer to the accuracy of rendering, it is effectively identical on my test suite up to minor differences in anti-aliasing and such; I gave a more detailed answer in another comment.

If you refer to rendering performance (FPS), then it is hundreds to thousands of times faster, although I don't have exact benchmarks; I talked about it some more in the comment asking about SumatraPDF.

As for safety, I have to be honest and say that I have not paid much attention to it specifically. I am using Rust, and I utilize the type system as much as I can to ensure all cases are handled and there are no panics or memory corruptions. Only MuPDF directly interfaces with the PDF, so I hope that given its age it has patched most vulnerabilities. I have also disabled JS in the MuPDF build and I assume that is where most vulnerabilities would be. If there is something else I should be aware of, let me know.

comment 14h ago · link · parent

Thank you very much!

comment 14h ago · link · parent

Thank you!

comment 14h ago · link · parent

Thank you!

Currently the framerate is uncapped to minimize input latency. If Pryzmera doesn't receive any input it stops rendering, so it shouldn't waste system resources (except RAM) while you are not using it. You should be able to see the FPS freeze and CPU/GPU utilization go to zero if you stop moving your mouse (it could take a few seconds). If that is not the case for you, there might be something in your system that makes Pryzmera keep rendering while idle (this happens to me when task manager is open), or there might be a bug I should fix.

I already got multiple requests to add annotation editing, I know its really important in the field, but this is a deep complexity pit and Pryzmera is already very complicated, so it's going to be a major challenge to implement. I hope I will manage to solve that as well, but that would probably be in the distant future.

comment 14h ago · link · parent

I would love to release both a Mac and a Linux version in the future, it will just take me more time.

For now, there is a portable version on the downloads page (https://pryzmera.com/downloads/), and one of my friends ran it on ubuntu with wine, and it seemed to work fine. As for Mac, another friend tested with wine on Mac and it didn't work at all; Maybe it would work with CrossOver? But I don't know anything about Windows emulation on Mac.

If you are interested in trying it on a non-windows system, I would love to hear if it works well for you!

comment 15h ago · link · parent

Depends on the dimension you are asking about:

If you are talking about performance, while I haven't benchmarked SumatraPDF specifically, it is using MuPDF under the hood both for parsing and rendering. I actually modified my MuPDF to load significantly faster in specific situations, so Pryzmera and SumatraPDF should be competitive on loading speed. For rendering performance, I am familiar with MuPDF's rendering performance and would confidently estimate that Pryzmera renders hundreds or thousands of times faster compared to SumatraPDF. Sadly I don't have exact benchmarks, so I hope my best estimate will suffice here.

If you are talking about other features, I am frankly not sure, I don't use SumatraPDF and only have a rough idea of what it offers, so I regrettably cannot inform you there.

comment 16h ago · link · parent

My intention certainly is to make it software that you truly own, hence why it should keep working long after I'm gone. There is definitely a tradeoff here between working forever VS working on any computer. I chose the "working forever" option.

The way offline activation works is by enabling you to reach the server from a different computer that does have an internet connection, but it is mostly orthogonal to not requiring checking in with the server after activation. After activation is performed, Pryzmera has a local license that never requires it to check in with the server, which is why it is not transferrable.

The issue is not that I don't trust my paying customers, it's that in all likelihood someone will abuse the system and will resell a single key as many times as they can. Maybe I worry too much about this option, but for now this path seems reasonable to me.

comment 16h ago · link · parent

The short version is Rust, for its performance and type system.

Initially, in January of 2022, I wrote the first iteration in Python to prove the idea. After about 2 weeks, I had a working prototype, but it could take 30 minutes to convert a single file into gltf, it didn't support anything other than vector paths, and it was simply terrible; but it did work.

To make it more practical to use, I started working on a C# version in March of 2022, which was much more practical to use: It rendered into its own window instead of converting to gltf, and could load the same documents in about 10 seconds. I chose C# because I was very comfortable with it at the time, it was way faster than python, and also didn't require me to deal with all the many pains of C. It took me about 3 months to make it usable, and another 3 months to round it out. It was good enough for my father to use it, but it was getting difficult to continue developing it and my most extreme document would still take 4 minutes to load.

Around the beginning of 2023, I started hearing about Rust and got really excited about it: It had the performance of C with an amazing type system and without manual memory management, and I thought it would be both fun to use, and could make the software much better. So in April of 2023 I started first by implementing the tessellator in Rust, and after 4.5 months it was ready for use and about 4x faster than Clipper2 while producing less geometry and supporting more complex operations. Fast forward another 3 years, and we ended up with the current-day Pryzmera, which opens that same document that took C# 4 minutes in 6 seconds, and renders it about 15x faster.

comment 16h ago · link · parent

Why not? For an individual license, you get 5 activations, which I think should suffice for a while. And as I said in other comments, the 5 activations restriction is something I would like to lift once I replace MuPDF.

And regardless, as far as I know, it is mathematically impossible to implement both an offline license that never calls to the server and transferable activations. The reason being that if you never verify the license with the server, someone could take a snapshot of the machine, transfer the license, then roll back the machine, which would yield an infinite number of activations.

It was far more important to me that Pryzmera would keep working permanently even if one day me and the server disappeared. This is software that is completely independent of the server and will keep running indefinitely, which means it also works in air-gapped systems.

If you have a better suggestion for how to implement licensing, please let me know.

comment 17h ago · link · parent

Thank you!

I believe all the software we use can be great, and Pryzmera is my one contribution towards that. Whether it is great or not is left up to everyone's judgement, but its the best I can do.

comment 18h ago · link · parent

It's only AGPL if you don't pay them.

I did sign a contract with them, which is also the reason why the number of activations per license is limited. My next objective is to replace MuPDF with my own code to remove this limitation and to significantly improve loading performance.

comment 18h ago · link · parent

Very reasonable question!

On Pryzmera's side, the same way it renders to the window, it can render to an image file instead (PNG). On the "ground truth" side, I use mutool (based on MuPDF) to render the same PDF into another image file. Both renders are configured to use the same resolution, and then they can be compared pixel-by-pixel. Pixels are simply 3 numbers, representing the intensity of the red, green, and blue colors in the pixel. Each one of those can be directly compared to the same color in the other pixel by simply calculating their absolute difference (AKA |red1 - red2|). You can also use other functions here, like squared distance and such. All of the differences are summed to give you the error for each pixel, and then you can measure different metrics, like the pixel with the biggest error in the image, or the average pixel error for the image.

One note about "ground truth": When it comes to PDF rendering, the specification is incredibly long and complicated, which means there is basically not a single renderer that renders PDFs 100% correctly, even Acrobat likely has bugs. Thus, the output for each renderer is usually slightly different, especially around weird edge cases. For that reason, "whatever Acrobat does" has often times become the effective specification.

And if you have any other questions, please don't hesitate to ask!

comment 18h ago · link · parent

Currently closed source.

It does currently use a modified version of MuPDF to parse PDFs, but everything past parsing (e.g. translating graphics primitives to a GPU representation) is done by Pryzmera. In the future, I would like to replace MuPDF with my own code.

comment 19h ago · link · parent

That's interesting, Pryzmera gets all of its text already positioned by MuPDF, so it could be a low level bug where the glyphs are rendered in a slightly different position inside their bounding box than where I expect them to be. If the text you are looking at is small, this could also be the result of text anti-aliasing being different in Pryzmera compared to other viewers. It's hard for me to speculate further without seeing your exact document.

I did my best to tune text rendering to look as good as it can be, but it's certainly not perfect. You can try raising the text rendering quality from the graphics settings (lets say to 64), reload the document with F5, and see if it looks better.

comment 19h ago · link · parent

Thank you for the additional test case!

This PDF is mainly composed of a large image (around 1GB uncompressed, very close to my stress test) and relatively few vector paths, Pryzmera renders it at about 300FPS on my machine.

comment 19h ago · link · parent

Thank you! <3

I hope it can serve others as well!

comment 20h ago · link · parent

Thanks for the input. While it is mostly a problem in the CAD fields, I don't wanna limit it just to CAD, I think it has a few other applications (like searching long text documents or viewing large images), and for me it also just feels really good to use, so I don't wanna push away other people who might find value in it.

comment 20h ago · link · parent

Can you share you CPU? I am also wondering if X-Change works well for you when zooming?

And yes, I am quite fond of the handmade network :)

comment 20h ago · link · parent

At what frame rate does it render? Can you easily zoom in without lag?

And as far as my hardware is concerned, not everyone has the latest hardware. But even old hardware is so incomprehensibly fast, there is no reason it shouldn't render everything at least at 60 FPS or higher.

If you don't struggle with slow PDFs, that's great; Pryzmera is probably not for you, but in architecture and related fields this is a huge problem.

comment 20h ago · link · parent

Normally, no. But in the CAD world it is a huge problem. You can try opening the stress test PDF I linked in the text body (https://pryzmera.com/stress_test.pdf), it is a decent representation of the problem architects and related field deal with.

comment 20h ago · link · parent

To test rendering correctness I use my own suite of about 100 PDFs that is a mix of research papers, proprietary CAD drawings from different people my father works with, technical specs, books, and few others. I compare rendering results from Pryzmera to MuPDF, and when the PDF doesn't contain a feature Pryzmera doesn't support, rendering is basically equal up to anti-aliasing differences. On my test suite nearly all PDFs render correctly, with a few that have minor differences (for example, images don't look identical at all zoom levels due to sampling, but the content is the same).

As for visual features Pryzmera currently doesn't support, the biggest one is probably shading; it's very rare in my test suite, but I will probably add support in the future, I just haven't got to it yet. Other visual features like paths, images, text, image masks and transparency are fully supported.

Lastly, I would like to add that fidelity is not absolutely everything: when you can't open a PDF, it doesn't help that it will eventually render correctly. Effectively you are not getting any render at all. Pryzmera does its best to render as close to the spec as possible, but is willing to sacrifice some visual fidelity (for example, by flattening curves into multiple line segments) in order to achieve orders of magnitude better performance. And if something does fail to render, it should appear in the logs, excluding bugs of course.

22.

Show HN: Pryzmera – Fast PDF viewer fully rendering on the GPU(pryzmera.com ↗)

158 points · by RedMindZ · 1d ago · 60 comments