If a header is missing from a Wicked PDF, check the PDF render options first, then the header template, top margin and header spacing, resource access, JavaScript readiness, and the type of PDF page being generated. Wicked PDF uses the wkhtmltopdf utility, so the Rails render and the converter’s own environment both matter; there is no single fix that applies to every setup.
1. Confirm the PDF render includes a header option
Start at the controller or other code path that renders the PDF. Confirm that the PDF request actually passes a header setting to Wicked PDF. wkhtmltopdf accepts text in header fields such as header-left, header-center, and header-right, or an HTML header through header-html. Its manual summarizes the feature this way: “Headers and footers can be added to the document by the –header-* and –footer* arguments respectively.”
If the header is HTML, check that the template or content option is set and that the URL or path passed to the converter is the one you intend. Wicked PDF’s documentation shows header and footer template content being rendered for PDF generation. When a template is used without a layout, it must itself be a valid HTML document. A missing option, incorrect template reference, or incomplete document can leave the generated PDF without the expected header.
Isolate the header before debugging the full template
As a diagnostic step, temporarily use a short, static text header. If that appears in the PDF but the full HTML header does not, concentrate on the template’s markup, CSS, and referenced resources. If even the static header is absent, inspect whether the option reaches the PDF render, whether the page has enough top space, and whether the content is being rendered as a page type that supports headers.
#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
2. Adjust top margin and header spacing together
A header can be present but positioned beyond the page or obscured by the body. Check the top page margin and header spacing as a pair. header-spacing is the gap between the header and page content; wkhtmltopdf documents its default as 0 mm. The settings reference warns that excessive spacing can put the header outside the PDF page and points to margin.top as the dimension to adjust.
There is no universal margin or spacing value that fixes every document. The appropriate values depend on the page size, the height of the rendered header, and the body layout. Increase the top margin to reserve room where needed, and reduce spacing if the header is being pushed away from the content or beyond the page. Regenerate the PDF after each change and inspect the result for clipping or overlap.
- Header clipped or apparently absent at the top: inspect whether the top margin leaves room for the header.
- Header too far from the body or pushed off the page: reduce header spacing and reassess the top margin.
- Body overlaps the header: reserve more top margin, then check the spacing and rendered header height.
The manual also documents header-line and no-header-line. These options control a decorative line below the header; a line does not supply header content. Seeing—or not seeing—the line is therefore not proof that the header text or HTML is configured correctly.
3. Verify the HTML header and every resource it uses
Check that the HTML header is valid and reachable at the exact URL or path given to wkhtmltopdf. Then check its images, stylesheets, and fonts separately. A header document may load while one or more of its referenced files fail, making it appear blank or incomplete.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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⁴
Do not assume that a path available to a browser or to the Rails process is automatically available to the converter process. wkhtmltopdf controls access to local files through its options, including an allow-path option. If the header uses local assets, confirm that the converter’s local-file policy permits the specific files or directories it needs. Prefer granting access only to the necessary paths rather than making a broader change without checking the policy in use.
Interpret HTML debug mode carefully
Wicked PDF documents a show_as_html debugging path that lets you inspect the page as HTML. Use it to check the rendered page and template structure, but compare its appearance with the actual PDF. The project documentation notes that file-based asset URLs can be affected by browser cross-domain protections in this debug view. An asset missing in the browser view does not by itself prove it will be missing from the converter output; likewise, a successful browser preview is not a substitute for checking the generated PDF and converter diagnostics.
4. Check JavaScript timing and resource failures
If JavaScript creates or fills in the header, verify that JavaScript is enabled and that the converter waits for the content to be ready. The wkhtmltopdf manual documents JavaScript as enabled by default and a default JavaScript delay of 200 milliseconds. That default is not a guarantee that custom scripts, especially those waiting on asynchronous network requests, will finish in time.
Use a readiness condition or wait strategy suited to the application’s actual header-generation process. Increasing a delay blindly can make a capture slower without ensuring that the right content has loaded. Inspect converter output for failed template or asset requests as well. The settings reference documents configurable handling of load errors as abort, skip, or ignore. Those choices govern what happens after a resource fails; they do not make the resource load successfully.
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.
5. Check the page object and the converter actually in use
Confirm whether the missing header is on a normal page or a cover. The wkhtmltopdf manual says that a cover object does not have headers or footers. If the content is a cover, changing header spacing or repairing a header template will not make a header appear there; verify which PDF object should carry the header.
Also identify the wkhtmltopdf binary and build invoked by the Rails process. A shell session and an application service can resolve different executables or run with different environments. The manual documenting these settings identifies its program as wkhtmltopdf 0.12.6 with patched Qt; that describes the manual’s build, not necessarily the binary installed on your system. Check the actual executable and its version before applying assumptions tied to a particular build.
6. A focused troubleshooting sequence
- Verify the render option. Trace the PDF request and confirm it passes a text header option or the HTML header content and URL/path.
- Try static text. Temporarily replace the full header with a simple text header to separate option or layout problems from template problems.
- Inspect page geometry. Review top margin and header spacing together; change one value at a time and check for clipping or overlap.
- Check the HTML and its dependencies. Validate the header document, then verify every image, stylesheet, and font from the converter’s point of view.
- Check scripts and logs. Confirm JavaScript is enabled if needed, wait for the real readiness condition, and inspect converter warnings and failed loads.
- Verify page type and binary. Check that the content is not a cover object and identify the converter executable/build used by the Rails process.
- Compare debug HTML with the PDF. Use Wicked PDF’s HTML debug view to inspect markup, but rely on the generated PDF and converter diagnostics to confirm converter behavior.
Or skip the browser setup
If your goal is a clean website screenshot rather than a PDF with a Wicked PDF header, ScreenshotNeo can return a screenshot through one GET request. This does not repair a Wicked PDF render or add a header to its PDF; it is an alternative for screenshot capture. The API accepts a URL and can return PNG, JPEG, WebP, or PDF output. Before capture, it can accept the consent banner and remove known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides screenshot tools for AI agents.
For example, save a WebP capture of a page with cURL:
Free tools Windows power users keep installed
One-click scans. No signup required.
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 the request options and response details. ScreenshotNeo has a free plan with 1,000 shots per month and no card required; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
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
Common symptoms and what to check
| Symptom | Check first |
|---|---|
| No header of any kind appears | Confirm a header option is passed to the PDF render and that the page is not a cover. |
| Static text appears, but the HTML header does not | Inspect the HTML document, its URL/path, CSS, and each referenced asset. |
| The header is cut off or outside the page | Adjust top margin and header spacing together; inspect the resulting PDF. |
| Header content created by a script is missing | Check JavaScript enablement, readiness timing, and converter load diagnostics. |
| Assets differ between HTML debug view and PDF | Account for browser restrictions on file URLs; verify behavior in the actual PDF and converter output. |
Frequently Asked Questions
Can a header line create a missing header?
No. The line options control decoration below the header; header text or HTML must be supplied separately.
Is wkhtmltopdf’s 200 ms JavaScript delay enough for every header script?
No. It is the documented default delay, not a guarantee that asynchronous or application-specific work has finished.
Will ScreenshotNeo fix a missing Wicked PDF header?
No. It is a separate website screenshot API, not a repair for Wicked PDF’s Rails render or PDF layout.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →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.




