<?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: PDF Dark</title>
    <description>The latest articles on DEV Community by PDF Dark (@pdfdark).</description>
    <link>https://dev.to/pdfdark</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%2F3997002%2F54f4f34f-d2a3-4bb1-bbb5-a3977912901d.png</url>
      <title>DEV Community: PDF Dark</title>
      <link>https://dev.to/pdfdark</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pdfdark"/>
    <language>en</language>
    <item>
      <title>What Western Devs Need to Know Before Visiting China in 2026: Alipay, WeChat Pay &amp; the Mobile Web</title>
      <dc:creator>PDF Dark</dc:creator>
      <pubDate>Tue, 23 Jun 2026 15:42:03 +0000</pubDate>
      <link>https://dev.to/pdfdark/what-western-devs-need-to-know-before-visiting-china-in-2026-alipay-wechat-pay-the-mobile-web-1bi0</link>
      <guid>https://dev.to/pdfdark/what-western-devs-need-to-know-before-visiting-china-in-2026-alipay-wechat-pay-the-mobile-web-1bi0</guid>
      <description>&lt;p&gt;If you write software for a living and you're considering a trip to China in 2026, the friction you'll hit is not what you expect. The Great Firewall is the headline, but it's rarely what trips up a first-time visitor. What actually breaks your week is the small stuff: a QR code at a noodle shop, a metro turnstile that won't take your foreign card, a hotel Wi-Fi that quietly drops every request to Google.&lt;/p&gt;

&lt;p&gt;This is a brief survival guide written from a developer's mindset: what's actually changed in 2026, what you can fix before you leave, and what you should just accept.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Visa-free entry now covers most Western devs
&lt;/h2&gt;

&lt;p&gt;As of late 2025, China extended its 30-day visa-free transit policy to passport holders from 38 countries, including the US, UK, Germany, France, Australia, the Netherlands, and most of the EU. If you're flying in for a vacation, a conference, or even a short remote-work stretch, you may not need to apply for a visa at all — you just need an onward ticket within 30 days.&lt;/p&gt;

&lt;p&gt;The catch: the rules per nationality drift quarterly, and the official guidance is scattered across embassy pages. I keep a more current breakdown here: &lt;a href="https://firsttripchina.com/" rel="noopener noreferrer"&gt;FirstTripChina visa-free guide&lt;/a&gt; — worth checking the week you book your ticket.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The payment problem is the real "API" you need to integrate
&lt;/h2&gt;

&lt;p&gt;China runs on two payment rails: Alipay and WeChat Pay. Cash is technically legal but vendors below the level of a 4-star hotel will look at you like you handed them a stone tablet. Foreign credit cards work at airports and big chains; they do not work at the dumpling place you actually want to eat at.&lt;/p&gt;

&lt;p&gt;The fix that exists in 2026 — and that did not exist three years ago — is "Tour Card" inside Alipay and "International" mode inside WeChat Pay. Both let you link a Visa/Mastercard issued outside China and pay via the same QR system locals use. Setup steps (roughly):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Alipay (App Store / Play Store, US/EU regions both work).&lt;/li&gt;
&lt;li&gt;Verify with passport + selfie (KYC takes about 3 minutes).&lt;/li&gt;
&lt;li&gt;Tap &lt;strong&gt;Tour Card&lt;/strong&gt; → add your foreign card → top up an in-app balance, OR enable real-time charges.&lt;/li&gt;
&lt;li&gt;Repeat the equivalent flow in WeChat → Me → Services → Wallet → International.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two tips that took me embarrassingly long to figure out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Top-ups under ¥200 (~$28) waive fees&lt;/strong&gt;; above that, you pay ~3%. Re-charge often instead of once.&lt;/li&gt;
&lt;li&gt;WeChat Pay's &lt;code&gt;International&lt;/code&gt; mode has a daily transaction cap that resets at midnight Beijing time, &lt;em&gt;not&lt;/em&gt; midnight local time. Plan accordingly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wrote up the full setup with screenshots: &lt;a href="https://firsttripchina.com/" rel="noopener noreferrer"&gt;Alipay &amp;amp; WeChat Pay setup for foreigners&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Your phone is a router, not just a phone
&lt;/h2&gt;

&lt;p&gt;If you're traveling from a country with a "free roaming in China" plan (T-Mobile US, Three UK, some EU carriers), the bandwidth is throttled but the &lt;strong&gt;route is unfiltered&lt;/strong&gt; — your traffic exits in Hong Kong or Singapore. Google, GitHub, Slack, your work VPN: all just work.&lt;/p&gt;

