NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Show HN: Pryzmera – Fast PDF viewer, over 1200x faster rendering than Acrobat (pryzmera.com)
fnordsensei 2 hours ago [-]
I think this is great. A good example of classic hacker culture: you (or someone nearby) had a problem, and you wrote a solution. Kudos!
RedMindZ 2 hours ago [-]
Thank you! <3

I hope it can serve others as well!

angry_octet 1 hours ago [-]
I stopped caring about fast pdf viewing some time ago. Now I only care about secure parsing and rendering. Signing and signature verification with something other than Acrobat would also be great.
maxloh 3 hours ago [-]
What do you use for conformance and regression testing? How much of a real-world PDF test suite can it render accurately?

For a PDF viewer, fidelity matters much more than rendering speed. Imagine using it to open CAD PDFs as you suggested, only to realize a few months later that sections of some files silently failed to render, by which point the ship has sailed.

Relying on a renderer maintained by a single person or even a small team carries significant risks. There are too many things that can go wrong.

For example, pdf.js (which powers Firefox) uses a test suite with 1,579 files and growing: https://github.com/mozilla/pdf.js/tree/master/test/pdfs

RedMindZ 3 hours ago [-]
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.

darkwater 39 minutes ago [-]
Out of curiosity, how do you compare your rendering output to the ground truth rendering? It's probably a naive question but I have zero knowledge on this domain and I'm curious to learn!
RedMindZ 17 minutes ago [-]
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!

herf 2 hours ago [-]
The kerning (or inter-character spacing) looks a little rough compared to most viewers - is there more you could do to improve this?
RedMindZ 1 hours ago [-]
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.

aledamasmx 47 minutes ago [-]
Adobe Digital Editions to read PDF and EPUB
jimjimjim 1 hours ago [-]
Does this use the MuPDF toolkit for pdf reading and processing? Is it opensource?
RedMindZ 45 minutes ago [-]
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.

EgoIncarnate 18 minutes ago [-]
Isn't MuPDF AGPL?
RedMindZ 15 minutes ago [-]
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.

wewewedxfgdf 3 hours ago [-]
Is PDF performance a problem?
RedMindZ 3 hours ago [-]
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.
sourweasel 2 hours ago [-]
GIS is another field with lots of complex slow-rendering PDF files. I would recommend trying some USGS topo maps for your stress testing.

Sample Link (West Mt. Rainier 7.5min): https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/USTopo/...

Source: https://apps.nationalmap.gov/downloader/

RedMindZ 2 hours ago [-]
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.

wewewedxfgdf 3 hours ago [-]
>> Normally, no. But in the CAD world it is a huge problem.

Perhaps then you should market it as "Fast PDF for people who love CAD" or something. Then you might catch the attention of the people for whom this solves a problem

Aiming generally at everyone, certainly I'm like "meh, PDF seems fast enough".

RedMindZ 3 hours ago [-]
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.
wewewedxfgdf 2 hours ago [-]
>> I don't wanna push away other people who might find value in it

If you market to everyone, you market to no one.

Perhaps discuss the marketing and target market and segmentation of this product with your local LLM.

You have described to me a pain point for the construction and design industry that presumably has at least some money to spend on better tools.

cyral 1 hours ago [-]
Acrobat is a laggy mess, at least on Mac. Like sub 10-fps often times
3 hours ago [-]
mminer237 15 minutes ago [-]
It looks very impressive. I mainly use simple PDFs, but Acrobat is indeed frustratingly slow just starting up without even rendering anything. I count six seconds to just open it on my computer without even opening a file. (Versus SumatraPDF, which is well under a single second.)

I'm glad people are still trying to make things better. It's a great irony that as computers get faster and faster, software still manages to get slower and slower.

cvadict 3 hours ago [-]
> https://pryzmera.com/stress_test.pdf

the stress test renders in < 3 seconds on my m5 max in pdfcraft (which is open source). Not sure I would ever pay $60 for a closed-source app to "speed it up," especially given how contrived that stress-test PDF is.

> GTX1080/i7-5820k

Yeah, there's your problem. Computers have gotten substantially faster in the last dozen years. I can't say I've felt that a PDF (regardless of how complex) has been slow during that time.

tecleandor 3 hours ago [-]
You're complaining about a $60 app from a computer that maybe was $4K or $5K. Even on my M2 Max 32GB, it takes around 10 seconds just to load the stress test file and navigating trough it is extremely laggy. Apple Preview just hangs.

If I had an older computer, and my field of work required me to open extremely complex PDFs and my two options were 1) buying a $60 software 2) dropping $5K in a new computer... I think I'd chose the first.

WhitneyLand 33 minutes ago [-]
I think it’s a nice piece of engineering.

Three seconds can get to be a real pain if you do it a lot.

Always room for things to go faster.

zokier 1 hours ago [-]
high end computers have gotten substantially faster. That decade old system is still pretty competitive against your typical average $400 basic laptops that are way too common
RedMindZ 3 hours ago [-]
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.

p1mrx 3 hours ago [-]
$60 for a closed source PDF viewer, with 1 year of updates.

I wish you good luck finding customers.

deburo 3 hours ago [-]
Yeah unfortunately there's already a few options for fast PDF rendering, at similar prices, with plenty more features since they are mature.

PDF X-Change comes to mind. It handles the linked stress PDF pretty well.

EDIT: I wonder if OP is an handmade hero guy? There's been a bunch of pretty cool products from that community: Zeiger, Blick, FilePilot, ...

koziserek 3 minutes ago [-]
even my embedded PDF previewer in my vibecoded file manager 'ffss' handles the stress test, taking somewhere between 500 and 1000ms ..

https://github.com/koziserek/ffss - saying so, because this feature landed exatly today ;)

tecleandor 2 hours ago [-]
although it still works, note that the X-Change Viewer is discontinued, and they haven't upgraded it since 2018. The new software, X-Change Editor, is €59 for the regular version and €75 for the "Pro".
RedMindZ 3 hours ago [-]
Can you share your CPU? I am also wondering if X-Change works well for you when zooming?

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

mikevannelli 4 minutes ago [-]
[dead]
minh27ten 18 minutes ago [-]
[dead]
b4sit 2 hours ago [-]
[dead]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 22:52:38 GMT+0000 (Coordinated Universal Time) with Vercel.