- First commit 3hours ago. - commit message: LLM-generated. - README: LLM-generated. I'm not convinced that projects vibe coded over the evening deserve the HN front page… Edit: and of course the author's blog is also full of AI slop… 2026 hasn't even started I already hate it.
...and it does not work. I tried it on ~10 random pdfs, including very simple ones (e.g. a hello world from typst), it segfaults on every single one.
Zpdf: PDF text extraction in Zig
31–40 of 88 posts
Re: Zpdf: PDF text extraction in Zig
#3274910,74912c187768,187779 > myconv; > [Example 1: If you want to use the code conversion facet codecvt_utf8 to output to cout a UTF-8 multibyte sequence > corresponding to a wide string, but you don’t want to alter the locale for cout, you can write something like: > > § D.27.2 > 1954 > > © ISO/IEC > N4950 > > wstring_convert > myconv; > std::string mbstring = myconv.to_bytes(L"Hello\n"); Is indeed faster but output…
Re: Zpdf: PDF text extraction in Zig
#3374910,74912c187768,187779 > myconv; > [Example 1: If you want to use the code conversion facet codecvt_utf8 to output to cout a UTF-8 multibyte sequence > corresponding to a wide string, but you don’t want to alter the locale for cout, you can write something like: > > § D.27.2 > 1954 > > © ISO/IEC > N4950 > > wstring_convert > myconv; > std::string mbstring = myconv.to_bytes(L"Hello\n"); Is indeed faster but output…
fixed.
Re: Zpdf: PDF text extraction in Zig
#34Earlier quoted context omitted.
added a comparison, will improve further. https://github.com/Lulzx/zpdf?tab=readme-ov-file#comparison-... also, added python bindings.
thanks, claude, I guess haha as others have commented, I think while this is a nice portfolio piece, I would worry about its longevity as a vibe coded project
Re: Zpdf: PDF text extraction in Zig
#3574910,74912c187768,187779 > myconv; > [Example 1: If you want to use the code conversion facet codecvt_utf8 to output to cout a UTF-8 multibyte sequence > corresponding to a wide string, but you don’t want to alter the locale for cout, you can write something like: > > § D.27.2 > 1954 > > © ISO/IEC > N4950 > > wstring_convert > myconv; > std::string mbstring = myconv.to_bytes(L"Hello\n"); Is indeed faster but output…
fixed.
01F9020101FC020401F9020301FB02070205020800030209020701FF01F90203020901F9012D020A0201020101FF01FB01FE0208
0200012E0219021802160218013202120222 0209021D0212021D012E013202200222000301FA021A0220021C022002160213012E0222000F000301F90206012C
020301FF02000205020101FC020901F90003020001F9020701F9020E020802000205020A
01FC028C0213021B022002230221021800030200012E021902180216021201320221021A012E00030209021D0212021D012E013202200222000301FA021A0220021C022002160213012E0222000F000301F90206012C
0200020D02030208020901F90203020901FF0203020502080003012B020001F9012B020001F901FA0205020A01FD01FE0208
020201300132012E012F021A012F0210021B013202200221012E0222 0209021D0212021D012E013202200222000301FA021A0220021C022002160213012E0222000F000301F90206012C
This for entire book. Mutool extracts the text just fine.Re: Zpdf: PDF text extraction in Zig
#36Earlier quoted context omitted.
...and it does not work. I tried it on ~10 random pdfs, including very simple ones (e.g. a hello world from typst), it segfaults on every single one.
Tried few and works. Maybe you've older or newer Zig version than whatever project targets. (Mine is 0.15.2.)
~/c/t/s/zpdf (main)> zig version
0.15.2
Sky is blue, water is wet, slop does not work.Re: Zpdf: PDF text extraction in Zig
#3774910,74912c187768,187779 > myconv; > [Example 1: If you want to use the code conversion facet codecvt_utf8 to output to cout a UTF-8 multibyte sequence > corresponding to a wide string, but you don’t want to alter the locale for cout, you can write something like: > > § D.27.2 > 1954 > > © ISO/IEC > N4950 > > wstring_convert > myconv; > std::string mbstring = myconv.to_bytes(L"Hello\n"); Is indeed faster but output…
In my experience with parsing PDFs, speed has never been an issue, it has always been a matter of quality.
Re: Zpdf: PDF text extraction in Zig
#38- First commit 3hours ago. - commit message: LLM-generated. - README: LLM-generated. I'm not convinced that projects vibe coded over the evening deserve the HN front page… Edit: and of course the author's blog is also full of AI slop… 2026 hasn't even started I already hate it.
Re: Zpdf: PDF text extraction in Zig
#39I built a PDF text extraction library in Zig that's significantly faster than MuPDF for text extraction workloads. ~41K pages/sec peak throughput. Key choices: memory-mapped I/O, SIMD string search, parallel page extraction, streaming output. Handles CID fonts, incremental updates, all common compression filters. ~5,000 lines, no dependencies, compiles in Why it's fast: - Memory-mapped file I/O (no read syscalls) - Z…
What's fast about mmap?
Re: Zpdf: PDF text extraction in Zig
#40Earlier quoted context omitted.
What's fast about mmap?
it allows the program to reference memory without having to manage it in the heap space. it would make the program faster in a memory managed language, otherwise it would reduce the memory footprint consumed by the program.