OnlineFreeTools.org
  • Home
  • Tools
    Health & body →
    BMI Calculator — How to Calculate Body Mass IndexBMR & TDEE Calculator — How to Calculate Daily CaloriesBody Fat Calculator — How to Estimate Body Fat PercentageHeart Rate Zone CalculatorIdeal Weight Calculator — How to Estimate Ideal Body WeightMacro Calculator — Calories to Protein Carb Fat GramsOne-Rep Max Calculator (Epley)Pace Calculator — min/km and Speed
    Personal money →
    CAGR Calculator — How to Calculate Compound Annual Growth RateCompound Interest Calculator — How to Calculate Future ValueDebt Payoff Calculator — Months to Clear a BalanceDiscount Calculator — How to Calculate Sale PriceEMI Calculator — How to Calculate Loan PaymentsInflation Calculator — Future Purchasing PowerPercentage Change Calculator — From Old Value to NewPresent Value Calculator — PV and FV ModesRule of 72 Calculator — Years to DoubleSalary to Hourly Calculator — How to Convert Pay RatesTip Calculator — Tip Amount and SplitVAT / GST Calculator — Add or Extract Tax
    Business finance →
    Create a budget spreadsheetCreate an Excel timesheetCreate an invoice spreadsheetBreak-Even Calculator — How to Calculate Break-Even PointContribution Margin Calculator — Price Minus Variable CostGross Margin Calculator — How to Calculate Gross MarginIRR Calculator — Internal Rate of ReturnHow to Calculate Marginal Revenue — MR Calculator (ΔTR / ΔQ)Markup Calculator — How to Calculate Markup PercentageHow to Calculate NPV — Net Present Value CalculatorPayback Period Calculator — Years to Recover InvestmentProfit Margin Calculator — Net or Operating MarginROI Calculator — How to Calculate Return on Investment
    Math & stats →
    Confidence Interval Calculator — How to Calculate a CIExponent Calculator — How to Calculate PowersGPA Calculator — How to Calculate Weighted GPALogarithm Calculator — How to Calculate LogsMean Calculator — Average of a Number ListMedian and Mode CalculatorP-Value Calculator — How to Calculate a P-ValuePermutation and Combination CalculatorQuadratic Equation Solver — Roots and DiscriminantSample Size Calculator — How to Estimate Required nScientific Notation Calculator — How to Convert Scientific NotationSignificant Figures Calculator — How to Count and Round Sig FigsStandard Deviation Calculator — How to Calculate SD and VarianceZ-Score Calculator — How to Calculate a Standard Score
    Geometry & measure →
    Aspect Ratio Calculator — How to Calculate and Scale RatiosCircle Calculator — Area and CircumferenceGradient Calculator — Multivariable ∇f (Partial Derivatives)Pythagorean Theorem Calculator — How to Find a Missing SideSlope Calculator — How to Calculate Slope Between Two PointsTriangle Area CalculatorVolume Calculator — Box and SphereUnit Converter — Length / Mass / Temperature / Area / Volume / Speed
    Science & physics →
    Acceleration Calculator — Change in VelocityDensity Calculator — Mass over VolumeOhm’s Law Calculator — Resistance and PowerVelocity Calculator — Distance over TimeMeasuring Magnetic Fields — Field strength calculator
    Home & DIY →
    Concrete Calculator — How to Estimate Concrete VolumePaint Calculator — How to Estimate Paint NeededTile Calculator — How to Estimate Tile QuantitySquare Feet to Square Meters — Area Converter for Homes & Renovation
    Time & calendar →
    Age Calculator — Chronological Age from BirthdateDate Difference Calculator — Days and WeeksTime Zone Converter — Compare One Moment WorldwideUnix Timestamp Converter — Epoch ↔ Readable Time
    PDF & docs →
    Add a visible integrity mark to a PDFAdd text to a PDF fileBatch compress PDFs for emailBatch convert scanned PDF to Word with OCRBatch convert web pages to PDFInspect PDF/A indicatorsCombine files into one PDFCompare two PDFsReduce PDF file sizeConvert HTML to PDFConvert HTML web pages to a Word documentExport PDF text to DXF for AutoCADConvert PDF to PDF/AConvert Word document to PDFCreate a PDF formCrop PDF — Trim Page Margins in Your BrowserEdit PDF form fieldsEdit PDF text onlineExtract text from a PDFFill out a PDF formMake a PDF fillableMake a PDF flipbookCombine PDF files into oneOpen a PDF in the browserOrganize PDF — Reorder or Remove Pages in Your BrowserAdd Page Numbers to PDF — In Your BrowserPDF Page to Image Sizes — Multi-Size Export PackConvert PDF pages to JPGPDF to Markdown — Extract Text for Notes in Your BrowserPDF Watermark — Stamp Text on Every Page in Your BrowserPrint a PDFPassword-protect a PDFRotate PDF — Fix Page Orientation in Your BrowserSign a PDF documentSplit my PDFTurn PDF into an editable text documentTurn PDF into Word documentUnlock my PDFWrite a PDF document online
    Image & media →
    Add Text Watermark to Photo — Local Browser ToolAmazon main image sizeApple-touch-icon 180×180Batch convert JPG to editable Word with OCRBatch convert JPG to text with OCRBatch convert web pages to JPGBatch convert web pages to PNGBatch watermark product photosBulk compress PNG imagesBulk compress product photos (JPEG, PNG, WebP)Bulk convert images to JPGBulk convert images to PNGBulk convert images to WebPExtract Colors from Image — Palette & Click PickConvert a JPG to text with OCRFlip Image — Mirror Horizontally or VerticallyAdd Border to Image — Color & Width OnlineImage Compressor — Shrink photos on your deviceCrop & Resize Image — Local Aspect PresetsPhoto EXIF Viewer & Remover — GPS, Camera & Local StripImage Format Converter — PNG JPEG WebP AVIF BMP GIF ICO SVGConvert Image to Grayscale — Black & White OnlineMerge Images — Combine Photos into One CollageImage Optimizer — Smaller files with on-device encodersOverlay Images — Put a Logo on a PhotoImage to Base64 Converter — Encode & Decode LocallyImages to GIF — Make an Animated GIF LocallyTurn JPG into PDFImages to PowerPoint — Photos to PPTX SlidesImages to Word — Build a DOCX from PhotosInstagram post sizeInstagram story sizeiOS app icon sizeiPhone 6.9 screenshot sizeLinkedIn banner sizeOpen Graph image sizeSVG optimizerYouTube thumbnail size
    Design & brand →
    Generate Brand Color Scale — 50–950 Palette & CSS TokensBrand Style Guide — Generate a Modular Draft You Can EditSmart Website Color Scheme — Semantic CSS TokensWCAG Contrast Checker — AA/AAA Ratio Online
    SEO & growth →
    Check if a URL is blocked by robots.txtCheck SSL certificate expirationtool_cwv_titleFind and validate XML sitemaptool_hreflang_titleIndexNow — Submit URLs to Bing without waiting for crawltool_serp_titletool_meta_titletool_onpage_titletool_og_titletool_robots_titletool_schema_titletool_sitemap_titleSPF DKIM DMARC checkertool_utm_titleValidate security.txt
    Network & IP →
    Add WWW to DNS — Point www at your apex domainAWS VPC CIDR planner — Split a VPC into AZ subnetsCIDR cheat sheet — Click a prefix to see mask and hostsCIDR to IP range — Expand a prefix into usable addressesDomain Lookup — Check DNS Records & Registration OnlineWhat Is My IP Address — See Your Public IP (IPv4 or IPv6)IP range to CIDR — Turn start–end addresses into prefix listsIPv6 CIDR calculator — Expand a prefix into its address rangePrivate CIDR ranges — Check if an IP or prefix is private or special-useTerraform cidrsubnet — Get the child CIDR Terraform would returntool_headers_title
    Dev & data →
    Base64 Encode & Decode — Convert Text in Your BrowserBatch convert web pages to ExcelChatGPT export to MarkdownCSV ↔ JSON Converter — Convert tables in your browsercurl to fetchCopy common Excel formulasHTML Entity Encoder & Decoder — Escape, Unescape & LocalJSON Schema Validator — See path errors on your deviceJWT Decoder — Read Header & Payload Locally (No Verify)tool_markdown_titleWrap a formula with IFNAWrite a COUNTIF formula in ExcelWrite an IFS formula in ExcelWrite a nested IF formula for ExcelYAML ↔ JSON Converter — Convert configs in your browser
    AI prompt tools →
    Android prompt builder — Local + Optional AIFilm prompt builder — Local + Optional AIiOS prompt builder — Local + Optional AIMidjourney prompt builder — Local + Optional AIProduct design prompt builder — Local + Optional AIPrompt template builder — Local + Optional AIShort drama prompt generator — Local + Optional AISketch.app prompt generator — Local + Optional AIWriting prompt generator — Local + Optional AI
    Text compare →
    Compare two text files onlineCompare two Word documents for differencesExcel compare filesJSON diff checker onlineCheck difference between two texts
    Security & IDs →
    Batch checksum release filesFile Hash Checker — Verify Digests in Your BrowserFile metadata analyzerRandom Password Generator — Create Passwords LocallyUUID & ULID Generator — Create IDs in Your Browser
    Files & archives →
    Archive Extractor Online — Open Compressed Files in Your BrowserCreate zip fileMagnet Link Decoder — Parse Info Hash and Trackers LocallyUnzip File Online — Extract ZIP Files in Your Browser
  • Tool topics
  • Tool types
  • Dev Logs
