When text is missing from a PhantomJS screenshot, first determine whether PhantomJS loaded the text at all. Log resource requests and JavaScript errors, inspect page.plainText, and verify that the capture runs after the page’s content and fonts are ready. If plainText contains the words but the image does not, check the fonts visible to the account running PhantomJS. If content fails to load, fix navigation, scripts, resources, or timing instead. PhantomJS uses an old WebKit engine and its development is suspended, so migration may be the durable fix for sites that depend on modern browser behavior.
1. Verify the PhantomJS binary and capture path
Before changing page code, confirm that the process you are debugging is the one you think it is. PhantomJS troubleshooting guidance warns that multiple installations can result in a different executable being run than the developer expects.
which phantomjs
phantomjs --version
phantomjs --version 2>&1
Run the same checks under the service account, container, or CI user that creates screenshots. A shell user may have different fonts, environment variables, permissions, and PATH entries from the account used by a web worker.
The documented capture flow is to open a page and call page.render() after loading it. See the official screen-capture documentation.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
2. Determine whether the text exists before rendering
page.plainText exposes the main frame’s text without markup. Comparing it with the screenshot separates a loading problem from a rendering problem.
var system = require('system');
var webpage = require('webpage');
var page = webpage.create();
var target = system.args[1] || 'https://example.com';
page.open(target, function (status) {
console.log('open status: ' + status);
console.log('plain text:n' + page.plainText);
if (status !== 'success') {
phantom.exit(1);
return;
}
page.render('capture.png');
phantom.exit();
});
If the expected words are absent from plainText, changing fonts will not help yet. Investigate redirects, failed requests, JavaScript errors, authentication, and asynchronous application rendering. If the words are present in plainText but invisible in the image, focus on font availability, CSS, and the WebKit rendering environment.
3. Add network and JavaScript diagnostics
PhantomJS documents onResourceRequested, onResourceReceived, onResourceError, and onError for diagnosing failed loads and script errors. Add logging before calling page.open.
var webpage = require('webpage');
var page = webpage.create();
page.onResourceRequested = function (request) {
console.log('REQUEST ' + request.id + ' ' + request.method + ' ' + request.url);
};
page.onResourceReceived = function (response) {
if (response.stage === 'end') {
console.log('RESPONSE ' + response.status + ' ' + response.url);
}
};
page.onResourceError = function (error) {
console.log('RESOURCE ERROR ' + error.errorCode + ': ' + error.errorString);
console.log(' URL: ' + error.url);
};
page.onError = function (message, trace) {
console.log('PAGE ERROR: ' + message);
trace.forEach(function (item) {
console.log(' ' + item.file + ':' + item.line + ' ' + item.function);
});
};
Look for failed CSS or font requests, blocked cross-origin resources, DNS or TLS errors, redirects to a login page, and JavaScript exceptions that stop the application before it inserts text. A successful page.open callback does not prove that every application-specific request or delayed update has completed.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
4. Check settings and wait for the page’s actual ready condition
JavaScript and image loading are enabled by default in PhantomJS WebPage settings, and resourceTimeout limits how long a resource request may run. Set a timeout appropriate to your page and log when it expires.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
page.settings.javascriptEnabled = true;
page.settings.loadImages = true;
page.settings.resourceTimeout = 30000;
Do not choose a universal sleep value and assume it works for every site. Wait for a condition that represents the content you need, such as a known element or application flag. The following pattern polls for a selector and fails clearly if it never appears.
function waitForSelector(selector, maxWait, done) {
var started = Date.now();
var timer = setInterval(function () {
var found = page.evaluate(function (sel) {
return !!document.querySelector(sel);
}, selector);
if (found) {
clearInterval(timer);
done(true);
} else if (Date.now() - started > maxWait) {
clearInterval(timer);
done(false);
}
}, 100);
}
page.open(target, function (status) {
if (status !== 'success') {
phantom.exit(1);
return;
}
waitForSelector('#main-content', 30000, function (ready) {
if (!ready) {
console.log('Timed out waiting for #main-content');
phantom.exit(1);
return;
}
console.log(page.plainText);
page.render('capture.png');
phantom.exit();
});
});
Replace #main-content with a selector that is present only when the required text is available. If the site loads text after a network call, expose a page-side flag or wait for the final DOM state rather than an arbitrary delay.
5. Investigate missing fonts on the capture host
When extracted text is correct but pixels are blank, clipped, or replaced by unexpected glyphs, inspect the font environment. Check the family requested by CSS, whether the runtime account can read it, and whether a usable fallback is installed. Also check whether a web-font request appears in the resource log and whether it completed successfully.
A 2016 CentOS report titled “PhantomJS screenshots not showing text” described a machine with no installed fonts; the reporter said adding system fonts made text visible. That is a useful diagnostic lead, not proof that every invisible-text case is caused by fonts.
A separate PhantomJS issue comment described a Linux PDF case where installing local TTF files and running fc-cache -fv resolved that reporter’s rasterized-text problem. It concerned one environment and PDF output, so do not treat it as a universal package recipe.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
- Run font checks as the same user that runs PhantomJS.
- Confirm the CSS family name matches the installed font’s internal family name.
- Install a fallback family suitable for the target distribution, using that distribution’s current package documentation.
- Refresh the font cache when required, then restart the worker or container.
- Capture again and compare both
page.plainTextand the image.
Do not copy a package command from another Linux distribution without checking its repositories and security policy. The available evidence does not establish one font package or installation command that works everywhere.
6. Check CSS and rendering-specific causes
If fonts are present, inspect styles that can make text visually disappear:
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 minutecolorequal or close to the background color.opacity: 0,visibility: hidden, ordisplay: none.- Text positioned outside the viewport or clipped by
overflow: hidden. - Transforms, unusually large negative offsets, or zero-height containers.
- Web-font declarations or CSS features unsupported by PhantomJS’s WebKit engine.
Use page.evaluate to inspect computed styles for a specific element:
var details = page.evaluate(function () {
var el = document.querySelector('.headline');
if (!el) return null;
var style = window.getComputedStyle(el);
return {
text: el.textContent,
color: style.color,
background: style.backgroundColor,
display: style.display,
visibility: style.visibility,
opacity: style.opacity,
fontFamily: style.fontFamily,
fontSize: style.fontSize
};
});
console.log(JSON.stringify(details));
This does not prove that a font was rasterized correctly, but it can reveal an accidental hidden state or an empty element before you investigate the host.
7. Use a minimal reproduction
Create a page containing plain text, the target font, and the same viewport dimensions. Capture it with the same PhantomJS binary and service account. Then test progressively: plain system text, a local web font, the production stylesheet, and finally the full application. This isolates whether the failure is in PhantomJS itself, font discovery, CSS, a resource request, or application timing.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Record the PhantomJS version, operating system, viewport, device scale settings, URL, status, resource errors, and a copy of page.plainText. Those details make intermittent CI failures reproducible.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →8. Decide whether PhantomJS should be replaced
The PhantomJS homepage states: “Important: PhantomJS development is suspended until further notice.” PhantomJS’s capture API is built on WebKit, so modern CSS, JavaScript, and font behavior may differ from a current browser.
Migration is especially reasonable when:
- The target application requires browser features PhantomJS does not implement.
- Fonts load asynchronously and cannot be made reliable with your current wait logic.
- Failures appear only on contemporary sites or after a site redesign.
- You are spending more time maintaining workarounds than maintaining the capture pipeline.
Compare candidate automation engines against your actual site and pipeline: compatibility with required CSS and JavaScript, maintenance status, asynchronous-resource controls, authentication support, output formats, and operational complexity. The available references do not establish one universally best replacement, so validate a shortlist with representative pages.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF, so your application does not need a PhantomJS installation or a host-managed font stack.
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)
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}`);
See the ScreenshotNeo documentation for parameters and response handling. Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and whether the request was billed. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Recommended Free Tools
Common failures and fixes
“open status: fail”
Check DNS, TLS, redirects, proxy settings, authentication, and resource-error logs. Confirm the URL is reachable from the capture host, not only from your laptop.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
The page opens, but plainText is empty
Inspect JavaScript errors and navigation. The application may require a later API response, a cookie, or a login. Wait for a real content selector and verify that the expected frame is the main frame.
plainText contains text, but the image has no letters
Check installed fonts and permissions for the runtime account, then inspect computed color, opacity, visibility, and font requests. Reproduce with a minimal page.
Only some characters are missing
The selected font may lack those glyphs, or a fallback font may be unavailable. Inspect the requested family and install an appropriate fallback for the host.
It works locally but fails in CI
Compare executable paths, PhantomJS versions, user accounts, operating systems, font directories, network access, viewport settings, and timeout values. CI often uses a minimal image with no fonts.
Waiting longer changes nothing
A delay cannot repair a failed request, a JavaScript exception, unsupported WebKit behavior, or an absent font. Use logs and plainText to identify which class of failure you have.
Frequently Asked Questions
Does a successful PhantomJS page.open call guarantee that all text is ready?
No. It indicates that the initial navigation completed, but application data, web fonts, and later JavaScript updates may still be pending. Wait for the page-specific content condition and inspect the resulting text.
Should I install fonts or migrate immediately?
Install or verify fonts when text exists in page.plainText and the failure is limited to rasterized output. Consider migration when the target site depends on newer browser behavior or PhantomJS workarounds remain unreliable.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsCan PhantomJS render PDF text differently from PNG text?
Yes. Rendering paths can expose different font problems. A user report about Linux PDF output is a diagnostic example, not evidence of a universal PhantomJS rule.
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.

