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 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 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 PickFlip 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

Shipped two converter tools with independent artifact contracts: lossless PNG screenshots (transparent / 2×) versus an editable Word .docx mapped from HTML, not a screenshot and not A4 PDF. | Dev Logs

Back to Logs

Date: 2026-09-07 15:59 Summary: Shipped two converter tools with independent artifact contracts: lossless PNG screenshots (transparent / 2×) versus an editable Word .docx mapped from HTML, not a screenshot and not A4 PDF. Visibility: people

[question] 像上面一样立项和实现:batch convert web pages to png和convert html web pages to word document,注意不同工具的要有足够不同的info gain

Tool links (English)

  • https://onlinefreetools.org/tools/batch-convert-web-pages-to-png
  • https://onlinefreetools.org/tools/convert-html-web-pages-to-word-document Chinese: https://onlinefreetools.org/zh/tools/batch-convert-web-pages-to-png Chinese: https://onlinefreetools.org/zh/tools/convert-html-web-pages-to-word-document

[try to solve]

Context

The request was to brief and implement two tools the same way as the existing batch webpage-to-JPG / webpage-to-PDF pair, with enough information gain that they are not doorway pages that only swap a file extension.

Existing neighbors already occupy two jobs:

  • Batch JPG: lossy viewport rasters, quality slider, chat/ticket grids.
  • Batch PDF: A4 portrait pagination for print/archive.
  • Convert HTML to PDF: paste HTML → printable PDF.
  • Turn PDF into Word: PDF text layer → .docx.
  • Images to Word: photos into a Word file, not HTML structure.

The new pages had to occupy different contracts, not “same fetch pipeline, different suffix”.

Keyword Planner files were already in the pool:

  • PNG: docs/seo/keywords/todo/web2png-Keyword Planner 09-06-2026 at 04-30-57.csv — webpage to png (100–1,000) absorb into the batch list (one URL = one line). Do not split a single-URL doorway.
  • Word: docs/seo/keywords/todo/worddocument-Keyword Planner 09-06-2026 at 05-11-33.csv — head term html to word (1k–10k) as the default paste-HTML job; convert webpage to word into a Page URL tab. Drop mhtml / Chrome “complete page”.

Process

  1. Wrote work-tasks/ briefs for both slugs in parallel (00–03), including coverage tables, Ads/Planner long-tail rows, and 0i intent review. Ran coverage:gate --phase=0b per slug before engineering.
  2. Implemented serially (coverage-pass rule): PNG Page/i18n to phase=4 green before Word *Page.ts / i18n.
  3. PNG engineering: catalog page.style: opts; URL list → html2canvas → canvas.toBlob('image/png'); advanced settings Viewport / Background white|transparent / Scale 1×|2× / full vs first screen; no JPEG quality slider; ZIP web-pages.png.zip; sample URLs are UI component-kit pages (checkerboard, 1px borders, translucent card). Page load does not auto-run loadSample() because html2canvas can freeze the tab.
  4. Word engineering: default Paste HTML tab plus Page URL tab; Convert then Download; advanced “Include images”; DOMPurify → DOMParser → docx mapping of h1–h6, p, ul/ol (plain • / 1. prefixes, not numbering config), table, ExternalHyperlink, optional ImageRun. URL fetch reuses GET /api/tools/convert-html-to-pdf?url=. Same-origin /vendor/docx/index.umd.js. Page load does call loadSample() (no html2canvas).
  5. Ten-locale independent rewrites (not English calques). PNG H1: “Batch convert web pages to PNG” / “批量把网页转成 PNG”. Word H1: “Convert HTML web pages to a Word document” / “把 HTML 网页转成 Word 文档”.
  6. First PNG verify:tool failed lint:seo because zh description was 117 characters (need ≥120). Lengthened it to include 「网页转 PNG / 网址转 PNG」 (127). lint:seo reads merged src/site/i18n/{lang}.ts, so a shard fix without merge:tools still looks short.
  7. Word coverage:gate --phase=4 then --phase=all green. CROSS_TOOL_UPDATE=1 npm run verify:tool -- --slug=convert-html-web-pages-to-word-document green (full build:site, HTML smoke, SEO, vendor, isolation). Reverse related on JPG→PNG and HTML-to-PDF→Word.
  8. Confirmed home cards in public/index.html and public/zh/index.html, prerendered _pages titles, and sitemap loc entries. No interactive browser session in this environment; Convert/Download behavior is covered by lint:tool-page --require-html plus the in-page loadSample() / Convert scripts.

