ข้ามไปยังเนื้อหา

PDF เป็น HTML

แปลง PDF เป็นหน้าเว็บ เลือกได้ระหว่างข้อความที่อ่านง่ายหรือภาพของหน้า

ประมวลผลบนเครื่องของคุณ

เครื่องมือนี้ทำงานในเบราว์เซอร์ของคุณทั้งหมด ไฟล์ของคุณไม่ถูกอัปโหลดเลย และคุณตรวจสอบได้เองในแท็บเครือข่ายของเบราว์เซอร์ ตรวจสอบด้วยตัวเอง เปิดแท็บเครือข่ายของเบราว์เซอร์แล้วดู คุณจะเห็นคำขอเล็ก ๆ หนึ่งรายการที่ถามว่าคุณยังมีโควตางานเหลืออยู่หรือไม่ ซึ่งมีแค่ชื่อเครื่องมือกับค่าแฮช ไม่ใช่ตัวไฟล์

เครื่องมือนี้ทำอะไร

There are two ways to turn a PDF into a web page, and they suit different people, so both are here. Text mode writes headings, paragraphs, lists and links as real HTML: it will not look like the PDF, and that is the point, because it re-flows on a phone, it is searchable, and a screen reader can follow it. Page pictures mode renders every page as an image with the extracted text positioned invisibly over it - identical to the PDF, and close to useless on a small screen. Either way the result is one self-contained file.

Use text mode when a document has to be readable on a phone, indexable by a search engine, or usable with a screen reader - a policy, a manual, a report that people keep pinch-zooming. Use page pictures when appearance is the whole point and the file has to look like the original: a form, a certificate, a signed letter being shown rather than read.

วิธีทำงาน

  1. Drop the PDF onto this page. In text mode the file is checked for a text layer first, and a scan is refused with a pointer to OCR PDF.
  2. Pick the mode: text for a readable page that re-flows, page pictures for something that matches the original exactly.
  3. Leave Complete HTML document and Put the styles inside the file on unless you are pasting the result into a page you already have.
  4. In page pictures mode, set the resolution. 120 dpi is legible on screen; 200 dpi is sharper and roughly three times the bytes.
  5. Press Convert to HTML and the single .html file downloads.

The output is one file with its stylesheet inlined, so it opens from a folder or an email attachment without the missing-stylesheet page that a linked CSS file produces. It is also written to stay readable with CSS switched off entirely. That is partly an accessibility property and partly a proof of what is underneath: markup that means something, rather than a heap of absolutely-positioned spans arranged to look right.

Text mode reads the page in one column. Multi-column layouts, sidebars and text boxes are flattened into a single reading order, which is the trade you are making in return for a page that works at 360 pixels wide.

In page pictures mode the images are embedded as data URIs rather than written as a folder of files next to the HTML. Base64 costs about 33 per cent over the raw bytes, which is worth paying for a file that can be mailed as one attachment. It does mean a long document at 200 dpi becomes heavy, so start at the default and raise it only if the result looks soft.

Rendering and text extraction both happen in your browser through PDF.js. Nothing about the document is transmitted, including in page pictures mode, where the images are produced on your own device rather than by a rendering server somewhere.

สิ่งที่เครื่องมือนี้ทำไม่ได้

  • Text mode does not preserve the layout. Columns collapse into one, absolute positioning is dropped, and the page reads top to bottom.
  • Page pictures mode embeds every page as base64 inside the file, which adds about a third to the size of the images and makes a long document slow to open.

คำถามที่คนมักถาม

โหมดทั้งสองต่างกันอย่างไร
โหมดข้อความจะดึงคำออกมาแล้วเขียนเป็น HTML จริง ๆ ทั้งหัวข้อ ย่อหน้า รายการ และลิงก์ หน้าจึงไหลใหม่ได้และโปรแกรมอ่านหน้าจอตามได้ ส่วนโหมดภาพของหน้าจะเรนเดอร์แต่ละหน้าเป็นภาพแล้ววางข้อความแบบมองไม่เห็นทับไว้ ผลลัพธ์จึงตรงกับต้นฉบับและยังค้นหาได้ แต่ไม่ปรับตามขนาดจอ เลือกจากสิ่งที่สำคัญกว่า คือการอ่าน หรือหน้าตาที่คุ้นเคย
HTML จะหน้าตาเหมือน PDF ของฉันไหม
ในโหมดข้อความ ไม่เหมือน และตั้งใจให้เป็นเช่นนั้น ฟอนต์ คอลัมน์ และรูปทรงของหน้าถูกตัดทิ้งเพื่อให้เนื้อหาไหลใหม่ได้ตามความกว้างของจอ ส่วนในโหมดภาพของหน้า ผลลัพธ์เหมือน PDF ทุกประการ เพราะแต่ละหน้าคือภาพของมัน
รูปภาพภายในเอกสารของฉันติดมาด้วยไหม
ในโหมดภาพของหน้า ติดมา เพราะทั้งหน้ารวมทั้งภาพประกอบถูกเรนเดอร์เป็นภาพ ส่วนในโหมดข้อความ ไม่ติดมา การแปลงจะเขียนเฉพาะข้อความและโครงสร้างเท่านั้น
ผลลัพธ์เป็นไฟล์เดียวหรือทั้งโฟลเดอร์
เป็นไฟล์เดียวเสมอ CSS ถูกฝังไว้ข้างใน และภาพของหน้าถูกฝังเป็น data URI จึงไม่มีอะไรหายไปเวลาย้ายไฟล์หรือส่งอีเมล ถ้าปิดตัวเลือกเอกสาร HTML แบบสมบูรณ์ คุณจะได้ชิ้นส่วนไว้วางลงในหน้าเว็บที่มีอยู่แล้วแทน
มีอะไรถูกอัปโหลดไหม
ไม่มี ทั้งการดึงข้อความและการเรนเดอร์หน้าทำงานใน Web Worker ในเบราว์เซอร์ของคุณ ค่าความละเอียดจึงมีผลต่อเวลาที่เครื่องของคุณเองต้องทำงาน ไม่ใช่ความยาวของคิว เปิดแท็บเครือข่ายดูระหว่างแปลงแล้วคุณจะเห็นว่าไม่มีอะไรออกไป

เครื่องมือที่เกี่ยวข้อง