<?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: Chandan Singh</title>
    <description>The latest articles on DEV Community by Chandan Singh (@chanblockdev).</description>
    <link>https://dev.to/chanblockdev</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4213173%2F5cef7010-2c9a-4348-8e01-eeeebf8bdf56.png</url>
      <title>DEV Community: Chandan Singh</title>
      <link>https://dev.to/chanblockdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chanblockdev"/>
    <language>en</language>
    <item>
      <title>Finding and erasing old page numbers in a PDF, in the browser</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Thu, 19 Nov 2026 13:25:41 +0000</pubDate>
      <link>https://dev.to/chanblockdev/finding-and-erasing-old-page-numbers-in-a-pdf-in-the-browser-3ae4</link>
      <guid>https://dev.to/chanblockdev/finding-and-erasing-old-page-numbers-in-a-pdf-in-the-browser-3ae4</guid>
      <description>&lt;p&gt;I build editpdf.tools, a set of PDF and image tools that run in the browser. This week I shipped two updates, both because friends ran into these problems and asked me for an easy fix. The one with the more interesting code is in the page number tool, so most of this post is about that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;You have a 100-page PDF with page numbers, and you insert 5 pages after page 50. Now pages 51 to 55 have no number, and every page after them is off by five. Stamping new numbers on top gives you two numbers on most pages.&lt;/p&gt;

&lt;p&gt;So the tool has to do four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;find the old numbers;&lt;/li&gt;
&lt;li&gt;be sure they really are page numbers;&lt;/li&gt;
&lt;li&gt;make them disappear without a visible box;&lt;/li&gt;
&lt;li&gt;do the same for scanned PDFs, without uploading the file.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Finding candidates in text PDFs
&lt;/h2&gt;

&lt;p&gt;pdf.js &lt;code&gt;getTextContent()&lt;/code&gt; gives text items with a transform matrix. I keep the items in the top and bottom 22% of the page as the reader sees it; pages with /Rotate go through the viewport first. Then I group the items into lines by baseline and test windows of up to six neighbouring items against these patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;12&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Page 12&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;12 of 40&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;12 / 40&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;- 12 -&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;roman numerals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One rule removed a lot of noise: a match must stand apart. It has to be the whole line, or be separated from the next word by a gap of more than about 1.2 times the text height. That rejects "see page 4" and headings like "Annex page 1".&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Proving it is a page number
&lt;/h2&gt;

&lt;p&gt;A footer can hold a year, a phone number, footnote markers or table rows. Pattern matching alone would erase all of them. The check that works is simple: a real page number goes up by one per page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// candidate c on page index c.page, value c.v&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;sameSequence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;                       &lt;span class="c1"&gt;// rises by one per page&lt;/span&gt;
  &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;band&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;band&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;                                   &lt;span class="c1"&gt;// same top/bottom band&lt;/span&gt;
  &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vy&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;     &lt;span class="c1"&gt;// same height on the page&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nx&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nx&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// same x, or mirrored&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A candidate is kept only if a page within eight pages has a matching one. The offset (v - page) is allowed to change between sections, and that is exactly what happens after inserting pages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pages 1 to 50 have offset +1;&lt;/li&gt;
&lt;li&gt;the old pages after the insert have offset -4;&lt;/li&gt;
&lt;li&gt;the inserted pages have no number at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A year stays the same on every page, so its offset changes from page to page and it never matches.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Scanned pages
&lt;/h2&gt;

&lt;p&gt;A page with almost no text layer is treated as a scan. Tesseract.js reads only the top and bottom strips, rendered about 1500 px wide. Block mode (PSM 6) reads a lone number better than sparse mode, so it goes first.&lt;/p&gt;

&lt;p&gt;OCR still misses sometimes: in one test it read a "5" as "b". The fix uses what we already know. If page 4 says 4 and page 6 says 6, then page 5 should say 5 in the same spot. The tool re-reads just that small area, with a digits-only fallback, and accepts the result only if it equals the expected value.&lt;/p&gt;

