Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

“No data” is a symptom, not a diagnosis. On shared hosting it can mean that no PDF was created, the file is zero bytes, the PDF has blank pages, or your wrapper reported failure even though it wrote a file. Start by identifying which result you have, then trace the conversion through five stages: binary loading, process execution, input fetching, linked-resource loading, and output writing. The exact error and environment determine the fix; there is no universal shared-hosting switch.

First, define what “no data” means

Run the failing conversion manually, or add equivalent logging around your wrapper. Save the complete command, standard output, standard error, exit status, and the output path. Also record:

  • wkhtmltopdf --version from the same account and application context.
  • The operating system or runtime details exposed by your host.
  • The wrapper, framework, queue worker, or language process invoking wkhtmltopdf.
  • Whether the input is a local HTML file or an HTTP/HTTPS URL.
  • Whether the output exists, its byte size, and whether a PDF reader reports blank or damaged pages.

The command-line interface accepts one or more page inputs followed by an output file. A wrapper may change the working directory or output location, so an apparently missing PDF can simply be written somewhere other than the path you are checking.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Interpret the result

Observed result Likely stage to inspect
No output file Binary loading, execution, input handling, permissions, or an incorrect output path
Zero-byte file Process failure before PDF finalization or inability to write the destination
PDF opens but pages are blank Input HTML, scripts, styles, images, fonts, or network access
Wrapper says failure while a PDF exists Exit-status handling, stderr parsing, timeout, or a wrapper-specific path/permission issue

Check that the binary can run on the host

Run the version command as the application user

Execute wkhtmltopdf --version through the same account, PHP-FPM pool, SSH user, cron job, or queue worker that performs conversions. A binary that works in an interactive shell may not work in the web process because the users, environment variables, PATH, and filesystem permissions differ.

Read loader errors literally

If stderr says a shared library cannot be loaded, conversion has not started. Project reports include loader failures for libXrender.so.1 and libjpeg.so.8; these are examples, not a complete dependency list. The required library depends on the binary build and host runtime.

Do not copy random libraries into your account or replace system files on shared hosting. Ask the provider whether that wkhtmltopdf build is supported and whether its required runtime libraries are installed. Give support the binary version, architecture if known, and the exact loader message.

Prove that the input is reachable from the conversion process

Compare a local file with a URL

A page displayed in your desktop browser does not prove that the server-side process can fetch it. Create a minimal, readable local HTML file and convert it:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
printf '<html><body><h1>wkhtmltopdf test</h1></body></html>' > /tmp/test.html
wkhtmltopdf /tmp/test.html /tmp/test.pdf
ls -l /tmp/test.pdf

If the local file works but a URL fails, inspect stderr for DNS or host-not-found messages, connection refusal, redirects, HTTP status failures, protocol errors, and TLS errors. One documented project issue describes a temporary local page failing when requested over HTTP with “Connection refused” while a local file path worked. That pattern points to server networking or binding, not PDF rendering.

Test the exact URL and redirect chain

Use the same URL your application supplies, including its scheme and path. A site that redirects HTTP to HTTPS, requires authentication, blocks the host’s IP, or only listens on a private interface can fail from the conversion server. If you control the application, log the final URL and response status before invoking wkhtmltopdf. If you do not control outbound networking on the account, ask the host whether external HTTP/HTTPS requests are permitted.

Check linked resources and browser-like access

HTML can arrive successfully while its CSS, images, fonts, scripts, or frames fail. A resulting PDF may therefore contain a page shell, blank content, or unstyled text. Look for resource-specific messages in stderr rather than treating the existence of a PDF as proof that every resource loaded.

Local-file access

If your document references local images, stylesheets, or fonts, verify that the conversion account can read each path. wkhtmltopdf has local-file access options documented by the project. Enable only the access your application requires: broad local access can expose files that the rendering process should not be able to read.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

JavaScript-dependent pages

For pages that render content after JavaScript runs, confirm that the page actually produces content before the converter exits. Use an explicit wait condition or delay supported by your wrapper, and capture stderr. A timeout or script error can leave a valid-looking but empty document.

Verify permissions, temporary directories, and paths

The executing account needs permission to execute the binary, read the input and linked local resources, create temporary files, and write the final destination. Check:

  • The absolute path to the wkhtmltopdf executable.
  • Read permission on the HTML input and referenced local assets.
  • Execute permission on the binary and every directory needed to reach it.
  • Write and search permission on the temporary directory used by the wrapper.
  • Write permission on the destination directory.
  • Available disk quota and inode quota.

