What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To create a PDF in an Azure Functions app on Linux, run Playwright’s Chromium browser in the function, load the page you want to render, and return the bytes from page.pdf() or save them to durable storage. The deployment challenge is making sure the Linux environment that actually runs the function has both the matching browser binary and its system libraries; a successful run on your development machine does not prove those are present in Azure.
This guide uses Node.js as one concrete example. Azure Functions supports several languages, but the package, worker model, runtime settings, and deployment instructions vary. Check Microsoft’s current supported-language and deployment guidance for your language, plan, and runtime before choosing a deployment route.
Choose a runtime and a Linux deployment route
Keep the Functions runtime, Playwright package, Chromium build, and deployed Linux environment aligned. Microsoft supports multiple Azure Functions languages on Linux, and its supported versions and lifecycle guidance can change. Use Microsoft’s Supported Languages in Azure Functions and the deployment documentation for the language and hosting plan you intend to use.
Crashes, 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 minutePC 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 & 11Managed Functions environment
A managed build and runtime can be suitable when the deployed environment provides the browser’s required operating-system libraries and the browser executable is included in the app’s deployment output. Verify both in the deployed app. Installing dependencies locally, or during a build step that does not affect the final runtime image, is not enough.
#1 Best Overall
- INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
- COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
- ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
- HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs
Custom Linux container
Use a custom container when the managed environment or deployment process cannot supply the OS packages or local browser binaries your app needs. Microsoft specifically calls out OS-level packages and local binaries as cases requiring custom-container deployment in its Python Functions deployment guidance. That Python-specific advice is not a universal instruction for every language or plan: check the deployment requirements for your own combination.
For containerized Function Apps on Premium or Dedicated plans, Microsoft’s deployment guidance documents configuring the container image and setting WEBSITES_ENABLE_APP_SERVICE_STORAGE=false. Follow the relevant Functions container documentation for the plan and language; do not assume those settings apply unchanged to other hosting options.
Install Playwright and Chromium for the Linux target
Use a Linux build environment compatible with the deployed runtime. Add Playwright to the application’s normal dependency manifest and pin compatible versions there, so upgrades to the package and browser can be reviewed and deployed together. In a Linux build environment with package-manager access, Playwright documents these Chromium installation commands:
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →npx playwright install-deps chromiuminstalls Chromium’s operating-system dependencies.npx playwright install --with-deps chromiuminstalls Chromium and its dependencies.
These commands are useful only if the resulting dependencies and browser files are available in the deployed runtime. Rebuild the browser layer when upgrading Playwright, and confirm that the final image or app package contains what the browser needs. See Playwright’s browser installation documentation.
Example: Node.js HTTP-triggered function
The following example uses the Node.js Functions programming model and the playwright package. It accepts a URL, limits navigation to hostnames configured in PDF_ALLOWED_HOSTS, renders a PDF using print CSS, and returns it with a PDF content type. Configure an allow-list appropriate to your application; accepting arbitrary URLs from callers can expose internal services and let a request consume excessive resources.
Rank #2
- CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
- INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
- LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
- PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
- ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴
package.json
{
"name": "playwright-pdf-function",
"version": "1.0.0",
"private": true,
"main": "src/functions/*.js",
"scripts": {
"start": "func start"
},
"dependencies": {
"@azure/functions": "^4.0.0",
"playwright": "^1.0.0"
}
}
Replace the broad Playwright version range with a version you have checked against your chosen Functions runtime and Linux deployment image. Install dependencies and commit the resulting lockfile so deployments resolve a reproducible package tree.
src/functions/pdf.js
const { app } = require('@azure/functions');
const { chromium } = require('playwright');
app.http('pdf', {
methods: ['GET'],
authLevel: 'function',
handler: async (request, context) => {
const rawUrl = request.query.get('url');
if (!rawUrl) {
return { status: 400, jsonBody: { error: 'Provide a url query parameter.' } };
}
let target;
try {
target = new URL(rawUrl);
} catch {
return { status: 400, jsonBody: { error: 'The url parameter is not a valid URL.' } };
}
if (!['http:', 'https:'].includes(target.protocol)) {
return { status: 400, jsonBody: { error: 'Only http and https URLs are allowed.' } };
}
const allowedHosts = (process.env.PDF_ALLOWED_HOSTS || '')
.split(',').map(host => host.trim().toLowerCase()).filter(Boolean);
if (!allowedHosts.includes(target.hostname.toLowerCase())) {
return { status: 403, jsonBody: { error: 'This hostname is not allowed.' } };
}
let browser;
try {
browser = await chromium.launch();
const page = await browser.newPage();
page.setDefaultNavigationTimeout(30000);
await page.goto(target.href, { waitUntil: 'domcontentloaded' });
const pdf = await page.pdf({ format: 'A4', printBackground: true });
return {
status: 200,
headers: {
'content-type': 'application/pdf',
'content-disposition': 'attachment; filename="page.pdf"'
},
body: pdf
};
} catch (error) {
context.error('PDF rendering failed', error);
return { status: 502, jsonBody: { error: 'The page could not be rendered as a PDF.' } };
} finally {
if (browser) await browser.close().catch(error => context.error('Browser close failed', error));
}
}
});
This is a compact function example, not a deployment recipe for every hosting plan. Supply PDF_ALLOWED_HOSTS as a comma-separated list of permitted hostnames in the Function App configuration. The function uses a function-level authorization setting; configure and distribute its key securely. Apply request-size, execution-time, and output-size controls appropriate to your workload as well.
Package Chromium in a container when needed
When the managed image or build route cannot provide the necessary browser and libraries, build a custom container based on the Azure Functions image for your selected Node.js runtime. In that Linux build environment, install the app’s pinned dependencies and Chromium with Playwright’s documented command, for example:
npm ci
npx playwright install --with-deps chromium
Those commands show the Playwright installation step, not a complete Dockerfile: select the Azure Functions base image and container settings for your runtime and plan using Microsoft’s deployment documentation. Avoid copying browser files from a different OS or architecture and assuming they will launch. For a .NET isolated Linux app, Microsoft documents FUNCTIONS_WORKER_RUNTIME=dotnet-isolated and a Linux linuxFxVersion identifier such as DOTNET-ISOLATED|8.0; those are .NET settings, not settings for the Node.js sample.
Load the page and choose the PDF’s layout
Playwright’s page.pdf() returns PDF bytes and uses print CSS media by default. The Playwright Page API reference states that it generates a PDF of the page with print CSS media. If you want the page’s screen styles instead, call await page.emulateMedia({ media: 'screen' }) before page.pdf().
Rank #3
- SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
- INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
- KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
- PREMIUM SUPPORT - Strong technical expertise to solve issues faster
- THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
Choose a readiness condition deliberately
The sample waits for domcontentloaded, which means the document has been parsed, not that every image, API-driven component, or delayed element is ready. If the content you need appears later, wait for an appropriate selector or a known application readiness signal before generating the PDF. networkidle can be unsuitable for pages that maintain ongoing requests; do not use it automatically as a universal definition of “ready.”
Recommended Free Tools
Set paper, backgrounds, and print CSS
The sample uses A4 paper and printBackground: true. page.pdf() supports page format, dimensions and margins using physical units, as well as page ranges and landscape output. Set those options to match the document you need. Use CSS print rules for page breaks and print-specific margins when the page design calls for them.
Playwright modifies colors for printing by default. If exact color rendering matters, the API documentation describes using the CSS property -webkit-print-color-adjust. Test the resulting document against the target page rather than assuming its screen appearance will carry over unchanged.
Return the PDF or store it durably
For a modest document that should be downloaded immediately, return the PDF bytes with Content-Type: application/pdf and a suitable Content-Disposition filename, as in the sample. The bytes returned by page.pdf() are held in memory while the function constructs the response.
If output must outlive the HTTP request, or the document is too large for your response design, store the PDF in durable object storage and return a status or download reference instead. Protect stored files and references according to your application’s access-control needs, and clean up temporary files or expired outputs. Azure Functions infrastructure guidance identifies a Storage account as required for a Function App and Application Insights as recommended; neither replaces the application’s own storage and retention design.
Rank #4
- Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
- No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
- Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
- Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
- The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
Deploy and verify on Azure
- Confirm the runtime and worker model. Set the worker/runtime configuration for the language you selected. For .NET isolated on Linux, Microsoft documents
FUNCTIONS_WORKER_RUNTIME=dotnet-isolatedand a Linux runtime identifier throughlinuxFxVersion. Do not apply these .NET values to Node.js or Python. - Deploy the browser dependencies with the app. Ensure the browser executable and shared libraries are in the actual runtime environment, whether supplied through an appropriate managed build or a custom container.
- Check the Linux app configuration. Microsoft’s Linux configuration guidance includes
kindcontainingfunctionapp,linux,reservedset totrue, andlinuxFxVersionset to the applicable runtime identifier. Use the values required for the chosen language and current Azure setup. - Invoke a known, small page. Confirm that the response has a PDF content type and that the body opens as a valid PDF. Test print and screen media separately if both matter.
- Review logs and resource behavior. Look for missing shared libraries, browser launch failures, navigation timeouts, and memory pressure. Playwright documents that pages can crash from high memory allocation, but there is no universal concurrency or memory limit established for this workload; measure and constrain it in your own deployment.
A local success is not proof of a working Azure deployment: the deployed runtime may differ in libraries, browser files, architecture, or filesystem behavior. Recheck Microsoft’s current lifecycle and supported-runtime guidance when selecting or upgrading a Functions runtime.
Or skip the browser setup
If your requirement is a clean website capture rather than a custom Playwright-controlled document workflow, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a screenshot or PDF; the request below saves a WebP 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, including PDF output. Cookie and consent banners are accepted as a visitor and removed along with 60+ known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. For a custom browser automation flow, page-specific readiness logic, or precise print-CSS handling, keep the Playwright approach above.
Create a free ScreenshotNeo account to get 1,000 screenshots a month with no card.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsFrequently Asked Questions
Does Playwright create the PDF in Azure, or does Azure Playwright render it for the function?
The function runs Playwright’s browser process and calls page.pdf() to create the document. Microsoft describes Azure Playwright as a managed service for running Playwright tests at scale with reporting, not as a PDF-rendering endpoint.
Can the same approach use Python or .NET?
Yes, but each language needs its own Functions programming model, Playwright package setup, worker/runtime configuration, and deployment instructions. Verify current Linux support and lifecycle guidance for the specific runtime before adapting the example.
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.

