PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteSet the element’s physical dimensions in CSS inches—width: 2.5in; height: 1in;—then set the PDF page size, margins, and scaling independently. CSS defines 1in as 96px, 2.54cm, and 72pt. A 2.5-inch element is therefore 240 CSS pixels wide. The final PDF will match that physical size only when the production renderer does not scale or clip the page.
Use CSS inches for the element
Absolute CSS units are the most direct way to describe a physical target. For example:
.label {
box-sizing: border-box;
width: 2.5in;
height: 1in;
}
The CSS conversion constants are fixed:
| CSS value | Equivalent |
|---|---|
| 1in | 96 CSS px = 2.54cm = 72pt |
| 2.5in | 240 CSS px = 6.35cm = 180pt |
| Letter | 8.5 × 11in |
| A4 | 8.27 × 11.69in |
A CSS pixel is a reference unit, not necessarily one physical pixel on a monitor. Screen zoom, device pixel ratio, and browser window size can make an inch look visually wrong while the PDF’s physical dimensions remain correct. Judge the exported PDF using its page box and a 100% print or measurement workflow, not by dragging a ruler across a browser preview.
Define the box you actually want to measure
Content box versus outer box
With the default content-box model, declared width and height exclude padding and borders. A declaration of width: 2.5in can therefore produce an outer width larger than 2.5 inches. Use box-sizing: border-box when the requested physical size includes padding and borders:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches#1 Best Overall
- 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.
.card {
box-sizing: border-box;
width: 2.5in;
height: 1in;
padding: 0.08in;
border: 0.01in solid #222;
}
Margins are outside the element and consume surrounding layout space; they do not change the element’s border-box dimensions. Also account for transforms such as scale(), flex or grid shrinking, min/max constraints, and overflow. A fixed physical target should not be allowed to shrink:
.target {
flex: 0 0 2.5in;
width: 2.5in;
height: 1in;
min-width: 2.5in;
min-height: 1in;
box-sizing: border-box;
}
Set the PDF page separately
An element’s dimensions do not determine the sheet or page box. Configure the page size and margins explicitly:
@page {
size: Letter;
margin: 0.5in;
}
html, body {
margin: 0;
padding: 0;
}
.target {
box-sizing: border-box;
width: 2.5in;
height: 1in;
}
The 0.5-inch page margins leave a printable content area of 7.5 × 10 inches on Letter paper. If a target touches the page edge, use @page { margin: 0; } only when your printer and renderer support the required edge-to-edge output. Otherwise the printer may clip it.
Keep page geometry and component geometry distinct
- Component: its width, height, padding, border, and internal layout.
- Page: paper size, orientation, page margins, and printable area.
- Renderer: whether CSS page size is honored, whether content is fitted to paper, and what scale is applied.
- Printer or viewer: whether the final output is printed at 100 percent or reduced to fit.
A complete HTML example
This document creates a Letter page with a precisely sized 2.5 × 1-inch label. The visible border is included in the declared dimensions.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
@page { size: Letter; margin: 0.5in; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
.label {
width: 2.5in;
height: 1in;
border: 0.01in solid #111;
padding: 0.08in;
display: flex;
align-items: center;
justify-content: center;
font: 10pt Arial, sans-serif;
overflow: hidden;
}
</style>
</head>
<body>
<div class="label">2.5 × 1 inch label</div>
</body>
</html>
At export time, wait for fonts and images to finish loading. Late-loading content can alter line wrapping or push an element to another page even when its CSS dimensions are fixed.
Rank #2
- 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.
Renderer settings that can change the result
Chromium and Electron
Chromium print parameters distinguish paper dimensions, margins, printable-area calculations, scale, and whether CSS page size is respected. In Electron’s webContents.printToPDF, preferCSSPageSize defaults to false; with that setting, content is scaled to fit the selected paper size. Set it to true when your @page rule should control the page, and verify the API behavior for the exact Electron release you deploy.
const pdf = await win.webContents.printToPDF({
printBackground: true,
preferCSSPageSize: true,
margins: { top: 0, bottom: 0, left: 0, right: 0 }
});
Do not combine a CSS page size with an unrelated paper-size override unless you intend the renderer to fit one into the other. A mismatch can uniformly enlarge or reduce every element.
Playwright or Puppeteer
When using Chromium automation, choose one source of truth for page geometry. This Node.js example lets CSS control the page size:
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('file:///absolute/path/to/label.html', { waitUntil: 'networkidle' });
await page.pdf({
path: 'label.pdf',
printBackground: true,
preferCSSPageSize: true,
margin: { top: '0in', right: '0in', bottom: '0in', left: '0in' }
});
await browser.close();
If you instead pass a format or explicit width and height, ensure those values agree with @page. Use the same browser version in development and production because print behavior is implementation- and version-sensitive.
wkhtmltopdf
wkhtmltopdf exposes paper format, custom page width and height, DPI, and margins as separate options. A4 is its documented default. Set these options explicitly rather than relying on defaults:
Rank #3
- 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.
wkhtmltopdf --page-size Letter
--margin-top 0.5in --margin-right 0.5in
--margin-bottom 0.5in --margin-left 0.5in
--print-media-type input.html output.pdf
When using custom dimensions, specify both width and height and confirm the command-line unit syntax supported by the installed version. Do not assume a DPI option changes CSS inch conversion; it can affect rasterized content and device interpretation without replacing CSS’s 96-pixel reference inch.
Browser printing details
In a browser’s print dialog, select the intended paper size, set scale to 100 percent or “Actual size,” and disable “Fit to page.” Browser-generated headers and footers consume margin space and can move content; disable them when the document must use the full configured area. Save the PDF and inspect it, rather than treating the preview as the final authority.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Validate physical dimensions
- Write down whether the requirement applies to the content box, padding box, or border box.
- Convert the target to CSS inches. Multiply inches by 96 only when an API requires CSS pixels.
- Set
@pagesize, orientation, and margins explicitly. - Record renderer name and version plus every paper, scale, margin, and CSS-page-size option.
- Open the generated PDF in a PDF-aware measuring tool and inspect the page box and target border.
- Print one sample at 100 percent with printer scaling disabled, then measure the physical output.
- Repeat the check after dependency, browser, template, or printer-driver changes.
If the page box is correct but the component is wrong, inspect box sizing, borders, padding, transforms, and layout constraints. If every component is wrong by the same ratio, investigate fit-to-paper or print scale first.
Troubleshooting common failures
Everything is uniformly smaller or larger
Cause: the renderer is fitting content to a different paper size, or the viewer/printer is applying a scale. Fix: align @page with the renderer’s paper setting, enable CSS-page-size preference where supported, and print at 100 percent.
The element is larger than its declared size
Cause: content-box sizing, padding, or borders. Fix: apply box-sizing: border-box and include border and padding in the dimensional calculation.
Rank #4
- 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
The target is clipped at an edge
Cause: page margins, printable-area limits, overflow, or a target that exceeds the content box. Fix: calculate available page space, reduce margins or target placement, and check ancestor overflow and page-break rules.
The target moves to another page
Cause: preceding content, margin collapse, late fonts/images, or an unsplittable block. Fix: wait for resources, reserve dimensions, use break-inside: avoid where appropriate, and remove unexpected default body margins.
Text changes the measured box
Cause: an auto-sized descendant, font substitution, or unbounded flex/grid behavior. Fix: load the production font before printing, keep the outer target fixed, and constrain internal content with deliberate wrapping or clipping.
PDF looks right but paper does not
Cause: printer-driver scaling or a viewer’s “fit” setting. Fix: choose Actual size/100 percent and disable “shrink oversized pages” or equivalent options.
Performance and reliability practices
- Reuse a warm browser process for batches, but isolate jobs that change headers, cookies, locale, or authentication.
- Wait for a deterministic condition such as network idle or a required selector instead of an arbitrary short delay.
- Embed or preload fonts when typography affects line breaks.
- Keep templates free of animations and time-dependent content; freeze dates and data for repeatable output.
- Log renderer version, CSS hash, page settings, and output dimensions so a mismatch can be reproduced.
- Test representative long text, missing images, right-to-left text, and the largest expected data set.
Or skip the browser setup
ScreenshotNeo can return a PDF from one request, so you do not have to maintain a local browser pipeline for URL-based documents. Its clean-shot process accepts consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers.
For a URL whose print CSS already defines the required dimensions:
Best Value
- 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.
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 documentation for PDF parameters, page size, margins, page ranges, and the other capture options. The same endpoint is usable from Python:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Or Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. It includes 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000 shots. Every feature is available on every plan. Create a free ScreenshotNeo account.
Choosing a PDF path
| Path | Useful controls | Main sizing risk |
|---|---|---|
| Chromium automation | CSS @page, margins, scale, CSS-page-size preference |
Fit-to-paper when settings disagree |
| Electron | printToPDF, explicit margins, preferCSSPageSize |
CSS page size is not preferred by default |
| wkhtmltopdf | Paper format, custom width/height, DPI, margins | Defaults and engine behavior vary by installed version |
| ScreenshotNeo | Hosted capture, PDF page options, clean-shot processing | URL must be reachable and print CSS must express the intended geometry |
No renderer should be assumed to have universal pixel accuracy. Select one whose page-size and scaling controls match your deployment, then validate the actual PDF produced by the exact version and settings you ship.
Free tools Windows power users keep installed
One-click scans. No signup required.
Frequently Asked Questions
Does changing CSS pixels change the physical PDF size?
Only if the CSS pixel value represents a different inch value. In CSS, 96px equals 1in; changing the browser’s device pixel ratio does not redefine that CSS conversion.
Should I use points or inches for print layouts?
Use inches when the requirement is stated in physical inches. Points are equivalent at 72pt per CSS inch, so either works if the conversion is deliberate and the renderer preserves CSS page sizing.
Why is my measured PDF page correct while the printed sample is not?
The printer or PDF viewer is applying a fit or shrink setting. Print at 100 percent/Actual size with automatic scaling disabled.
Can an API fix incorrect HTML print geometry?
A service can produce the PDF with controlled renderer settings, but it cannot infer whether your requested size means a content box or border box. Define that geometry in CSS first.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
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.