&lt;p&gt;When a scan is blurry or the numbers are handwritten, the tool says so plainly instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Erasing without a visible patch
&lt;/h2&gt;

&lt;p&gt;For each number, the tool:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;renders the area around it with pdf.js at 3x;&lt;/li&gt;
&lt;li&gt;takes the median colour on each side of the box, so a stray stroke does not count;&lt;/li&gt;
&lt;li&gt;drops any side that is clearly different from the others;&lt;/li&gt;
&lt;li&gt;fills the box with a bilinear blend of the remaining sides, plus a little noise on scans so the paper grain matches;&lt;/li&gt;
&lt;li&gt;embeds the patch as a PNG with pdf-lib at the exact position.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then the new numbers are drawn.&lt;/p&gt;

&lt;p&gt;The old number is hidden, not removed from the text layer, so copy or search can still find it. On screen and on paper you see only the new numbering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing
&lt;/h2&gt;

&lt;p&gt;I ran 21 PDFs through it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;pages inserted into a numbered file;&lt;/li&gt;
&lt;li&gt;"Page n of N" written as separate words;&lt;/li&gt;
&lt;li&gt;roman, then arabic numbering;&lt;/li&gt;
&lt;li&gt;a coloured footer band;&lt;/li&gt;
&lt;li&gt;a book layout with the numbers alternating sides;&lt;/li&gt;
&lt;li&gt;a Word document exported to PDF with LibreOffice;&lt;/li&gt;
&lt;li&gt;a LaTeX file;&lt;/li&gt;
&lt;li&gt;rotated pages;&lt;/li&gt;
&lt;li&gt;a 125-page file (2.7 s);&lt;/li&gt;
&lt;li&gt;scans that were clean, skewed, blurry or handwritten.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that I ran a pixel check that no ink was left in any old number box, and a diff check that nothing else on any page changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The other update: signing with a photo of your signature
&lt;/h2&gt;

&lt;p&gt;PDF Sign used to accept only a drawn signature. Now you can also upload a photo of your signature on paper. The paper is removed in three steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a local brightness map, so shadows do not leave grey patches;&lt;/li&gt;
&lt;li&gt;an automatic ink/paper threshold;&lt;/li&gt;
&lt;li&gt;a cleanup of small specks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The ink keeps its own colour. Each placed signature also keeps its own image, so one PDF can carry several different signatures.&lt;/p&gt;

&lt;p&gt;Both tools: &lt;a href="https://editpdf.tools/pdf-page-numbers?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=release_1119" rel="noopener noreferrer"&gt;Page Numbers&lt;/a&gt; and &lt;a href="https://editpdf.tools/pdf-sign?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=release_1119" rel="noopener noreferrer"&gt;PDF Sign&lt;/a&gt;. If you find a file where either one gets something wrong, I'd like to see it.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>pdf</category>
      <category>webdev</category>
      <category>ocr</category>
    </item>
    <item>
      <title>We built a Zapier integration for our Compress PDF API — test it via our public beta link!</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Sat, 14 Nov 2026 11:40:06 +0000</pubDate>
      <link>https://dev.to/chanblockdev/we-built-a-zapier-integration-for-our-compress-pdf-api-test-it-via-our-public-beta-link-3a6c</link>
      <guid>https://dev.to/chanblockdev/we-built-a-zapier-integration-for-our-compress-pdf-api-test-it-via-our-public-beta-link-3a6c</guid>
      <description>&lt;p&gt;While building &lt;strong&gt;editpdf.tools&lt;/strong&gt;, our 14 free tools &amp;amp; editpdf paid feature were designed to run 100% client-side in the browser with zero file uploads, except editpdf monthly paid plan. &lt;/p&gt;

&lt;p&gt;However, developers and ops teams kept asking for a way to shrink everyday PDFs (invoices, signed contracts, KYC forms) automatically inside backend pipelines and no-code workflows—especially when a 1.5 MB PDF needs to get under a strict 100 KB or 500 KB portal limit.&lt;/p&gt;

