What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
For a live page, the shortest reliable Laravel solution is Spatie Browsershot, which drives headless Chrome and executes JavaScript before creating the PDF:
use SpatieBrowsershotBrowsershot;
Browsershot::url('https://example.com')->savePdf('example.pdf');
Use a browser engine when the page depends on JavaScript or modern CSS. Choose DOMPDF when you need a pure-PHP deployment and can accept narrower CSS support.
Choose the renderer before writing code
Converting a URL to PDF is a rendering problem, not just a file conversion. The engine must fetch the page, apply CSS, run scripts, load images and fonts, then paginate the result.
| Driver | JavaScript | CSS fidelity | Infrastructure | Best fit |
|---|---|---|---|---|
| Browsershot/Chromium | Yes | Modern browser CSS | Node.js plus Chrome/Chromium | Live or JavaScript-rendered sites |
| DOMPDF | Not a browser runtime | Mostly CSS 2.1 with some CSS3 properties | PHP only; no external binary, Node.js or Docker | Server-rendered documents with modest CSS |
| Laravel Snappy/wkhtmltopdf | Uses the Qt WebKit renderer; behavior differs from current Chrome | WebKit-era HTML/CSS | wkhtmltopdf executable | Existing Snappy deployments |
| Spatie Laravel PDF | Depends on selected driver | Depends on selected driver | Choose among several backends | One Laravel-facing API with switchable drivers |
Browsershot is the practical default for dashboards, SPAs, authenticated pages and sites whose layout depends on JavaScript. DOMPDF is simpler to deploy, but its documented CSS coverage is narrower. Snappy wraps the separate wkhtmltopdf executable, which renders through Qt WebKit. Spatie Laravel PDF can provide a common facade while you select Browsershot, Gotenberg, Cloudflare Browser Run, WeasyPrint, DOMPDF or chrome-php/chrome.
#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.
Install Browsershot and its runtime
Browsershot itself is a Laravel/PHP package, but the PDF process needs Node.js and a Chrome or Chromium binary because it runs Puppeteer with headless Chrome. Install the package with Composer, install Node.js and Puppeteer according to your deployment process, and make sure the worker user can execute Chrome in headless mode.
composer require spatie/browsershot
- Use a supported PHP and Laravel version for your installed Browsershot release.
- Install Chrome or Chromium on the web server, container or queue worker that will create PDFs.
- Give that process permission to read temporary directories and write the destination file.
- In containers, configure the browser sandbox according to your security policy rather than blindly disabling it.
The official package documentation is at https://github.com/spatie/browsershot. If Chrome is not on the executable path, configure Browsershot with the path used by your host.
Convert a live URL to a PDF
This is the minimal URL example:
<?php
use SpatieBrowsershotBrowsershot;
Browsershot::url('https://example.com')
->savePdf(storage_path('app/example.pdf'));
savePdf() writes the generated file. Use an absolute, writable path in production and avoid writing user-controlled filenames directly.
Return the PDF from a Laravel controller
Browsershot can return the PDF bytes with pdf(). Laravel can then send those bytes as an HTTP response:
<?php
namespace AppHttpControllers;
use IlluminateHttpResponse;
use SpatieBrowsershotBrowsershot;
class InvoicePdfController extends Controller
{
public function __invoke(): Response
{
$bytes = Browsershot::url('https://example.com/invoice/123')
->showBackground()
->pdf();
return response($bytes, 200, [
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'inline; filename="invoice-123.pdf"',
]);
}
}
The exact route, authorization and filename policy belong to your application. Protect private URLs with normal Laravel authentication and authorization; do not expose an endpoint that accepts arbitrary internal URLs without validation.
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.
Generate from HTML instead of a URL
When the markup is already available, use html():
$html = view('reports.invoice', $data)->render();
Browsershot::html($html)->savePdf(storage_path('app/invoice.pdf'));
Relative assets need a resolvable base URL or absolute URLs. If your template references local files, ensure the Chrome process can read them and that the paths are valid on the worker, not only on your development machine.
Control pagination, orientation and visual output
Browsershot’s PDF API supports the controls most applications need:
showBackground()preserves background colors and images that would otherwise be omitted by print styling.- Landscape output can be selected for wide tables.
- Page ranges let you request only selected pages.
- An initial page number can set the starting page label.
base64pdf()returns an encoded representation when another API must transport the document as text.pdf()returns the PDF directly for a streamed or downloaded HTTP response.
Keep print-specific CSS in the page itself. Rules such as @page, explicit margins, page-break controls and print media queries are interpreted by the browser engine. Validate the result with the same Chrome version used in production because font availability and browser updates can change line wrapping.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use Spatie Laravel PDF when you need a swappable driver
Spatie Laravel PDF provides a Laravel-oriented abstraction over multiple rendering backends. Its documented baseline is PHP 8.2+ and Laravel 11+. Install only the backend you intend to run:
- Browsershot: Node.js and Chrome/Chromium.
- DOMPDF:
composer require dompdf/dompdf; no external binary, Node.js or Docker. - Gotenberg: a running Gotenberg Docker service.
- WeasyPrint: the WeasyPrint binary plus
pontedilana/php-weasyprint. - Cloudflare Browser Run: Browser Run enabled, an API token and an account ID.
- Chrome driver:
chrome-php/chromeand Chrome/Chromium 65 or newer.
Select the default driver in config/laravel-pdf.php, or choose one per document with a call such as ->driver('cloudflare'). The configuration guide is https://github.com/spatie/laravel-pdf/blob/main/docs/drivers/configuration.md; installation details are in https://github.com/spatie/laravel-pdf/blob/main/docs/installation-setup.md and requirements in https://github.com/spatie/laravel-pdf/blob/main/docs/requirements.md.
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.
When DOMPDF is the better choice
DOMPDF runs in PHP and avoids browser provisioning, which is useful on restrictive shared hosting or small workers. It is appropriate for invoices, letters and reports whose HTML is already server-rendered and whose CSS stays within its supported feature set. It is not a drop-in replacement for a browser when a page must execute JavaScript, measure layout dynamically or use newer browser CSS.
The project describes itself as mostly CSS 2.1 compliant with some CSS3 properties. Test fonts, flex/grid layouts, positioned elements and page breaks with your actual templates before committing to it.
Recommended Free Tools
Snappy and wkhtmltopdf considerations
Laravel Snappy wraps the wkhtmltopdf executable and can load an HTML string, file or view for saving, inline display or download. wkhtmltopdf uses Qt WebKit, so output can differ from current Chrome on modern CSS, JavaScript APIs and font rendering. It remains a reasonable option when an existing deployment already standardizes on that binary. Project references: https://github.com/barryvdh/laravel-snappy and https://wkhtmltopdf.org/.
Secure and reliable URL rendering
Prevent server-side request forgery
If users supply URLs, allow-list schemes and hosts, reject private IP ranges and localhost, and consider routing all captures through a controlled worker. Browser rendering can reach network resources that ordinary PHP code never touches.
Handle authentication and assets
Private pages need an authenticated browser context, cookies or headers. Missing credentials commonly produce a login page instead of the intended document. External fonts, images and API calls must be reachable from the worker; blocked egress produces blank regions or incomplete pages.
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
Wait for the page to finish
Single-page applications may render after the initial response. Configure an appropriate wait condition or delay in Browsershot, and ensure the page has reached the state you want before calling pdf(). Avoid arbitrary long delays when a deterministic selector or network-idle condition is available.
Troubleshoot common failures
| Symptom | Likely cause | Fix |
|---|---|---|
| Chrome executable not found | Chrome is absent or not on the configured path | Install Chrome/Chromium on the worker and configure the executable path used by Browsershot. |
| Permission or sandbox error | The queue user cannot launch Chrome or write temporary files | Correct directory ownership, writable temporary storage and container sandbox settings. |
| PDF contains a login page | No session cookie or authorization header | Render an authenticated route or provide the required browser credentials through your application’s secure configuration. |
| Blank chart or missing images | JavaScript has not finished, or resources are blocked | Wait for a selector/network idle, verify outbound access and use absolute asset URLs. |
| Background colors are missing | Print backgrounds are disabled | Call showBackground() and check print CSS. |
| Layout differs between environments | Different Chrome versions, fonts or CSS assets | Pin the browser image/version where practical and install the fonts required by the document. |
| Request times out | Slow third-party resources or a page that never reaches idle | Remove unnecessary resources, set a realistic timeout and use a specific readiness selector instead of waiting forever. |
Performance, memory and operating cost
Official package pages do not publish a comparable speed or memory benchmark, so capacity is workload-specific. A browser process generally consumes more resources than a pure-PHP renderer, especially when several PDFs run concurrently. Queue large jobs, cap worker concurrency, clean temporary files and monitor execution time and memory for your own templates.
Cache stable source data and assets where appropriate, but do not cache personalized documents across users. For repeatable output, keep the rendering environment consistent and log the URL, driver, browser version and failure reason without storing sensitive document contents.
FAQ
Can Laravel convert a page that is rendered entirely by JavaScript?
Yes, provided you use a browser-based driver such as Browsershot/Chromium and wait until the application has rendered the required state.
Should I save the PDF or stream it?
Use savePdf() for files you will process or attach later; use pdf() when the current request should return the generated bytes.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
Can I change PDF drivers later?
With Spatie Laravel PDF, select a different configured driver globally or per document. Re-test pagination and CSS because output is driver-dependent.
Is a browser required for DOMPDF?
No. DOMPDF is a PHP library and does not require Node.js, Docker or an external browser binary.
Or skip the browser setup
ScreenshotNeo provides a URL-to-PDF API when you do not want to install and operate Chrome. One GET request returns a PDF (or PNG, JPEG or WebP); its capture pipeline accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before the shot. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and each response identifies the result with X-Page-Verdict and X-Billed headers. It also offers an MCP server for AI agents, with take_screenshot, get_page_info and capture_pdf tools.
For Laravel or any backend, call the API directly. The complete parameter reference is in the ScreenshotNeo documentation.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
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(`HTTP ${res.status}`);
const buffer = Buffer.from(await res.arrayBuffer());
ScreenshotNeo includes full-page captures with lazy images loaded, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper size/margins/landscape/page ranges, custom CSS and JavaScript, click-before-capture actions, hide selectors, waits for a selector/delay/network idle, request and resource blocking, custom headers/cookies/user agent/Authorization, timezone and geolocation, transparent backgrounds, image resizing, selectable cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Existing parameter names used by other screenshot APIs are accepted to ease migration.
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.
Frequently Asked Questions
Can I generate a PDF from a local Blade view without publishing it?
Yes. Render the view to an HTML string and pass it to Browsershot::html(), provided local assets are readable or referenced with resolvable URLs.
Why does the same page produce different page counts on two servers?
Font files, browser versions, viewport settings and loaded assets affect line wrapping and pagination. Keep those inputs consistent and test on the production worker image.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.

