<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: N C</title>
    <description>The latest articles on DEV Community by N C (@n_c_9d57ca535480141520fcf).</description>
    <link>https://dev.to/n_c_9d57ca535480141520fcf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3831867%2F44167474-11c1-4ff4-b225-be6f58568ec4.png</url>
      <title>DEV Community: N C</title>
      <link>https://dev.to/n_c_9d57ca535480141520fcf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/n_c_9d57ca535480141520fcf"/>
    <language>en</language>
    <item>
      <title>fastpdf2png: PDF to PNG at 1,500 pages/s with SIMD and PDFium</title>
      <dc:creator>N C</dc:creator>
      <pubDate>Wed, 18 Mar 2026 17:09:31 +0000</pubDate>
      <link>https://dev.to/n_c_9d57ca535480141520fcf/fastpdf2png-pdf-to-png-at-1500-pagess-with-simd-and-pdfium-3eib</link>
      <guid>https://dev.to/n_c_9d57ca535480141520fcf/fastpdf2png-pdf-to-png-at-1500-pagess-with-simd-and-pdfium-3eib</guid>
      <description>&lt;p&gt;&lt;strong&gt;What My Project Does&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I was working on a document extraction pipeline and got frustrated with how slow PDF to PNG conversion was. PyMuPDF, MuPDF,&lt;br&gt;
  ImageMagick, none of them were fast enough when you're processing thousands of documents.&lt;/p&gt;

&lt;p&gt;So I wrote fastpdf2png. It uses PDFium (the PDF engine from Chrome) under the hood, with a custom PNG encoder that uses SIMD&lt;br&gt;
  instructions and a patched compression library. It also detects when a page is grayscale and outputs 8-bit PNGs automatically.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  pip install fastpdf2png

  import fastpdf2png
  images = fastpdf2png.to_images("doc.pdf", dpi=150, workers=4)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Target Audience&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anyone dealing with PDFs at scale. Data pipelines, ML preprocessing, document management, that kind of thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I benchmarked everything I could find at 150 DPI, single process. fastpdf2png does 323 pg/s, MuPDF does 37, PyMuPDF 30, and&lt;br&gt;
  ImageMagick 2.9. With 8 workers it gets to about 1,500 pg/s. Output files end up smaller too because of the grayscale detection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/nataell95/fastpdf2png" rel="noopener noreferrer"&gt;https://github.com/nataell95/fastpdf2png&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>datascience</category>
      <category>pdf</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
