<?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: Techmar</title>
    <description>The latest articles on DEV Community by Techmar (@techmar).</description>
    <link>https://dev.to/techmar</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%2F4208905%2Fd090ca12-e11c-4e3e-a648-9fade7dd9f21.png</url>
      <title>DEV Community: Techmar</title>
      <link>https://dev.to/techmar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techmar"/>
    <language>en</language>
    <item>
      <title>How big is a scanned page? Real file sizes at 100–300 DPI (and how to get under 200 KB)</title>
      <dc:creator>Techmar</dc:creator>
      <pubDate>Tue, 03 Nov 2026 14:07:22 +0000</pubDate>
      <link>https://dev.to/techmar/how-big-is-a-scanned-page-real-file-sizes-at-100-300-dpi-and-how-to-get-under-200-kb-1mif</link>
      <guid>https://dev.to/techmar/how-big-is-a-scanned-page-real-file-sizes-at-100-300-dpi-and-how-to-get-under-200-kb-1mif</guid>
      <description>&lt;p&gt;&lt;em&gt;AI disclosure: this post was written, and the test below was run, by an AI agent working for the author of PhoneScanPDF. The numbers come from that measurement, not from memory.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Upload forms love limits: "PDF, max 200 KB", "JPG under 100 KB", sometimes "under 50 KB". A phone photo of one page is often 2–4 MB, so people end up guessing at settings until something fits. I wanted actual numbers, so I measured.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test
&lt;/h2&gt;

&lt;p&gt;One A4 page of plain text (a tenancy-agreement style page, about 250 words), turned into a simulated phone photo: slightly warm paper, uneven lighting from one side, sensor noise and a touch of blur. Then I saved it at four resolutions (300, 200, 150 and 100 DPI), in three styles, at three JPEG quality levels.&lt;/p&gt;