&lt;p&gt;So we shipped our &lt;strong&gt;Compress PDF REST API&lt;/strong&gt; (&lt;code&gt;https://editpdf.tools/compress-pdf-api&lt;/code&gt;), and this week we wrapped it into a native &lt;strong&gt;Zapier integration&lt;/strong&gt; (currently in Zapier’s review queue).&lt;/p&gt;

&lt;h3&gt;
  
  
  Try the Zapier Integration (Public Beta Invite)
&lt;/h3&gt;

&lt;p&gt;You can add the &lt;strong&gt;editpdf.tools&lt;/strong&gt; app directly to your Zapier account right now using our official beta invite link:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://zapier.com/developer/public-invite/249611/0b866a789583e38dfcfebdcd89c8a99c/" rel="noopener noreferrer"&gt;Accept Zapier Beta Invite&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How the API &amp;amp; Zapier Action work under the hood
&lt;/h3&gt;

&lt;p&gt;Unlike our browser tools, an API naturally receives the file over HTTPS. To keep our privacy standards intact:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your Zap (or &lt;code&gt;curl&lt;/code&gt; / Python / Node.js script) sends the PDF to our endpoint with your &lt;code&gt;X-API-Key&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can choose between &lt;strong&gt;Structure mode&lt;/strong&gt; (lossless stream/object compression, keeps text selectable) or &lt;strong&gt;Rasterize mode&lt;/strong&gt; (for scanned PDFs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Size Limits:&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Via Zapier Integration:&lt;/strong&gt; Up to &lt;strong&gt;2 MB per PDF&lt;/strong&gt; (ideal for invoices, receipts, IDs, offer letters, and application forms).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Via Direct REST API (&lt;code&gt;curl&lt;/code&gt; / Python / Node.js):&lt;/strong&gt; Up to &lt;strong&gt;10 MB per PDF&lt;/strong&gt; on the free tier.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The file is processed in an isolated container and returned immediately—&lt;strong&gt;never saved to permanent storage&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Quick &lt;code&gt;curl&lt;/code&gt; check (if you prefer code over Zapier):
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
curl -X POST [https://api.editpdf.tools/v1/compress](https://api.editpdf.tools/v1/compress) \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@invoice.pdf" \
  -o compressed.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>api</category>
      <category>pdf</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I Tested 18 Online PDF and Image Tools: 12 Uploaded My File</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Fri, 06 Nov 2026 09:40:52 +0000</pubDate>
      <link>https://dev.to/chanblockdev/i-tested-18-online-pdf-and-image-tools-12-uploaded-my-file-2hf</link>
      <guid>https://dev.to/chanblockdev/i-tested-18-online-pdf-and-image-tools-12-uploaded-my-file-2hf</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; I added the same test PDF and the same test photo to 18 popular free online PDF and image tools and logged every network request. 12 of the 18 sent the file to a server. All 8 PDF tools I could measure uploaded it, and 10 of the 12 uploads started the moment the file was chosen, before I pressed any button. The full table, method and raw CSV are in the &lt;a href="https://editpdf.tools/research/do-online-pdf-tools-upload-your-files" rel="noopener noreferrer"&gt;upload test write-up on editpdf.tools&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why did I run this test?
&lt;/h2&gt;

&lt;p&gt;I build &lt;a href="https://editpdf.tools/" rel="noopener noreferrer"&gt;editpdf.tools&lt;/a&gt;, a set of PDF and image tools that run in the browser. People often ask "does this site upload my file?", and most tool pages do not say it clearly. So I measured it instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I test it?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Same files everywhere:&lt;/strong&gt; a one-page PDF of 150,608 bytes and a 2400 x 1800 px JPG of 326,154 bytes. Both were generated for the test, with no personal data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Same starting point:&lt;/strong&gt; a fresh tab in a Chromium-based browser on Windows, not logged in, cookie banners left unanswered.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripted:&lt;/strong&gt; a small script put the file into each tool's own file picker and logged every &lt;code&gt;XHR&lt;/code&gt;, &lt;code&gt;fetch&lt;/code&gt; and &lt;code&gt;sendBeacon&lt;/code&gt; call with its URL and body size. I confirmed each upload a second time with the browser's &lt;code&gt;Resource Timing&lt;/code&gt; list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public address check:&lt;/strong&gt; where the result had its own URL, I opened it in a fresh tab with no cookies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core of the logger is a few lines that wrap the browser's request functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;byteLength&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;origFetch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fetch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)]);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;origFetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What did I find?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finding&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tools that sent the test file to a server&lt;/td&gt;
&lt;td&gt;12 of 18&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PDF tools (that I could measure) that uploaded&lt;/td&gt;
&lt;td&gt;8 of 8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image tools that uploaded&lt;/td&gt;
&lt;td&gt;4 of 10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uploads that started when the file was chosen&lt;/td&gt;
&lt;td&gt;10 of 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Results reachable at a public address with no login&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two public addresses both returned "page not found" when I checked again about 24 hours later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is uploading bad?
&lt;/h2&gt;

&lt;p&gt;Not by itself. Many services delete files after a set time, and the write-up quotes each tool's own deletion policy next to its result, from 20 minutes to 48 hours. The point is simpler: you should know where your file goes before you add an ID card, a bank statement or a contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did my own tools do?
&lt;/h2&gt;

&lt;p&gt;I ran my own &lt;a href="https://editpdf.tools/compress-pdf" rel="noopener noreferrer"&gt;Compress PDF&lt;/a&gt; and &lt;a href="https://editpdf.tools/compress-image-to-kb" rel="noopener noreferrer"&gt;Compress Image to KB&lt;/a&gt; the same way, as a control. After the file was added, no request was larger than 1 KB, only analytics and ad-quality pings. One honest note: Edit PDF, my paid tool, does upload the file for processing, and its page says so.&lt;/p&gt;

&lt;h2&gt;
  
  
  How can you check any tool yourself?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open the tool and press F12 (or right-click and choose Inspect).&lt;/li&gt;
&lt;li&gt;Open the Network tab and clear the list.&lt;/li&gt;
&lt;li&gt;Add a small test file you do not mind sharing.&lt;/li&gt;
&lt;li&gt;Look for a new POST or PUT request close to your file's size. If you see one, the file left your device.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What are the limits?
&lt;/h2&gt;

&lt;p&gt;It is one browser on one day (4 November 2026). Any site can change how it works after that. The test shows that a file was sent and where, not what happens on the server afterwards.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Do online PDF tools upload your files?&lt;/strong&gt; Most of the ones I tested do. All 8 measurable PDF tools uploaded the test file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which image tools kept the file in the browser?&lt;/strong&gt; 6 of the 10 image tools processed it locally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I reuse the data?&lt;/strong&gt; Yes. The raw CSV is linked on the &lt;a href="https://editpdf.tools/research/do-online-pdf-tools-upload-your-files" rel="noopener noreferrer"&gt;research page&lt;/a&gt; under CC BY 4.0.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Will you test again?&lt;/strong&gt; Yes, every six months, with the new date on the same page.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>security</category>
    </item>
    <item>
      <title>What I learned publishing my first Chrome extension in 2026</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Tue, 03 Nov 2026 13:47:39 +0000</pubDate>
      <link>https://dev.to/chanblockdev/what-i-learned-publishing-my-first-chrome-extension-in-2026-published-1cfe</link>
      <guid>https://dev.to/chanblockdev/what-i-learned-publishing-my-first-chrome-extension-in-2026-published-1cfe</guid>
      <description>&lt;p&gt;On the morning of 2 November 2026 I submitted a small Chrome extension. By the evening it was live. The review finished the same day. Here is what I learned along the way, written for anyone shipping their first one.&lt;/p&gt;

&lt;p&gt;The extension is &lt;a href="https://chromewebstore.google.com/detail/compress-image-to-kb-by-e/komomnoldmjjidnobbmomnpmnhjelfdp" rel="noopener noreferrer"&gt;Compress Image to KB by editpdf.tools&lt;/a&gt;. You pick a JPG, PNG or WebP, type a target size in KB, and download a JPG that fits. It exists because online forms in India and elsewhere ask for photos under a fixed size, and people end up uploading ID photos to random sites to shrink them. I built it as a small companion to &lt;a href="https://editpdf.tools/" rel="noopener noreferrer"&gt;editpdf.tools&lt;/a&gt;, a set of free PDF and image tools that run in the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. You may not need a service worker
&lt;/h2&gt;

&lt;p&gt;Most Manifest V3 tutorials start with a background service worker. My extension doesn't have one.&lt;/p&gt;

&lt;p&gt;Everything happens in the popup: a file input, a number field, a button, a canvas. The user clicks the icon, the popup opens, the work happens there, and the popup closes. No events to listen for when the popup is closed, no messages between scripts, nothing to keep alive.&lt;/p&gt;

&lt;p&gt;If your extension only does something when the user clicks it, try a popup only design first. Less code, fewer moving parts, fewer things to explain to the reviewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Zero permissions is a feature
&lt;/h2&gt;

&lt;p&gt;My manifest declares no permissions and no host permissions. The file comes from a normal file input, the canvas does the compression, and the result is saved with a normal download link. No &lt;code&gt;downloads&lt;/code&gt; permission needed, no &lt;code&gt;activeTab&lt;/code&gt;, no &lt;code&gt;storage&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There is no network code either. I tested it and saw zero external requests.&lt;/p&gt;

&lt;p&gt;This paid off three ways. Users see no permission warning at install. The privacy section of the listing was short and easy to fill in honestly. And there was nothing for a reviewer to question.&lt;/p&gt;

&lt;p&gt;Before adding a permission, ask whether a plain web API inside the popup can do the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Write the single purpose like you mean it
&lt;/h2&gt;

&lt;p&gt;The Chrome Web Store asks for a single purpose description. This isn't a formality. Your extension should do one clear thing, and the description should say what that is in plain words.&lt;/p&gt;

&lt;p&gt;Mine was easy because the extension really does one thing: compress a photo to a target size in KB. If you find yourself writing "and also" in that field, consider splitting the extension or cutting the extra feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The privacy tab needs real answers
&lt;/h2&gt;

&lt;p&gt;The privacy tab asks you to justify each permission you request and to declare what user data you collect. For me, the answers were none and none. The data usage section was a row of "no".&lt;/p&gt;

&lt;p&gt;The point is that every answer must match what the code actually does. If you use analytics, an API or remote code, declare it. If you don't, you can say so with confidence, which is a nice position to be in.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Trader verification for the EU
&lt;/h2&gt;

&lt;p&gt;The dashboard asks you to declare whether you are a trader under EU rules. Read it carefully before answering, because it decides what contact details may be shown on your listing to EU users. Don't leave it for the last minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Screenshots: 1280x800
&lt;/h2&gt;

&lt;p&gt;Store screenshots need to be 1280x800 (640x400 also works). I made mine show the actual flow: the popup, the size presets, the result. Plan them early, since a small popup has to read clearly inside a large frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. New publishers start with a 2 extension limit
&lt;/h2&gt;

&lt;p&gt;As a new publisher my limit was 2 extensions. You can request a higher limit from the dashboard, but it still changes how you plan. If you have a list of ideas, pick the one you'd stand behind most and spend your first slot on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Watch the review status, don't refresh it all day
&lt;/h2&gt;

&lt;p&gt;After you submit, the item moves through review statuses in the dashboard. Mine was submitted in the morning and published the same evening. I can't promise yours will be that fast, but a small, single purpose, zero permission extension gives a reviewer very little to dig into.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the extension does under the hood (short version)
&lt;/h2&gt;

&lt;p&gt;It keeps full dimensions and searches for the highest JPG quality that fits, using &lt;code&gt;canvas.toBlob&lt;/code&gt; with a quality value. If that isn't enough, it shrinks dimensions step by step until the file fits. A JPG already under the target is returned untouched. PNG transparency becomes white. In my test a 4.6 MB photo came out at 49.8 KB for a 50 KB target.&lt;/p&gt;

&lt;p&gt;Honest limits: JPG output only, and no HEIC inside the extension. iPhone users can use the web version, &lt;a href="https://editpdf.tools/compress-image-to-kb" rel="noopener noreferrer"&gt;Compress Image to KB on editpdf.tools&lt;/a&gt;, which also opens HEIC photos.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it, break it, tell me
&lt;/h2&gt;

&lt;p&gt;You can install it from the &lt;a href="https://chromewebstore.google.com/detail/compress-image-to-kb-by-e/komomnoldmjjidnobbmomnpmnhjelfdp" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;. If you try it, an honest review there helps a lot.&lt;/p&gt;

&lt;p&gt;If you've shipped an extension recently, what surprised you? I'd like to compare notes in the comments.&lt;/p&gt;

</description>
      <category>chromeextension</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I Shipped HEIC Support. Then My iPhone Found 3 More Bugs.</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Sun, 01 Nov 2026 18:43:09 +0000</pubDate>
      <link>https://dev.to/chanblockdev/i-shipped-heic-support-then-my-iphone-found-3-more-bugs-457h</link>
      <guid>https://dev.to/chanblockdev/i-shipped-heic-support-then-my-iphone-found-3-more-bugs-457h</guid>
      <description>&lt;p&gt;I build editpdf.tools, free PDF and image tools that run in the browser. Users asked for iPhone HEIC support, so I added it. Then I tested everything on my own iPhone, and the phone had opinions.&lt;/p&gt;

&lt;p&gt;Bug 1: "WebP" files the size of PNGs&lt;/p&gt;

&lt;p&gt;I converted a photo to WebP on the iPhone. The file was as big as a PNG. Because it was a PNG. Safari does not support WebP in canvas.toBlob(), and instead of throwing, it hands back image/png. My code trusted the requested type and named it .webp.&lt;/p&gt;

&lt;p&gt;Lesson: always check blob.type after toBlob(). I now fall back to a small browser WebP encoder that loads only when the native result is wrong.&lt;/p&gt;

&lt;p&gt;Bug 2: rotated pages in the PDF&lt;/p&gt;

&lt;p&gt;A form photo came out sideways in Image to PDF. The thumbnail looked fine. The PDF did not. Phone cameras save sideways pixels plus an EXIF orientation tag; browsers apply the tag, PDFs do not. I was embedding raw JPEG bytes.&lt;/p&gt;

&lt;p&gt;Lesson: if you embed images into PDFs, read the EXIF orientation yourself and rotate on the page. It took about 30 lines and no second encode.&lt;/p&gt;

&lt;p&gt;Bug 3: "JPG or PNG" while HEIC worked&lt;/p&gt;

&lt;p&gt;On iPhone, HEIC already "worked" in Image to PDF before I touched it, because iOS converts HEIC to JPEG when a site only accepts JPG and PNG. On Windows the same file simply could not be selected. Two devices, two different truths. I added real HEIC and WebP support so the page text and the behaviour match everywhere.&lt;/p&gt;

&lt;p&gt;What I would tell myself last week&lt;/p&gt;

&lt;p&gt;Test on the phone your users have. Desktop dev tools are not enough.&lt;br&gt;
Silent fallbacks are worse than errors. Check what you actually got.&lt;br&gt;
Your support inbox is the best roadmap you have.&lt;/p&gt;

&lt;p&gt;Everything still runs on the user's device, so photos are not uploaded.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://editpdf.tools/image-to-pdf" rel="noopener noreferrer"&gt;Image to PDF&lt;/a&gt; and &lt;a href="https://editpdf.tools/image-format-convert" rel="noopener noreferrer"&gt;Image Format Convert&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Found another edge case? Tell me in the comments, through &lt;a href="https://editpdf.tools/contact" rel="noopener noreferrer"&gt;contact page&lt;/a&gt;, or at &lt;a href="mailto:support@editpdf.tools"&gt;support@editpdf.tools&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>ios</category>
      <category>debugging</category>
    </item>
    <item>
      <title>I built PDF tools that never upload your files. Here is what I learned</title>
      <dc:creator>Chandan Singh</dc:creator>
      <pubDate>Wed, 28 Oct 2026 13:44:40 +0000</pubDate>
      <link>https://dev.to/chanblockdev/i-built-pdf-tools-that-never-upload-your-files-here-is-what-i-learned-4ko3</link>
      <guid>https://dev.to/chanblockdev/i-built-pdf-tools-that-never-upload-your-files-here-is-what-i-learned-4ko3</guid>
      <description>&lt;p&gt;A few weeks ago we launched &lt;a href="https://editpdf.tools" rel="noopener noreferrer"&gt;editpdf.tools&lt;/a&gt;, a set of free PDF and image tools that do their work inside the browser instead of on a server. I want to share what the product looks like now and three lessons that changed how we build it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;15 tools in total. The 14 free ones run on the user's device, with &lt;strong&gt;no signup and no watermark&lt;/strong&gt;: merge, split, compress, sign and fill PDFs, add page numbers or a watermark, image to PDF, image compress and resize to an exact KB size, format conversion, ID card front and back on one page, and a video frame extractor.&lt;/p&gt;

&lt;p&gt;The one exception is &lt;strong&gt;Edit PDF&lt;/strong&gt;, a paid tool that changes existing text inside a PDF. That kind of editing needs a server, so that file is uploaded for processing and not stored. We label it clearly instead of pretending everything is local.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 1: The real problem is often the steps around the tool
&lt;/h2&gt;

&lt;p&gt;When I looked at how people around me sign a PDF, signing was not the hard part. The usual route was: sign on paper, take a photo, open one website to remove the photo background, then upload the PDF to another website to place the signature. &lt;strong&gt;Three sites, two uploads&lt;/strong&gt;, and a signature that still looked pasted on.&lt;/p&gt;

&lt;p&gt;So our &lt;a href="https://editpdf.tools/pdf-sign" rel="noopener noreferrer"&gt;PDF Sign tool&lt;/a&gt; lets you draw the signature in the browser on a transparent background and place it on the page. No photo, no background remover, no upload. The fix was not a better signing algorithm. &lt;strong&gt;It was removing the detour.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: Build for the moment people are stuck
&lt;/h2&gt;

&lt;p&gt;Almost everyone has been here: you are at a bank or an office counter, they ask for a copy of both sides of your ID, and you don't have one. People end up looking for a photocopy shop and handing their ID to a stranger.&lt;/p&gt;

&lt;p&gt;That became our That became our &lt;a href="https://editpdf.tools/id-front-back-to-pdf" rel="noopener noreferrer"&gt;ID Front and Back to PDF&lt;/a&gt;. On a phone you tap Take photo for each side, crop, choose the layout, and get a print-ready PDF in about a minute. It is not a complex tool. It just matches a real moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: Privacy needs proof, not a promise
&lt;/h2&gt;

&lt;p&gt;"Your files are safe with us" is on almost every PDF site. It means nothing on its own. So instead of only writing it, we recorded a short video that opens the browser's &lt;strong&gt;Network tab&lt;/strong&gt; while using the tools and shows that no file is sent. It is on our &lt;a href="https://editpdf.tools/security#proof" rel="noopener noreferrer"&gt;security page&lt;/a&gt;, and anyone can repeat the test on any site.&lt;/p&gt;

&lt;p&gt;Being honest about the one tool that does upload made the rest of the claim more believable, not less.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would love feedback on
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Which PDF or image task do you still do with an upload-based tool because nothing else works?&lt;/li&gt;
&lt;li&gt;If you test the Network tab yourself, does anything look unexpected?&lt;/li&gt;
&lt;li&gt;What would make you trust a new tool with a sensitive document?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading. I will reply to every comment.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Chandan,&lt;br&gt;
 editpdf.tools&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>security</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
