HTML เป็น PDF
แปลงหน้าเว็บที่บันทึกไว้หรือไฟล์ข้อความให้เป็น PDF
เครื่องมือนี้ทำงานในเบราว์เซอร์ของคุณทั้งหมด ไฟล์ของคุณไม่ถูกอัปโหลดเลย และคุณตรวจสอบได้เองในแท็บเครือข่ายของเบราว์เซอร์ ตรวจสอบด้วยตัวเอง เปิดแท็บเครือข่ายของเบราว์เซอร์แล้วดู คุณจะเห็นคำขอเล็ก ๆ หนึ่งรายการที่ถามว่าคุณยังมีโควตางานเหลืออยู่หรือไม่ ซึ่งมีแค่ชื่อเครื่องมือกับค่าแฮช ไม่ใช่ตัวไฟล์
เครื่องมือนี้ทำอะไร
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.
คำถามที่คนมักถาม
- ฉันวางที่อยู่เว็บแทนไฟล์ได้ไหม
- ไม่ได้ และนี่คือสิ่งที่จงใจไม่ทำ ไม่ใช่ฟีเจอร์ที่ยังไม่มีใครลงมือ การไปดึงหน้าเว็บมาหมายความว่าเว็บไซต์นี้ หรือพร็อกซี CORS ที่คั่นกลาง ต้องส่งคำขอแทนคุณ ซึ่งจะบอกเซิร์ฟเวอร์ของใครบางคนว่าคุณกำลังอ่านหน้าไหน และจะทำลายคำสัญญาข้อเดียวที่เครื่องมือนี้ให้ไว้ ให้บันทึกหน้าเว็บด้วย Ctrl+S แล้ววางไฟล์ลงที่นี่แทน
- ทำไมไฟล์ PDF ถึงไม่เหมือนหน้าเว็บ
- เพราะสไตล์ชีตไม่ถูกประมวลผล สิ่งที่ถูกอ่านคือโครงสร้างของเอกสาร ได้แก่ หัวข้อ ย่อหน้า รายการ ตาราง และลิงก์ แล้วจัดหน้าด้วยรูปแบบตัวอักษรของเว็บไซต์นี้เอง สี คอลัมน์ การจัดตำแหน่ง และเว็บฟอนต์ไม่ถูกนำมาด้วย สิ่งที่คุณเหลืออยู่คือเนื้อหาของหน้านั้น อ่านได้ บนกระดาษที่คุณเลือก
- รูปภาพในหน้าเว็บถูกนำมาด้วยไหม
- ไม่ รูปภาพไม่ถูกฝังลงไป เพราะไฟล์ .html ที่บันทึกไว้ตามปกติแค่อ้างถึงรูปภาพแทนที่จะบรรจุไว้ในตัว และการไปดึงรูปมาก็เท่ากับต้องส่งคำขอออกไป ข้อความ ตาราง รายการ และลิงก์แปลงได้ทั้งหมด ส่วนรูปภาพถูกละไว้ รวมถึงรูปที่เขียนไว้ในไฟล์เป็น data URI ด้วย
- ฉันบันทึกหน้าเว็บอย่างไรเพื่อนำมาแปลง
- กด Ctrl+S บน Windows หรือ Command+S บน Mac แล้วเลือกหน้าเว็บแบบ HTML อย่างเดียว ไม่ใช่แบบสมบูรณ์ เพราะตัวเลือกแบบสมบูรณ์จะเขียนโฟลเดอร์ของไฟล์ประกอบซึ่งเครื่องมือนี้ไม่ได้ใช้ บนมือถือ ให้มองหาตัวเลือกบันทึกเป็นไฟล์หรือดาวน์โหลดในเมนูแบ่งปันของเบราว์เซอร์ แล้ววางไฟล์ที่บันทึกไว้ลงบนหน้านี้
- มีข้อมูลอะไรเกี่ยวกับหน้าเว็บถูกส่งออกไปไหม
- ไม่ ไฟล์ถูกถอดรหัส แยกวิเคราะห์ และจัดหน้าภายในเบราว์เซอร์ของคุณทั้งหมด และการไม่มีช่องให้ใส่ URL ก็เพื่อไม่ให้มีคำขอใดถูกส่งแทนคุณเลย สิ่งเดียวที่หน้านี้ดึงมาคือฟอนต์ Noto จากโดเมนของเว็บไซต์นี้เอง และดึงเฉพาะเมื่อเปิดการฝังฟอนต์ Unicode เท่านั้น