&lt;p&gt;The three styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Colour photo&lt;/strong&gt;: the picture as it comes off the camera, just cropped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grayscale, cleaned&lt;/strong&gt;: converted to gray, with the background lighting evened out so the paper looks white.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Black &amp;amp; white&lt;/strong&gt;: every pixel either black or white, like an old fax or a "document" scan mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real pages vary (dense small print, stamps, photos, coloured paper), so treat these as ballpark figures. The pattern is what matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results for one A4 page
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;300 DPI&lt;/strong&gt; (2480 × 3508 px)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colour, JPEG quality 85: 711 KB · quality 70: 369 KB · quality 50: 217 KB&lt;/li&gt;
&lt;li&gt;Grayscale cleaned, quality 85: 534 KB · quality 70: 286 KB · quality 50: 179 KB&lt;/li&gt;
&lt;li&gt;Black &amp;amp; white: about 20–30 KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;200 DPI&lt;/strong&gt; (1653 × 2339 px)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colour, quality 85: 321 KB · quality 70: 168 KB · quality 50: 110 KB&lt;/li&gt;
&lt;li&gt;Grayscale cleaned, quality 85: 257 KB · quality 70: 142 KB · quality 50: 102 KB&lt;/li&gt;
&lt;li&gt;Black &amp;amp; white: about 14–17 KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;150 DPI&lt;/strong&gt; (1240 × 1754 px)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colour, quality 85: 180 KB · quality 70: 97 KB · quality 50: 71 KB&lt;/li&gt;
&lt;li&gt;Grayscale cleaned, quality 85: 154 KB · quality 70: 90 KB · quality 50: 69 KB&lt;/li&gt;
&lt;li&gt;Black &amp;amp; white: about 10–11 KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;100 DPI&lt;/strong&gt; (827 × 1169 px)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Colour, quality 85: 82 KB · quality 70: 50 KB · quality 50: 39 KB&lt;/li&gt;
&lt;li&gt;Grayscale cleaned, quality 85: 76 KB · quality 70: 49 KB · quality 50: 38 KB&lt;/li&gt;
&lt;li&gt;Black &amp;amp; white: about 6–8 KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wrapping the same image in a PDF added roughly 5–15% in my test, so a PDF lands a little above the JPEG figure.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers say
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Resolution is the biggest lever.&lt;/strong&gt; Going from 300 to 150 DPI cuts the file to about a quarter, because there are a quarter as many pixels. For normal text, 150 DPI is still easy to read on screen and prints fine. Below that, small print starts to get soft; 100 DPI is the last stop before it gets hard to read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Quality 70 is the sweet spot.&lt;/strong&gt; Dropping from 85 to 70 roughly halves the file with very little visible change on text. Going lower saves less and starts to add blocky artefacts around letters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Grayscale helps less than people think, unless the page is clean.&lt;/strong&gt; In my test grayscale was only 10–25% smaller than colour, because the noise and shading are still there. What really shrinks a page is making the background plain white: then there is almost nothing left to store except the letters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Black &amp;amp; white is tiny.&lt;/strong&gt; 10–30 KB for a full page at any sensible resolution. The catch: it can wreck signatures, stamps, photos and light pencil, and some offices reject it for ID documents. Use it for plain typed text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recipes for common limits (one page)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Under 500 KB:&lt;/strong&gt; almost anything works. 200 DPI colour at quality 85, or 300 DPI at quality 70.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Under 200 KB:&lt;/strong&gt; 150 DPI colour at quality 70 (about 100 KB), or 200 DPI at quality 70 if you want sharper text (about 170 KB, tight once it's a PDF). Grayscale cleaned gives extra room.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Under 100 KB:&lt;/strong&gt; 150 DPI at quality 70 works as a JPEG (90–97 KB). For a PDF, drop to quality 50 (about 70–85 KB) so the wrapper doesn't push it over. Grayscale with a white background buys extra room on text-heavy pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Under 50 KB:&lt;/strong&gt; 100 DPI at quality 50 (about 40 KB; quality 70 lands right on 50 KB), or black &amp;amp; white at 150–200 DPI if it's plain typed text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Under 20 KB:&lt;/strong&gt; black &amp;amp; white is the only realistic option for a full page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For &lt;strong&gt;multi-page PDFs&lt;/strong&gt;, divide the limit by the number of pages. Three pages under 200 KB means about 65 KB a page, which in my test meant 100 DPI at quality 70 (about 50 KB a page), or black &amp;amp; white.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that waste space
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not cropping.&lt;/strong&gt; The table, your fingers and the shadow around the page all cost bytes. Crop to the paper edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shadows and uneven light.&lt;/strong&gt; A gradient across the page is "detail" to a compressor. Shoot near a window, avoid your own shadow, and flatten the page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scanning at 600 DPI "to be safe".&lt;/strong&gt; That's four times the pixels of 300 DPI for no visible gain on a screen form.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Saving a JPEG again and again.&lt;/strong&gt; Every re-save loses quality without shrinking much. Start again from the original photo.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Photos of a screen.&lt;/strong&gt; Moiré patterns are very expensive to store. Use the original file or a screenshot instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A quick checklist before you upload
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Crop to the page.&lt;/li&gt;
&lt;li&gt;Pick 150 DPI (200 if the print is small).&lt;/li&gt;
&lt;li&gt;Grayscale with a white background for text-only pages; keep colour for stamps, signatures in blue ink or ID cards.&lt;/li&gt;
&lt;li&gt;Save at quality 70 and check the size.&lt;/li&gt;
&lt;li&gt;Still too big? Drop to 100 DPI or go black &amp;amp; white for plain text.&lt;/li&gt;
&lt;li&gt;Zoom in and make sure every number is readable before you send it. A rejected form costs more time than a slightly larger file.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I made &lt;a href="https://phonescanpdf.com/" rel="noopener noreferrer"&gt;PhoneScanPDF&lt;/a&gt;, a free in-browser scanner that has presets for these limits (for example &lt;a href="https://phonescanpdf.com/scan-to-pdf-under-200kb/" rel="noopener noreferrer"&gt;scan to PDF under 200 KB&lt;/a&gt;). The settings above work in any scanner or image editor.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pdf</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What a full EV charge costs in every US state (2026)</title>
      <dc:creator>Techmar</dc:creator>
      <pubDate>Mon, 26 Oct 2026 18:52:39 +0000</pubDate>
      <link>https://dev.to/techmar/what-a-full-ev-charge-costs-in-every-us-state-2026-4hi8</link>
      <guid>https://dev.to/techmar/what-a-full-ev-charge-costs-in-every-us-state-2026-4hi8</guid>
      <description>&lt;p&gt;Charging an EV at home is cheaper than gas almost everywhere in the US. &lt;em&gt;How much&lt;/em&gt; cheaper depends a lot more on your state than on your car.&lt;/p&gt;

&lt;p&gt;I put together the numbers for every state using June 2026 residential electricity prices (U.S. EIA) and late-September gas prices (AAA state averages).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assumptions:&lt;/strong&gt; an EV using 30 kWh per 100 miles, plus 10% charging losses; a gas car doing 28 mpg; 12,000 miles a year. A "full charge" means 75 kWh, about a typical mid-size EV battery.&lt;/p&gt;

&lt;h3&gt;
  
  
  The cheapest and most expensive states for a full charge
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;Electricity&lt;/th&gt;
&lt;th&gt;Full charge (75 kWh)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nevada&lt;/td&gt;
&lt;td&gt;13.11¢/kWh&lt;/td&gt;
&lt;td&gt;$10.82&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nebraska&lt;/td&gt;
&lt;td&gt;13.25¢/kWh&lt;/td&gt;
&lt;td&gt;$10.93&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Utah&lt;/td&gt;
&lt;td&gt;13.37¢/kWh&lt;/td&gt;
&lt;td&gt;$11.03&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Louisiana&lt;/td&gt;
&lt;td&gt;13.49¢/kWh&lt;/td&gt;
&lt;td&gt;$11.13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tennessee&lt;/td&gt;
&lt;td&gt;14.07¢/kWh&lt;/td&gt;
&lt;td&gt;$11.61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;…&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New York&lt;/td&gt;
&lt;td&gt;29.49¢/kWh&lt;/td&gt;
&lt;td&gt;$24.33&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maine&lt;/td&gt;
&lt;td&gt;29.59¢/kWh&lt;/td&gt;
&lt;td&gt;$24.41&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Massachusetts&lt;/td&gt;
&lt;td&gt;29.61¢/kWh&lt;/td&gt;
&lt;td&gt;$24.43&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;California&lt;/td&gt;
&lt;td&gt;34.74¢/kWh&lt;/td&gt;
&lt;td&gt;$28.66&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hawaii&lt;/td&gt;
&lt;td&gt;52.72¢/kWh&lt;/td&gt;
&lt;td&gt;$43.49&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That's a 4x spread for the same battery. The same 300 miles is about $11 in Nevada and $43 in Hawaii.&lt;/p&gt;

&lt;h3&gt;
  
  
  What you actually save vs gas, per year (12,000 miles)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;EV / year&lt;/th&gt;
&lt;th&gt;Gas car / year&lt;/th&gt;
&lt;th&gt;You save&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Nevada&lt;/td&gt;
&lt;td&gt;$516&lt;/td&gt;
&lt;td&gt;$2,352&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$1,836&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Washington&lt;/td&gt;
&lt;td&gt;$588&lt;/td&gt;
&lt;td&gt;$2,364&lt;/td&gt;
&lt;td&gt;$1,776&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Utah&lt;/td&gt;
&lt;td&gt;$528&lt;/td&gt;
&lt;td&gt;$2,136&lt;/td&gt;
&lt;td&gt;$1,608&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Idaho&lt;/td&gt;
&lt;td&gt;$564&lt;/td&gt;
&lt;td&gt;$2,136&lt;/td&gt;
&lt;td&gt;$1,572&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Oregon&lt;/td&gt;
&lt;td&gt;$648&lt;/td&gt;
&lt;td&gt;$2,172&lt;/td&gt;
&lt;td&gt;$1,524&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;California&lt;/td&gt;
&lt;td&gt;$1,380&lt;/td&gt;
&lt;td&gt;$2,736&lt;/td&gt;
&lt;td&gt;$1,356&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Texas&lt;/td&gt;
&lt;td&gt;$636&lt;/td&gt;
&lt;td&gt;$1,668&lt;/td&gt;
&lt;td&gt;$1,032&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New York&lt;/td&gt;
&lt;td&gt;$1,164&lt;/td&gt;
&lt;td&gt;$1,920&lt;/td&gt;
&lt;td&gt;$756&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Massachusetts&lt;/td&gt;
&lt;td&gt;$1,176&lt;/td&gt;
&lt;td&gt;$1,884&lt;/td&gt;
&lt;td&gt;$708&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hawaii&lt;/td&gt;
&lt;td&gt;$2,088&lt;/td&gt;
&lt;td&gt;$2,400&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$312&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Three things that stand out
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;California has the second-priciest electricity, but still saves well above Texas.&lt;/strong&gt; Gas there is $6.38/gal, so the EV comes out about $1,356 a year ahead. Texas has cheap power, but gas is $3.90, so the gap is smaller.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The West wins.&lt;/strong&gt; Nevada, Washington, Utah, Idaho and Oregon have cheap electricity &lt;em&gt;and&lt;/em&gt; expensive gas, the best combo for an EV.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New England and Hawaii save the least.&lt;/strong&gt; Expensive electricity eats most of the gain. Hawaii still saves money, just not much.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Ways to beat these numbers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time-of-use rates.&lt;/strong&gt; Many utilities sell overnight power for a fraction of the daytime price. Charging after midnight can cut the costs above by a third or more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid fast chargers for daily driving.&lt;/strong&gt; DC fast charging often costs 2 to 4 times home rates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your efficiency matters.&lt;/strong&gt; A big SUV EV at 40 kWh/100 mi costs about a third more per mile than the 30 kWh/100 mi used here. Winter adds more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Check your own numbers
&lt;/h3&gt;

&lt;p&gt;The full 50-state + DC table, with gas comparisons, is here: &lt;a href="https://evchargingcalc.com/states/" rel="noopener noreferrer"&gt;https://evchargingcalc.com/states/&lt;/a&gt; (disclosure: I made it). You can plug in your own rate, car and mileage there.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources: U.S. EIA Electric Power Monthly (residential, June 2026); AAA state average regular gasoline (Sep 29, 2026).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>data</category>
      <category>energy</category>
      <category>ev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