&lt;p&gt;If you're not on one of those plans, you have three options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Buy a physical or eSIM tourist plan&lt;/strong&gt; from China Unicom HK or 3HK — these route through Hong Kong, so still unfiltered. ~$25 for 20 GB / 30 days.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-install a paid VPN with a stealth protocol&lt;/strong&gt; (WireGuard over obfuscation works in mid-2026; pure OpenVPN is detected). Test it &lt;em&gt;before&lt;/em&gt; you land — VPN provider websites are blocked inside the wall, so you can't sign up after arrival.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do nothing&lt;/strong&gt; and accept that for one week, your Slack will live on Telegram, your Gmail on Outlook, and your Google Maps on Apple Maps. (Yes, Apple Maps works in China. It's surprisingly good. Baidu Maps is better.)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  4. High-speed rail beats everything else for inter-city
&lt;/h2&gt;

&lt;p&gt;The high-speed rail (HSR) network in 2026 is the single best argument for traveling in mainland China. Beijing → Shanghai (1,300 km / 800 mi) is 4h 18m at 350 km/h, costs ¥553 (~$77) in second class, and runs every 12 minutes. There is no airport security line, no boarding pass, no luggage check — you tap your passport at the gate and walk on.&lt;/p&gt;

&lt;p&gt;Book through &lt;strong&gt;Trip.com&lt;/strong&gt; or &lt;strong&gt;12306 English&lt;/strong&gt; in your Apple/Play store. The native 12306 app is more reliable but the English UI is rough. Buy your ticket the day before; popular Beijing-Shanghai trains do sell out on weekends.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. The three cities most worth your first week
&lt;/h2&gt;

&lt;p&gt;If this is your first trip and you have 7–10 days, the strongest itinerary I've seen:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Beijing (3 days)&lt;/strong&gt; — Forbidden City, Mutianyu Great Wall, 798 art district. The history is the point.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Xi'an (2 days)&lt;/strong&gt; — Terracotta Army, the Muslim Quarter night market. Worth the detour.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shanghai (3 days)&lt;/strong&gt; — Modern China. The Bund, Pudong skyline, plus the food scene most worth flying for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HSR connects all three in &amp;lt;6 hours each leg. Full city-by-city breakdown: &lt;a href="https://firsttripchina.com/" rel="noopener noreferrer"&gt;FirstTripChina city guides&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Short version
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Check visa-free eligibility before you book — for most Western passports in 2026, you don't need a visa for ≤30 days.&lt;/li&gt;
&lt;li&gt;Install Alipay + WeChat Pay &lt;em&gt;before&lt;/em&gt; you fly. Their KYC requires a phone number you can receive SMS on; do it from home.&lt;/li&gt;
&lt;li&gt;Get an HK-routed eSIM if your home carrier doesn't include China roaming.&lt;/li&gt;
&lt;li&gt;Beijing → Xi'an → Shanghai by HSR is the optimal first-trip loop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The country is friendlier to foreign travelers than its reputation suggests, but the friction is concentrated in the first 24 hours after you land. Front-load the prep, and the rest of the trip is a breeze.&lt;/p&gt;

</description>
      <category>travel</category>
      <category>lifestyle</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I built PDF Dark — convert any PDF to true dark mode, 100% in your browser</title>
      <dc:creator>PDF Dark</dc:creator>
      <pubDate>Mon, 22 Jun 2026 13:12:29 +0000</pubDate>
      <link>https://dev.to/pdfdark/i-built-pdf-dark-convert-any-pdf-to-true-dark-mode-100-in-your-browser-5985</link>
      <guid>https://dev.to/pdfdark/i-built-pdf-dark-convert-any-pdf-to-true-dark-mode-100-in-your-browser-5985</guid>
      <description>&lt;h2&gt;
  
  
  Why another PDF tool?
&lt;/h2&gt;

&lt;p&gt;I read a lot of PDFs at night — research papers, ebooks, technical manuals. Every PDF reader I tried had the same problem: their "dark mode" was just a viewer toggle. The moment I forwarded the PDF to my Kindle or iPad, the white background blasted me again.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;&lt;strong&gt;PDF Dark&lt;/strong&gt;&lt;/a&gt; — a tool that converts any PDF into a &lt;strong&gt;real dark-mode PDF file&lt;/strong&gt; you can download, share, and reread anywhere.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;100% browser-side conversion.&lt;/strong&gt; Your file never touches a server. Verifiable in DevTools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real dark output PDF&lt;/strong&gt;, not a viewer trick. Works on Kindle, iPad, Acrobat, anywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Saturation-aware algorithm&lt;/strong&gt; — photos and charts keep their original colors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free, MIT-licensed, no signup, no ads.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works under the hood
&lt;/h2&gt;

&lt;p&gt;The conversion runs entirely in the browser using &lt;strong&gt;PDF.js&lt;/strong&gt; to parse the original PDF page by page, then re-renders each page through a Canvas pipeline. The algorithm walks pixel data and inverts only low-saturation regions (text, line art, white background), while preserving high-saturation regions (photos, color charts, logos).&lt;/p&gt;

&lt;p&gt;The output is then re-encoded as a standard PDF using &lt;strong&gt;pdf-lib&lt;/strong&gt;. No server, no upload — your file never leaves your device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Website: &lt;a href="https://pdfdark.org" rel="noopener noreferrer"&gt;https://pdfdark.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub (MIT): &lt;a href="https://github.com/1436941541/pdf-dark" rel="noopener noreferrer"&gt;https://github.com/1436941541/pdf-dark&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback welcome
&lt;/h2&gt;

&lt;p&gt;This is an early version. PRs, bug reports, and feature requests are very welcome — especially edge cases (complex form PDFs, scanned PDFs with dense images, RTL languages). Drop a comment below or open an issue on GitHub.&lt;/p&gt;

&lt;p&gt;If you read PDFs at night, give it a try and let me know what breaks.&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