☕ Buy me a coffee

Navigation

Home
Back to Logs

Shipped convert-a-jpg-to-text-with-ocr with on-click Tesseract LSTM, ten-locale copy, and verify:tool green.

<convert-a-jpg-to-text-with-ocr>

Date: 2026-09-08 00:25 Summary: Shipped convert-a-jpg-to-text-with-ocr with on-click Tesseract LSTM, ten-locale copy, and verify:tool green. Visibility: people

[question] 实现

Tool links (English)

<convert-a-jpg-to-text-with-ocr>

[try to solve]

Context

OCR Planner N1 is a single-image job: printed JPG / PNG / WebP → copyable TXT. Neighbors (extract-text-from-pdf, pdf-to-markdown, images-to-pdf) refuse OCR, so this page must not pretend to be a PDF/Word/CSV/batch desk. The brief (work-tasks/convert-a-jpg-to-text-with-ocr/) was already ready / briefs-ready. This session implemented the page, vendored the engine, rewrote ten locales, and ran ship gates.

Hard product rules from the brief: H1 is a scene sentence (English: Convert a JPG to text with OCR), not Online OCR / OCR to text / Free OCR; language chips instead of an arabic-ocr URL; no auto-OCR on first paint (WASM would wreck LCP).

Process

  1. Inspected @paddleocr/paddleocr-js as the brief’s preferred engine. Unpacked size is about 24 MB, it pulls OpenCV.js + onnxruntime-web, and the default model fetch is often Hugging Face / a CDN. That cannot be git-tracked as same-origin vendor for Cloudflare Pages.
  2. Fell back to Tesseract.js 7.0.0 LSTM-only (createWorker(langs, 1)), which the capability note already allowed. Copied tesseract.min.js, worker.min.js, and the three LSTM *.wasm.js cores into public/vendor/tesseract/. Language packs are not on npm; eng / chi_sim / ara / jpn .traineddata.gz were downloaded from tessdata 4.0.0_fast and committed as required vendor paths.
  3. Page (src/pages/convertAJpgToTextWithOcrPage.ts): one dropzone, Convert / Copy text / Download TXT / Load sample / Clear, default Chinese+English chips, advanced low-confidence list and max edge 2048. loadSample() draws printed JPEG lines then runs Convert; it is not called on landing. corePath is the directory /vendor/tesseract/core so Tesseract.js can pick SIMD vs relaxed-SIMD LSTM.
  4. Ten locale shards were written from 03-locale-briefs.md (not English calques). Coverage gate phase 2 (English master) and phase 4 / all passed after the 2b row named en,zh,es,ja.
  5. README Tools List got English and Chinese one-liners. Isolation initially failed on package-lock.json, vendor copy/validate scripts, and an unrelated work-todos edit. The todos file was reverted. Isolation allowlist now includes lockfile, vendor copy scripts, and public/vendor/ so adding a same-origin WASM library is not treated as “editing another tool.”
  6. npm run verify:tool -- --slug=convert-a-jpg-to-text-with-ocr went green (coverage, build:site --full, HTML smoke, SEO, vendor tracked, isolation). Playwright against local public/ confirmed lazy load and the sample pipeline.

