Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CSS Grid columns usually disappear in a PDF because the converter uses a different rendering engine or version than the browser, does not receive the stylesheet you expect, or does not support the particular Grid feature in use. Identify the renderer and version first, then test a minimal grid that fits on one page before restoring advanced layout rules.

Why Grid can work in a browser but fail in a PDF

“HTML to PDF” describes an output, not a single rendering engine. A converter may use a headless browser, a dedicated layout engine, or another renderer, and those engines can differ in their CSS support. A browser preview therefore does not establish that the production PDF converter supports the same declarations. Check the engine and version actually deployed, including any wrapper, container, or hosted service. A renderer comparison updated September 23, 2026 offers a starting map of differences, but confirm the behavior against the renderer’s own documentation and your output.

Support is also feature-specific: an engine may implement basic Grid while lacking or not testing a particular pattern. Finally, PDF conversion may receive different CSS from the browser, or the document may fail only when content crosses a page boundary.

Diagnose the missing columns in order

  1. Identify the renderer and deployed version

    Record the actual executable, library, browser, container image, or service used in production. Do not infer the engine from a wrapper’s product name. Reproduce with the same runtime and version as the failing conversion.

    Free tools Windows power users keep installed

    One-click scans. No signup required.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
    • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
    • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
    • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
    • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
    • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  2. Check that the intended stylesheet reaches the converter

    Verify that the CSS containing display: grid and grid-template-columns is embedded or successfully loaded. Inspect print-specific styles and later rules that may override the container or its tracks. Compare the effective CSS in the PDF pipeline with the browser’s computed styles.

    For WeasyPrint, stylesheets can come from user-agent, author, and user origins; author stylesheets outrank user stylesheets by default. A user stylesheet does not necessarily override the page’s author CSS unless its declarations are raised with !important. WeasyPrint’s CSS reference explains the cascade and stylesheet origins.

    Rank #2
    Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
    • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
    • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
    • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
    • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
    • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  3. Test a minimal explicit-column grid

    Reduce the document to one container and two short children. Use simple explicit tracks and a gap:

    .pdf-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    If this renders in two columns, add the original rules back gradually: first track sizing, then repeat(), named lines, placement, nested grids, and page breaks. This isolates the unsupported or conflicting feature rather than changing several variables at once.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #3
    Sale
    Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
    • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
    • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
    • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
    • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
    • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
  4. Separate track sizing from page fragmentation

    Render a short document that fits on one page, then a longer version that crosses a page boundary. If only the longer version fails, investigate row splitting and page-break behavior before changing the column definitions. Fragmentation support can differ from basic Grid support.

  5. Choose a fallback based on the identified limitation

    If the engine lacks a needed feature, simplify the Grid to a documented supported subset, use another layout method supported by that engine, or select a renderer whose documented behavior matches the document. Validate the actual PDF with a representative page-spanning example; a broad “Grid supported” label is not enough.

    Rank #4
    Sale
    UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
    • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
    • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
    • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
    • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
    • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

What WeasyPrint supports—and where to be cautious

WeasyPrint’s stable API reference describes Grid as working for simple cases with limitations. Its listed supported features include display: grid, grid-template-*, fractional units such as fr, minmax(), gaps, and grid areas. The reference lists display: inline-grid, grid-auto-flow: column, subgrids, repeat(auto-fill, *), repeat(auto-fit, *), and fragmentation within rows among unsupported or untested features. Consult the current stable reference for the precise feature list.

Version matters. The WeasyPrint changelog records initial CSS Grid support in version 62.0, released April 30, 2024. Version 62.2, released June 4, 2024, added support for grid-auto-flow: column and included Grid fixes. A deployment older than 62.0 should not be assumed to have Grid support; even on later versions, check the exact declaration against the reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting by symptom

Symptom What to check Next step
Everything becomes one column, including a two-track minimal test Renderer identity/version, whether the stylesheet loaded, and whether a later or print rule overrides the grid Test the same HTML and CSS in the deployed renderer, then inspect its effective styles
Basic two-column test works but the real layout collapses Advanced track patterns, auto-fill/auto-fit, subgrid, nested layout, or placement rules Add features back one at a time and compare each with that engine’s documentation
Columns work on a short PDF but fail across pages Row fragmentation and page-break interaction Reproduce with a document that crosses one page boundary; treat it as a pagination issue, not necessarily a track-sizing issue
Browser output is correct but PDF output is not Different engine/version or missing/different CSS in the conversion pipeline Compare the production renderer and loaded stylesheets rather than relying on the browser preview

How to compare renderers before switching

  • Confirm the actual engine and exact deployed version.
  • Check support for the specific Grid declarations the document uses, not just Grid in general.
  • Test both a one-page example and one that spans pages.
  • Verify the converter loads the required stylesheets and applies the intended cascade.
  • Use a representative document and inspect the generated PDF after any change.

A vendor comparison updated September 23, 2026 describes Chrome headless, wkhtmltopdf, WeasyPrint, and Prince as differing in Grid behavior; it characterizes Grid as supported in Chrome headless, unsupported in wkhtmltopdf, and supported with remaining gaps in WeasyPrint. Treat that as a secondary overview, not a guarantee for every version or document. Confirm details with the chosen renderer’s own documentation and a representative conversion. Read the comparison.

Or skip the browser setup

If you need a screenshot or PDF of a web page rather than a custom HTML-to-PDF pipeline, ScreenshotNeo offers a one-request API. For example, this cURL command saves a page screenshot:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options and PDF output. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents use screenshot tools, and the Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free.

Frequently Asked Questions

Which WeasyPrint version first added CSS Grid?

Version 62.0, released April 30, 2024, introduced CSS Grid support.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does WeasyPrint support every CSS Grid feature?

No. Its stable reference says Grid works for simple cases and identifies unsupported or untested features, including subgrid and auto-fill/auto-fit repeat patterns.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.