Root cause / analysis

Shared fetch (/api/tools/convert-html-to-pdf?url=) is an implementation detail. Unique copy has to be the artifact:

Tool Contract people can verify without the H1 Forbidden near-clone
Batch JPG (existing) Lossy JPEG, viewport, quality slider A4 PDF
Batch PDF (existing) A4 portrait pages Tall JPEG
Batch PNG (this) Lossless PNG, optional transparent background, 1×/2× for 1px UI edges, ZIP JPEG renamed .png; no quality slider
HTML→Word (this) Editable .docx styles (headings/lists/tables/links) Screenshot stuffed into Word; A4 PDF; PDF as input; .mhtml

If PNG copy talked about “quality” or “print pages”, or Word copy talked about “capture the page”, stripping the title would leave two format-suffix variants. That is doorway / scaled-content risk under Google’s people-first and spam policies. Information gain here is a content principle (verifiable extra vs SERP neighbors), not a claimed ranking switch.

Planner absorb vs build: one-URL webpage to png is the same job as the batch list. html to word vs convert webpage to word is the same mapping with two inputs (paste vs fetch), so one slug with tabs, not /html-to-word plus /webpage-to-word.

Solution

  • PNG settings expose Background and Scale, not JPEG quality. Sample HTML is a translucent UI kit so transparency is visible. FAQ points JPG (chat raster) and PDF (A4) as other jobs.
  • Word default path is paste HTML → Convert → Download .docx. The URL tab absorbs webpage-to-word. FAQ points HTML→PDF (print), PDF→Word (already a PDF), and PNG/JPG batch (raster). Copy states CSS will not be pixel-perfect and Chrome complete-page / mhtml is out of scope.
  • Both use localProcessing: false because URL fetch is an edge hop (paste/PNG encode still stay in the tab). Privacy copy says fetch-once, not stored.
  • Ship gates: coverage 0b → 2 → 4 → all; verify:tool (Word, after PNG SEO fix). README EN/ZH list entries. Catalog related ≥2.

Notes / boundaries

  • Tool HTML on production is served from R2 (public/_pages is gitignored). git push alone does not refresh live tool bodies; run npm run upload:r2 when you want production to match.
  • Isolation: editing a neighbor’s related requires CROSS_TOOL_UPDATE=1.
  • lint:seo description floor is 120 characters after merge. Count CJK on the merged string.
  • PNG loadSample() is click-only; Word auto-runs sample because docx mapping is cheap.
  • Lists in Word use visible prefixes instead of docx numbering APIs (avoids a brittle 8.5 numbering config).
  • Images in Word are optional and can fail cross-origin. Scripts / login walls fail on URL fetch, same as the other webpage converters.
  • This session did not commit or push.

[actions]

  • Briefs: work-tasks/batch-convert-web-pages-to-png/, work-tasks/convert-html-web-pages-to-word-document/
  • Catalog/pages/i18n/icons for both slugs; reverse related on JPG and HTML-to-PDF
  • README EN/ZH tool list entries
  • coverage:gate 0b/2/4/all; CROSS_TOOL_UPDATE=1 verify:tool for Word (full site build)
  • Lengthened PNG zh meta description after first SEO lint fail (117 → 127)
OnlineFreeTools.org · Learning project · Iterating
About·Privacy·Terms·Contact·GitHub