Root cause / analysis

Paddle.js is a better printed-CJK engine on paper, but it is not a vendoring unit: too large, native deps, remote models. Tesseract LSTM is slower and weaker on dense CJK, yet it is self-contained .wasm.js (no sibling .wasm fetch in this build) plus gzip language packs, which matches the site rule that Cloudflare deploy has no local predeploy. User-facing copy never sells the library name; References point at Tesseract and tesseract.js so the engine is honest without becoming a keyword.

Click-to-load is the LCP control: first paint requested zero /vendor/tesseract/ URLs. Convert then loaded tesseract.min.js, worker.min.js, tesseract-core-relaxedsimd-lstm.wasm.js, chi_sim.traineddata.gz, and eng.traineddata.gz.

Solution

  • Catalog shard page.style: "opts", localProcessing: true, related extract-text-from-pdf and images-to-pdf.
  • Status: 03 → i18n-done, 02 → implemented.
  • Keyword pool N1 stays build / await_serp (no SERP batch, so it does not count as a weekly long_gap KPI). Tracker snapshot lists this slug as this week’s new tool page.
  • Browser check (static public/ on port 8765): H1 matched; Copy/Download disabled until Convert; Load sample filled ONLINEFREETOOLS / The quick brown fox / 印刷体样例; PDF upload showed the neighbor error, not a fake OCR of PDF bytes.
  • SEO link validator warned that no other tool currently relateds back to this slug. That inbound FAQ needs CROSS_TOOL_UPDATE=1 and was left out of this ship.

Notes / boundaries

  • N2–N5 (scanned PDF → TXT / searchable PDF / Word / table CSV) were not started.
  • Do not absorb OCR queries into extract-text-from-pdf.
  • Handwriting is a FAQ fail, not a product claim.
  • Sample Chinese depends on the device having a CJK font; English lines still OCR if the CJK glyph is missing.
  • Not deployed; npm run deploy / upload:r2 were not run.

[actions]

  • Added catalog shard, Page, icon, ten i18n shards, Tesseract vendor + lang packs
  • Updated scripts/copy-tool-libs-vendor.mjs, scripts/validate-vendor-tracked.mjs, isolation allowlist
  • README Tools List; funnel tracker / pool / planner status
  • npm run verify:tool -- --slug=convert-a-jpg-to-text-with-ocr
OnlineFreeTools.org · Learning project · Iterating
About·Privacy·Terms·Contact·GitHub