Recommended Free Tools
To remove printed table-of-contents pages, remove the standalone toc object from the wkhtmltopdf command or library object sequence. Use wkhtmltopdf input.html output.pdf, not wkhtmltopdf toc input.html output.pdf. If the unwanted item is the PDF viewer’s bookmark sidebar, disable the separate global outline with --no-outline.
First identify which “table of contents” you want to remove
wkhtmltopdf uses the word “TOC” for two different PDF features. A generated TOC object creates one or more printed pages, usually at the beginning of the document. Independently, wkhtmltopdf can write an outline, which PDF viewers display as bookmarks in a navigation pane. Removing one does not automatically remove the other.
| What you see | What creates it | Correct control | Result |
|---|---|---|---|
| Printed contents pages in the PDF | A standalone toc object in the input sequence |
Omit that object | No generated contents pages |
| Bookmarks or a navigation outline in a PDF viewer | The global PDF outline setting | Use --no-outline or set global outline to false |
No outline entries in the viewer |
| Both | Both features enabled | Omit toc and disable the outline |
No printed TOC and no bookmark sidebar |
Look at the PDF itself before changing options. If you can scroll through a contents page, change the object sequence. If the page is absent but a left-hand bookmarks pane remains, change the outline setting.
Remove printed TOC pages from the command line
Use a normal page object sequence
A basic conversion with no generated TOC is:
wkhtmltopdf input.html output.pdf
The command has one page object, input.html, followed by the output file. There is no toc object, so wkhtmltopdf has nothing to render as contents pages.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
- READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
- CREATE, COMBINE, SCAN and COMPRESS PDFs
- FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
- LIFETIME License for 1 Windows PC or Laptop. 5GB MobiDrive Cloud Storage Included.
What creates the unwanted pages
This command explicitly requests a TOC object:
wkhtmltopdf toc input.html output.pdf
Delete the toc token rather than trying to hide its heading, change its caption, or reduce its font size. The TOC is an object in the command’s sequence, not a CSS block inside your source HTML.
Commands with several document objects
Object order matters when you have a cover, chapters, or several HTML files. For example:
wkhtmltopdf cover cover.html toc chapter-1.html chapter-2.html book.pdf
To keep the cover and chapters but remove the generated contents pages, use:
wkhtmltopdf cover cover.html chapter-1.html chapter-2.html book.pdf
Do not remove the chapter objects themselves. Only remove the standalone toc object. If a build script constructs the command as an array, remove the array entry that contains exactly toc and leave the surrounding page objects in their original order.
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 →Remove only PDF bookmarks (the outline)
If the PDF has no printed TOC but still opens with bookmarks, keep your page objects and disable the global outline:
Rank #2
- Edit PDFs with Ease. Modify text, images, and layouts directly within your PDF documents.
- Convert & Organize. Export PDFs to Word, Excel, or ePub, and organize files with ease.
- Read & Annotate. Enjoy intuitive reading modes and powerful tools to comment, highlight, and mark up PDFs.
- Create & Manage PDFs. Create new PDFs, combine multiple files, scan documents, and compress for easy sharing.
- Fill & Sign Forms. Complete forms and digitally sign documents with secure e-signature tools.
wkhtmltopdf --no-outline input.html output.pdf
This option affects the outline stored in the PDF file. It does not suppress printed contents pages created by a toc object. To remove both features, omit toc and add --no-outline:
wkhtmltopdf --no-outline input.html output.pdf
That example already has no TOC object; with a multi-object command, apply the same rule while retaining every required page object:
wkhtmltopdf --no-outline cover cover.html chapter-1.html chapter-2.html book.pdf
Option spelling can vary in downstream packages. Run the executable installed on the machine with:
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 →wkhtmltopdf -H
The project’s documentation states that the automatically generated help is the same manual shown by that command. Use it to confirm that your build supports --no-outline before changing a deployment script.
How the library settings map to the two features
The TOC object is object-level
In the libwkhtmltox model, a PDF object has a TOC settings structure and fields including tocXsl. The documentation describes tocXsl as selecting a table-of-content object. In a library integration, do not create that object when you do not want printed contents pages. Removing a style, caption, or XSL customization while still creating the object does not remove the pages.
Rank #3
- Create and edit PDFs. Collaborate with ease. E-sign documents and collect signatures. Get everything done in one app, wherever you go.
- Edit text and images without jumping to another app.
- E-sign documents or request e-signatures on any device. Recipients don’t need to log in to e-sign.
- Convert PDFs to editable Microsoft Word, Excel, or PowerPoint documents.
- Share PDFs for collaboration. Commenting features make it easy for reviewers to comment, mark up, and annotate.
The outline is global
PdfGlobal.outline controls whether wkhtmltopdf generates the outline placed in the PDF file. Set this global value to false when the requirement is “no bookmarks.” This setting is separate from the object list, so turning it off does not remove a printed TOC object.
Why includeInOutline is not the TOC switch
PdfObject.includeInOutline controls whether that object’s sections participate in outline or TOC collection. It is not the switch for removing a separately generated TOC object. If you leave a TOC object in the sequence, changing includeInOutline can alter outline participation without preventing the TOC pages from being rendered.
Common failed fixes and the precise correction
“I changed the TOC caption, but the pages remain”
Caption, dotted-line, indentation, and font-scale settings customize the appearance of an existing TOC. They do not disable it. Remove the object from the command or object sequence.
“I set includeInOutline to false, but the TOC is still printed”
That field concerns outline participation for a PDF object. Omit the standalone TOC object for printed-page removal; use the global outline setting separately for bookmarks.
“--no-outline did nothing”
Check whether your symptom is printed pages rather than bookmarks. The switch cannot remove pages that were generated by toc. Also run wkhtmltopdf -H to verify the option in the installed build and make sure the option appears before the input and output arguments.
Rank #4
- Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
- EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
- READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
- CREATE, COMBINE, SCAN and COMPRESS PDFs.
- FILL forms & Digitally Sign PDFs. Work with Digital certificates
“The command still shows a TOC after I edited it”
Inspect the actual command emitted by your wrapper, CI job, or shell script. A configuration file or helper may be adding toc after your arguments. Log the final argument list, remove that token, and regenerate the PDF into a new output path so you are not opening an older file.
“Bookmarks disappeared, but I wanted to keep them”
Remove --no-outline and leave the global outline setting enabled. You can omit the printed TOC object while retaining bookmarks generated from document headings.
“The option works locally but not in production”
Different distributions and downstream builds may package different wkhtmltopdf versions or patches. Compare wkhtmltopdf -H output and the executable version in both environments. Keep the object sequence and outline decision explicit rather than relying on defaults.
A safe, repeatable workflow
- Classify the symptom. Open the PDF and determine whether the unwanted material is printed pages, bookmarks, or both.
- Find the final command or object list. Check the wrapper or job that actually launches wkhtmltopdf, not only a template configuration.
- Remove the TOC object. Delete the standalone
tocentry while preserving covers and content objects. - Decide on bookmarks independently. Add
--no-outlineor setPdfGlobal.outlineto false only when the navigation outline should also disappear. - Confirm supported options. Run
wkhtmltopdf -Hon the target machine and record the package version. - Regenerate and inspect. Use a fresh output filename, check the first pages, and open the viewer’s navigation pane to verify the intended result.
Version and security considerations
The project’s official downloads page identifies 0.12.6 as its stable series and gives June 11, 2020 as its release date. That page status does not guarantee that every operating-system package or downstream fork is identical, so verify the binary actually deployed in your environment.
The same official page warns: “Do not use wkhtmltopdf with any untrusted HTML – be sure to sanitize any user-supplied HTML/JS, otherwise it can lead to complete takeover of the server it is running on!” Treat HTML, JavaScript, local files, headers, and URLs supplied by users as untrusted. Sanitize them before conversion, isolate the conversion process where appropriate, and avoid assuming that removing a TOC changes this security risk.
Best Value
- ALL-IN-ONE SOLUTION – read, edit, convert, merge and protect your PDF files
- MAXIMUM FUNCIONALITY – create interactive forms, compare PDFs, bates numbering, find and replace text or colors, convert documents, OCR engine, comment, highlight, fill out and print forms, document protection and others
- EASY TO INSTALL AND USE – well-structured user-interface, in-program instructions, free tech support whenever you need it
- GREAT VALUE FOR MONEY - why spend a fortune if you can have maximum functionality at a reasonable price - this also fits the requirements of companies very well
When a screenshot API is a better fit
wkhtmltopdf is appropriate when you need a PDF and control over its document objects. If the actual deliverable is a clean image of a web page, setting up a browser renderer can be unnecessary. ScreenshotNeo is a website screenshot API and MCP server; it is not a replacement for wkhtmltopdf’s PDF outline controls, but it can provide a direct image request for web capture.
Or skip the browser setup
ScreenshotNeo accepts one GET request and returns a PNG, JPEG, WebP, or PDF. Before capture it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports its status in X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
See the ScreenshotNeo documentation for authentication and all options. A minimal cURL request is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in 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)
And in 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}`);
The service includes full-page capture with lazy images loaded, CSS-selector element capture, device presets or custom viewports, dark mode, retina scale, custom CSS and JavaScript, waits, request blocking, headers, cookies, user agents, authorization, geolocation, time zones, transparent backgrounds, resizing, caching, signed image links, asynchronous jobs, webhooks, bulk capture for up to 100 URLs per call, usage reporting, and an OpenAPI specification.
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 problemsThere is a free allowance of 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try it without a card.
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.




