How to Convert an MHTML to PDF
Open an MHTML file in Chrome, Edge, or Firefox, print it to PDF, fix layout issues, and automate web-page PDFs with ScreenshotNeo.
Open the .mhtml or .mht file in a browser, print it, choose a PDF destination such as “Save as PDF,” review the preview, and save. This works because MHTML is a single-file web archive that packages a page with resources such as CSS and images. The PDF is a newly rendered, paginated output, so it can differ from the archive’s screen view.
Chrome, Edge, and Firefox all expose a print-to-PDF path. Use the browser that renders your archive correctly, then check the saved PDF for missing assets, page breaks, and selectable text.
What MHTML contains and why PDF output can change
MHTML (also called MHT) bundles a web page and its dependent resources into one file. Chrome’s page-capture documentation describes it as a standard format supported by most browsers and explains that CSS and images can be encapsulated in the archive: Chrome browser.pageCapture documentation.
Printing is a layout step, not a byte-for-byte conversion. The browser applies paper size, margins, scale, page breaks, headers and footers, and background-graphics settings. A long page may therefore span several pages, and content positioned for a screen can move or split.
Convert MHTML to PDF in Chrome
- Open Chrome and load the local
.mhtmlor.mhtfile. Use Chrome’s Open command or drag the file into a window if double-clicking uses the wrong application. - Choose File → Print, or press Ctrl+P on Windows/Linux or Command+P on macOS.
- In the print preview, select the available PDF destination, commonly Save as PDF. The exact label depends on your operating system and installed print destinations. See Google’s Chrome printing guide.
- Set the page range, layout, paper size, margins, scale, and background graphics. Use the preview to spot clipping and unwanted blank pages.
- Click Save, choose a filename and folder, then open the resulting PDF and inspect it.
Chrome settings that affect the result
- Layout: portrait usually suits documents; landscape helps wide tables.
- Scale: lower it when columns are clipped; raise it when text is too small, while watching for extra pages.
- Margins: default or custom margins change the printable width and page breaks.
- Background graphics: enable them when the archive relies on colored backgrounds or visual styling; disable them to reduce ink and file size.
- Pages: print all pages or a custom range when you need only part of the archive.
Convert MHTML to PDF in Microsoft Edge
- Open the local MHTML file in Edge.
- Select Settings and more → Print, or press Ctrl+P on Windows or Command+P on macOS.
- Choose the PDF destination exposed by the print dialog, such as a Save-to-PDF destination.
- Review pages, margins, scale, headers and footers, and background graphics. Edge supports all, odd, even, or custom page ranges; default, none, minimum, or custom margins; fit-to-printable-area, actual-size, or custom scale; optional date/page-number headers and footers; and background graphics. These controls are described in Microsoft’s Print in Microsoft Edge documentation.
- Save the PDF, open it, and verify pagination, images, links, and text.
Convert MHTML to PDF in Firefox
- Open the MHTML file in Firefox if your installed build renders it.
- Open the print command from the menu or press Ctrl+P/Command+P.
- In Destination, choose Save to PDF, then set the available page and layout options and save.
Mozilla documents the Destination → Save to PDF workflow in its general web-print guide. Rendering support can vary by build, so confirm that the archive displays completely before relying on Firefox for a particular file.
Quality checklist before you share the PDF
- Every image, font, and stylesheet that appeared in the browser preview is present.
- Headings, tables, and code blocks are not split or clipped at page boundaries.
- Links still work and text can be selected and searched.
- Headers, footers, dates, and page numbers are either useful or disabled.
- Background colors and images match your intended output.
- The page range contains exactly the content you intend to distribute.
- The PDF opens in a second viewer, if the file is business-critical.
Common problems and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| The file opens as text or in the wrong app | File association or browser choice | Use the browser’s Open command or drag the file into a browser window. Try the other supported browser. |
| Images or styles are missing | The archive did not contain the resource, or the browser failed to resolve it | Confirm the MHTML itself renders correctly before printing. If it is incomplete in preview, the PDF will normally be incomplete too. |
| Print preview will not load in Edge | Temporary browser or print-preview failure | Retry the print command and restart Edge, as Microsoft recommends in its Edge print troubleshooting guidance. Try another browser if needed. |
| Text or tables are cut off | Content is wider than the paper area | Switch to landscape, reduce scale, choose fit-to-printable-area, or use custom margins. Recheck every page. |
| Colors disappear | Background graphics are disabled | Enable background graphics in the print dialog, then preview again. |
| Unexpected blank pages | Scale, margins, or page-break behavior | Adjust scale and margins, then print a smaller page range to isolate the break. |
| Firefox does not display the archive | Version-specific MHTML compatibility | Use Chrome or Edge for that file, or open it in the browser that originally rendered it. |
Privacy, reliability, and file-size considerations
Browser printing keeps the local archive on your computer. A web converter would require uploading it, so review that service’s privacy and retention terms before using one for confidential material. For repeatable results, record the browser version and print settings alongside the source archive.
PDF size depends on embedded images, backgrounds, fonts, and the number of pages. Disabling backgrounds and printing only the required range can reduce size. Keeping backgrounds enabled preserves visual fidelity when they carry meaning.
Or skip the browser setup
For a web page that is available by URL, ScreenshotNeo can return a screenshot or PDF through one GET request. It is not a way to upload a private local MHTML file; use the browser workflow above for local archives. See the ScreenshotNeo API docs for PDF options and request details.
# 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}`);
Before capture, ScreenshotNeo accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports the outcome in X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Create a free ScreenshotNeo account to try 1,000 screenshots per month without a card.
FAQ
Is MHTML the same as PDF?
No. MHTML is an archive of a web page and its resources; PDF is a paginated rendering produced by a print or conversion engine.
Will converting MHTML to PDF preserve links?
Usually, browser printing can preserve selectable text and links, but verify the saved file because archive content and browser versions differ.
Can I convert an MHTML file without installing software?
Yes, if a browser already installed on your computer opens the file and exposes a Save-to-PDF destination.
Which browser should I choose?
Choose the browser that renders the archive completely and gives you the print controls you need. If one fails, compare its preview with another browser.