Use absolute paths in production and log them. A community deployment report investigated the executable, temporary directory, and HTTP-to-HTTPS handling together; its permission values and replacement steps were application-specific, not a standard shared-host fix.

Separate application fixes from host restrictions

Failure evidence Who can change it Next action
Missing shared library or incompatible binary Usually hosting provider Request a supported build or runtime package
Connection refused, DNS failure, or blocked outbound request Provider or network administrator Ask whether outbound/local HTTP access is allowed; use a reachable input
Permission denied on input, temp, or output Application configuration, sometimes provider policy Correct paths and account permissions; verify quotas
Wrong output path or wrapper exit-status handling Application Log the resolved path, exit code, stdout, and stderr
Missing images, fonts, or CSS Application and page configuration Fix resource URLs or narrowly configure local-file access

A repeatable diagnostic procedure

  1. Capture the exact command, all output streams, exit code, version, user, and paths.
  2. Confirm whether the output is absent, empty, blank, damaged, or merely reported as failed by a wrapper.
  3. Run wkhtmltopdf --version under the application identity.
  4. Convert a minimal local HTML file to a known writable temporary path.
  5. Convert the target URL and compare stderr with the local-file run.
  6. Inspect every external and local resource used by the page.
  7. Check execution, read, temporary, destination, quota, and network permissions.
  8. Send the host the binary build, exact command, complete error, missing library names, and paths requiring access.

Common errors and targeted fixes

“error while loading shared libraries”

Cause: The host lacks a library required by your binary, or the binary was built for a different runtime. Fix: Use a provider-supported build or ask the host to confirm the dependency; changing HTML will not solve a loader failure.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Connection refused” for a local HTTP page

Cause: The rendering process cannot reach the address or port, even though the page may work in a browser. Fix: Prefer a readable local file when appropriate, correct the bind address or URL, or ask whether local/outbound HTTP is restricted.

PDF exists but is blank

Cause: JavaScript did not finish, linked resources failed, authentication blocked content, or the page returned an empty response. Fix: inspect stderr and resource URLs, then add a narrowly scoped wait or access setting.

Wrapper reports failure but a file exists

Cause: The wrapper may treat warnings, timeouts, or a nonzero exit status as fatal. Fix: preserve stderr and exit status, validate the PDF separately, and review the wrapper’s timeout and path handling.

Works over SSH but not through the website

Cause: Different user, PATH, environment, permissions, or temporary directory. Fix: invoke the absolute binary path and log the web process identity and resolved directories.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When to stop debugging shared hosting

If the host cannot provide the required libraries, disallows executable binaries, blocks the page’s network path, or prevents suitable temporary storage, the limitation is contractual or architectural rather than an HTML bug. Ask support for a supported wkhtmltopdf build and permitted execution model. The available evidence does not establish a universal policy for current shared-hosting providers, so obtain a specific answer for your account.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a clean image or PDF of a URL rather than a local wkhtmltopdf deployment, ScreenshotNeo makes one API request. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing result in X-Page-Verdict and X-Billed headers. It also provides an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools.

See the complete parameter reference 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)
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}`);

Every plan includes full-page capture, element selection, device and viewport controls, retina scale, PDF settings, custom CSS and JavaScript, waits, request blocking, headers, cookies, user agent, timezone, geolocation, resizing, caching, signed links, asynchronous jobs, bulk capture, usage data, and an OpenAPI specification. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

FAQ

Can I fix every “no data” error by reinstalling wkhtmltopdf?

No. Reinstallation cannot repair blocked URLs, missing permissions, inaccessible resources, wrapper path errors, or provider restrictions. Capture stderr first.

Is a zero-byte PDF the same as a blank PDF?

No. A zero-byte file indicates that output was not finalized or written correctly; a blank PDF may be structurally valid but contain no rendered content.

Should I enable unrestricted local-file access?

Only when required and only for the paths the document needs. Broad access can expose files to the rendering process.

Frequently Asked Questions

Can I fix every “no data” error by reinstalling wkhtmltopdf?

No. Reinstallation cannot repair blocked URLs, missing permissions, inaccessible resources, wrapper path errors, or provider restrictions. Capture stderr first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is a zero-byte PDF the same as a blank PDF?

No. A zero-byte file indicates that output was not finalized or written correctly; a blank PDF may be structurally valid but contain no rendered content.

Should I enable unrestricted local-file access?

Only when required and only for the paths the document needs. Broad access can expose files to the rendering process.

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.