HTMLをPDFに変換
保存したウェブページやテキストファイルをPDFに変換します。
このツールはブラウザーの中だけで動きます。ファイルがアップロードされることはなく、そのことはブラウザーのネットワークタブでご自身で確認できます。 ご自分で確かめてください。ブラウザーのネットワークタブを開いて見てください。残りの作業回数を尋ねる小さなリクエストが1つだけ表示されます。ツール名とハッシュだけで、ファイルは決して含まれません。
このツールでできること
This takes a saved .html or .htm file, or a plain .txt file, and lays its content out as a PDF. Headings, paragraphs, lists, tables and links are read from the document's structure and re-flowed onto the paper you choose. CSS is not executed, so the result reads correctly and does not look identical to the page in a browser. There is no field for a web address, and that is a decision rather than an omission: fetching a page for you would mean an outbound request from a tool that promises none.
Use it on a page you have already saved: an article kept for offline reading, a receipt or booking confirmation a site would only show you in the browser, documentation you want on paper, or an export from a tool that writes HTML and nothing else.
仕組み
- Save the page first. In any desktop browser, press Ctrl+S or Command+S and choose Web page, HTML only - the complete option saves a folder of assets this tool does not need.
- Drop the .html file onto this page. Plain .txt files work too, up to 20 files at a time.
- Choose the paper size, orientation and margins. Wide margins suit anything you intend to annotate by hand.
- Leave keep hyperlinks on so the page's links stay clickable in the PDF.
- Turn on page numbers for anything you plan to print and hand round.
- Press Convert and the PDF downloads.
The page is re-flowed from its structure, not rendered. A browser turns HTML into a picture by executing CSS - float, flex, grid, absolute positioning, media queries, web fonts - and shipping a layout engine into a browser tab to do that a second time is not a small addition. Instead the document is read as headings, paragraphs, lists, tables and links, and set with the same typography as every other conversion here. Two columns become one, and the article you wanted comes out readable.
That trade has a side effect people tend to like. Navigation, banners and sidebars are flattened into the flow along with everything else, so they arrive as plain lists and paragraphs rather than as furniture down the edge of the page. This is not reader-mode extraction and does not claim to be - text that was decoration is still text - but the article stops being a narrow column squeezed between two others.
Images are not embedded. A saved .html file usually points at its pictures rather than containing them, and going out to fetch them would be exactly the outbound request this tool exists to avoid. Text, tables, lists and links come through; pictures do not, including ones written into the file as data URIs. If the pictures are the point, save them separately and use Images to PDF.
The file is treated as hostile. A saved web page can carry script tags, inline event handlers and javascript: links, and all three are stripped in the parser before anything reaches the layout engine. Nothing in the page runs, and no link that ends up in the PDF can execute anything.
The missing URL box is worth one more sentence. To fetch a page for you, this site would have to make the request itself or route it through a proxy, and either way somebody's server learns which page you were reading. For a tool whose whole claim is that your document never leaves your device, that is not a trade worth making. Saving the page yourself takes one keystroke and keeps the request in your own browser, where it already was.
このツールにできないこと
- CSS is not executed, so colours, columns, positioning and web fonts are lost. The page is re-flowed as text, tables and lists.
- There is no URL field. Save the page to a file first; fetching it here would mean an outbound request on your behalf.
- Images are not embedded, including ones written into the file as data URIs. Text, tables and links come through.
よくある質問
- ファイルの代わりにURLを貼り付けられますか?
- できません。これは手が回っていない機能ではなく、意図して外してあります。ページを取りに行くとは、このサイト、あるいは間に入るCORSプロキシが、あなたに代わって通信するということです。それは誰かのサーバーに、あなたが読んでいたページを教えることになり、このツールが唯一している約束を壊します。Ctrl+Sでページを保存し、そのファイルをここにドロップしてください。
- PDFがウェブページと同じ見た目にならないのはなぜですか?
- スタイルシートを実行しないからです。読み取るのは文書の構造、つまり見出し・段落・箇条書き・表・リンクで、組版にはこのサイト自身のものを使います。色・段組み・配置・ウェブフォントは引き継がれません。手元に残るのは、選んだ用紙に読みやすく組まれた、そのページの内容です。
- ページの中の画像は引き継がれますか?
- いいえ。画像は埋め込まれません。保存した.htmlファイルは通常、画像を含んでいるのではなく参照しているだけで、それを取りに行けば外部への通信になるからです。テキスト・表・箇条書き・リンクはすべて変換されます。画像は、data URIとしてファイルに書き込まれているものも含めて省かれます。
- 変換できるようにウェブページを保存するには?
- WindowsならCtrl+S、MacならCommand+Sを押し、「完全」ではなく「ウェブページ、HTMLのみ」を選んでください。「完全」だと、このツールには不要な素材のフォルダーまで書き出されます。スマホでは、ブラウザーの共有メニューにあるファイルとして保存やダウンロードを探してください。保存できたら、そのファイルをこのページにドロップします。
- ページに関する情報がどこかへ送られることはありますか?
- ありません。ファイルのデコード・解析・レイアウトはすべてブラウザーの中で行われ、URL欄がないのはまさに、あなたに代わって通信が発生しないようにするためです。このページが取りに行くのはNotoのフォントだけで、それもこのサイト自身のオリジンから、しかもUnicodeの埋め込みをオンにしたときだけです。