Recommended Free Tools
Put the logo in the first page’s HTML, not in --footer-html. Give a first-page wrapper a fixed physical height, make it the positioning context, reserve space for the image, and absolutely position the logo inside that reserved area. Use matching paper size and margins in CSS and on the command line. This keeps the logo on page one only and works for both A4 and US Letter when the wrapper dimensions are changed with the paper size.
The reliable first-page pattern
The following pattern creates a one-page cover area. The wrapper establishes a containing block with a known height; the image is anchored to its bottom edge without affecting later document flow.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
@page { size: A4; margin: 12mm 12mm 16mm; }
html, body { margin: 0; padding: 0; }
.first-page {
position: relative;
box-sizing: border-box;
height: 297mm;
padding: 12mm 12mm 35mm;
}
.logo {
position: absolute;
left: 12mm;
right: 12mm;
bottom: 16mm;
width: auto;
max-width: calc(100% - 24mm);
max-height: 25mm;
object-fit: contain;
}
</style>
</head>
<body>
<section class="first-page">
<!-- first-page content -->
<img class="logo" src="logo.png" alt="Logo">
</section>
</body>
</html>
position: relative makes .first-page the containing block. The logo’s bottom value is therefore measured from that wrapper, rather than from an unpredictable page or the end of the text. The bottom padding keeps normal content clear of the image.
Set A4 or Letter geometry consistently
wkhtmltopdf 0.12.6 with patched Qt accepts paper-size and margin options such as --page-size, --page-height, --page-width, -T, -R, -B and -L. The CSS page box, wrapper height and command-line settings must describe the same sheet.
#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
A4
wkhtmltopdf
--page-size A4
--margin-top 12mm
--margin-right 12mm
--margin-bottom 16mm
--margin-left 12mm
input.html output.pdf
A4 is 210mm × 297mm, so the wrapper uses height: 297mm. The example’s 12mm top, left and right margins and 16mm bottom margin are repeated in the command.
US Letter
wkhtmltopdf
--page-size Letter
--margin-top 12mm
--margin-right 12mm
--margin-bottom 16mm
--margin-left 12mm
input.html output.pdf
For Letter, change the CSS to @page { size: Letter; } and change the wrapper height to 279.4mm. Keep the same margins in both places. You can also use explicit --page-height 279.4mm and a matching width, but do not mix an explicit command-line geometry with an unrelated CSS wrapper height.
Make a variable-height logo safe
Uploaded logos can be short and wide or tall and narrow. Constrain at least one dimension while preserving the source aspect ratio.
- Use
max-heightwhen the vertical footprint is the critical limit. - Use
max-widthwhen the logo must stay within the text column. - Use
height: autofor a normal image, orobject-fit: containwhen both dimensions are constrained. - Reserve bottom padding equal to the largest expected rendered logo height plus your desired clearance.
For a logo that should span the content width, replace the sizing rules with width: 100%; height: auto; inside a positioned bottom block. Increase the wrapper’s bottom padding to accommodate the tallest permitted upload. Otherwise, a tall image can overlap text even though its bottom edge is correctly anchored.
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
Using a dedicated bottom block
.first-page {
position: relative;
box-sizing: border-box;
height: 297mm;
padding: 12mm 12mm 42mm;
}
.logo-slot {
position: absolute;
left: 12mm;
right: 12mm;
bottom: 16mm;
height: 25mm;
}
.logo-slot img {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
}
This version gives every upload the same 25mm slot. object-fit: contain preserves the aspect ratio and centers the image within the slot without distortion.
Keep the logo on the first page of a longer document
Absolute positioning is tied to the wrapper’s containing block; it is not a general “bottom of every flowed PDF page” mechanism. Treat the cover as a separate fixed-height object, then start the remaining content after it.
<section class="first-page">
...cover content and logo...
</section>
<div class="after-cover">
...remaining document...
</div>
.after-cover {
page-break-before: always;
}
A deliberate page break prevents the next content block from being packed into unused space on the cover. Test both a short document and a multi-page document; a wrapper that looks correct in a one-page PDF can behave differently when following content flows across page boundaries.
Why the usual alternatives fail
--footer-html and footer options
wkhtmltopdf’s header and footer options are document-furniture features. A footer is designed to repeat on pages, so it does not express “only on the first page.” Putting this logo in the page HTML gives you a page-specific wrapper instead.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
position: fixed; bottom: 0
Do not rely on fixed positioning for this job. An issue report for wkhtmltopdf 0.12.4 describes a fixed bottom element appearing only on the last page and at the end of the text rather than at the physical page bottom. A fixed element may work in a browser preview and still fail in the PDF renderer.
Flexbox alignment
wkhtmltopdf uses an older rendering engine. A wkhtmltoimage issue reports no visible difference when display: flex, justify-content and align-items were added in the affected setup. Flexbox is therefore a poor foundation for a production PDF placement that must be exact. Use a positioned wrapper and physical units instead.
A hard-coded pixel offset
A value such as top: 700px can appear to work for one paper size, margin set and rendering scale. It is brittle when switching between A4 and Letter or changing margins. A bottom coordinate in millimetres follows the page geometry rather than one particular pixel output.
Image loading and content details that affect placement
- Use a local file path or a reachable URL that the wkhtmltopdf process can access. If the image is remote, verify that the conversion host can resolve and download it.
- Give the image an explicit or bounded size. An image whose intrinsic dimensions are discovered late can change the required reserved space.
- Keep the
altattribute even though it is not printed; it makes the source safer and more accessible when reused outside PDF conversion. - Do not place substantial flowing text after the absolutely positioned logo inside the cover and assume it will avoid the image. Absolute elements are removed from normal flow; the padding reservation is what prevents overlap.
Verification checklist
- Run the exact wkhtmltopdf build used in production; the documented current line is 0.12.6 with patched Qt, while reported fixed-position behavior involves older builds.
- Render A4 and Letter using the same margins in
@page, the wrapper and the command line. - Try a short, wide logo; a wide logo with transparent borders; and a tall logo. Confirm that no text enters the reserved block.
- Render a one-page input and a multi-page input separately. Add a deliberate page break after the first-page wrapper when the document continues.
- Inspect the generated PDF itself. Browser previews do not reproduce every wkhtmltopdf behavior, especially for fixed positioning and flexbox.
Troubleshooting
The logo is missing
Check the image path, file permissions and whether the conversion process can access the URL. Temporarily use a known local PNG, then restore the dynamic source. Also check that the image is not being hidden by a selector or a zero-sized parent.
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
The logo is too high or too low
Confirm that the wrapper height matches the selected paper size and that command-line margins match the CSS margins. Adjust the wrapper’s bottom value for clearance; do not compensate with an arbitrary pixel top value.
Text runs underneath the image
Increase the wrapper’s bottom padding or reduce the image’s maximum height. The reserved block must cover the largest rendered upload, not merely the logo used in your first test.
The logo appears on a later page
Inspect the wrapper’s height and page break. If the cover content itself exceeds one sheet, the wrapper cannot remain a single first-page object; shorten the cover or move material into the post-cover section.
Letter output clips the bottom
Use 279.4mm for the Letter wrapper and ensure the bottom margin is included consistently. A 297mm A4 wrapper on Letter paper places the bottom anchor beyond the sheet.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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 result differs between development and production
Compare wkhtmltopdf versions, patched-Qt builds, command-line margins, image files and fonts. Render with the production binary in an automated check and inspect the PDF rather than relying on a browser screenshot.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If your actual goal is a clean screenshot or PDF of a page rather than a locally authored wkhtmltopdf document, ScreenshotNeo provides a single API request. It accepts consent banners before capture 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 are not billed, and the response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers.
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 documentation for request options. The same request in Python is:
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}`);
ScreenshotNeo also offers an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. Every feature is on every plan; 1,000 screenshots per month are free with no card, and paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesWhen this method is the right choice
Use the fixed-height wrapper when you control the HTML and need a first-page-only logo in a PDF generated by wkhtmltopdf. It is explicit, paper-size-aware and independent of repeating footer machinery. If you need a logo repeated on every page, use a separately tested header/footer design instead; that is a different requirement from a first-page cover logo.
Frequently Asked Questions
Can I use the same CSS for A4 and Letter?
Use the same positioning rules and margins, but change the page size and wrapper height: 297mm for A4 and 279.4mm for US Letter.
Will this place a logo at the bottom of every PDF page?
No. It anchors the logo to the first-page wrapper. Repeating page furniture requires a separate header/footer approach and its own renderer-specific testing.
Why does a browser preview look right but wkhtmltopdf does not?
wkhtmltopdf’s older engine does not implement all modern CSS behavior consistently, particularly fixed positioning and some flexbox layouts. Always inspect the generated PDF.
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.

