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 →Use PDFShift’s wait_for option to make conversion wait until a page function reports that document.fonts.ready has resolved. The function must be globally available in the rendered page, and the wait uses part of PDFShift’s total conversion timeout.
Wait for the browser’s font-loading promise
document.fonts.ready resolves when the document’s fonts have finished loading. PDFShift’s documented approach is to set a flag when that promise resolves, then have a named global function return the flag. Set the request’s wait_for value to areFontReady. See PDFShift’s documentation for the current request options.
As an Amazon Associate I earn from qualifying purchases.
let allFontsAreLoaded = false;
document.fonts.ready.then(() => { allFontsAreLoaded = true; });
function areFontReady() {
return allFontsAreLoaded;
}
PDFShift polls the function until it returns a truthy value. A function that is not globally accessible to the rendered page, or a wait_for value that does not name it, will not provide the intended readiness signal.
Choose where to put the readiness code
If you can edit the page
Add the flag and function to the page’s JavaScript, ensuring the function is available globally when PDFShift evaluates it. Set wait_for to the function name, areFontReady.
#1 Best Overall
If you cannot edit the page
PDFShift says you can inject the readiness code through its javascript request parameter. The same requirements apply: the injected code must define the globally available function, and wait_for must reference that name.
Allow enough time for loading and conversion
The wait is not separate from the conversion deadline: PDFShift counts page loading, waiting, and PDF conversion toward its total timeout. Its Help Center article states limits of 30 seconds for free accounts and 100 seconds for premium accounts; these are vendor-stated account values, not guaranteed permanent limits. Check the current terms for your account. Time spent loading the page leaves less time for fonts and conversion.
Rank #2
A readiness function is useful beyond fonts. PDFShift describes it as a way for a page to signal that asynchronous work, such as chart rendering, has finished before conversion continues.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshoot fonts that are missing or inconsistent
- Check JavaScript and function scope. Confirm that JavaScript runs in the conversion and that
areFontReadyis globally available in the rendered page context. - Wait on font readiness, not an arbitrary delay. The
document.fonts.readypromise ties the signal to font loading rather than an assumed number of milliseconds. - Check the total timeout budget. Page load, the readiness wait, and PDF generation all use the same overall conversion time.
- Make font delivery more reliable if needed. PDFShift’s guidance suggests trying locally hosted or base64-encoded fonts when remote custom fonts remain unreliable.
Or skip the browser setup
If the goal is to get a clean website screenshot rather than a PDFShift PDF, ScreenshotNeo is a screenshot API and MCP server for developers. Its one-call API can return a screenshot or PDF:
Rank #3
- hole punched
- high quality card stock
- 4 pages
- made in USA
- keyboard shortcuts
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. It accepts cookie/consent banners and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Sign up free for 1,000 screenshots a month, with no card required.
Quick Recap
Rank #4
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.




