KASKOWPusat Info

Cara mengambil teks dari file PDF tanpa mengetik ulangHow to extract text from a PDF without retyping

Ingin menyalin isi PDF ke dokumen, lembar kerja, atau catatan tapi hasil salin-tempel berantakan? Begini cara mengambil teksnya, merapikan hasilnya, dan batasan yang perlu diketahui untuk PDF hasil pindai.

Want to copy a PDF's content into a document, spreadsheet or notes, but copy-paste comes out messy? Here is how to extract the text, tidy it up, and the limits you should know about scanned PDFs.

Diterbitkan Diperbarui 3 menit baca
Di halaman ini
  1. Dua jenis PDF, dua hasil berbeda
  2. Langkah mengambil teks
  3. Tips merapikan hasil
  4. Bagaimana dengan PDF hasil pindai?
  5. Masalah yang sering muncul
  1. Two kinds of PDF, two different results
  2. Steps to extract text
  3. Tips for tidying the result
  4. What about scanned PDFs?
  5. Common problems

Mengetik ulang isi PDF itu lambat dan rawan salah. Padahal sering kali teks di dalamnya bisa diambil langsung.

Dua jenis PDF, dua hasil berbeda

Jenis PDFCiriBisa diambil teksnya?
PDF teksDibuat dari pengolah kata, laporan sistem, atau ekspor aplikasi. Teks bisa diblok dengan kursorYa
PDF gambar (hasil pindai)Setiap halaman sebenarnya foto. Teks tidak bisa diblokTidak langsung, perlu pengenalan teks (OCR)

Cara cepat mengeceknya: coba blok satu kalimat dengan kursor, atau cari sebuah kata dengan fitur pencarian di aplikasi pembaca PDF. Jika bisa disorot atau ditemukan, itu PDF teks.

Langkah mengambil teks

  1. Buka alat pengambil teks, misalnya PDF ke Teks di KASKOW.
  2. Klik Pilih file atau seret dan lepas PDF. Anda bisa memilih banyak PDF sekaligus.
  3. Aktifkan pemisah antarhalaman bila ingin batas setiap halaman terlihat jelas. Teks akan diberi penanda seperti --- Halaman 3 ---, sehingga Anda tahu dari halaman mana suatu kutipan berasal.
  4. Klik Ambil teks. Teks dari setiap halaman akan tampil.
  5. Klik Salin untuk menyalin teks, atau Unduh untuk menyimpannya sebagai file .txt. Untuk banyak PDF, setiap file menjadi satu .txt dan semuanya dikemas dalam satu .zip.
  6. Rapikan seperlunya: paragraf yang terpotong, kolom yang tercampur, dan nomor halaman.

Alat ini bekerja di browser, sehingga dokumen tidak diunggah ke server.

Catatan

PDF dengan banyak kolom, tabel, atau tata letak kompleks bisa menghasilkan teks yang urutannya tidak sempurna. Hasilnya juga berupa teks polos tanpa huruf tebal, warna, atau gambar. Periksa hasilnya, terutama angka.

Tips merapikan hasil

  • Hapus baris kosong ganda dan spasi berlebih. Alat Teks di KASKOW menyediakan fungsi hapus baris kosong, hapus spasi berlebih, serta cari dan ganti, langsung di browser.
  • Satukan baris yang terpotong. Teks dari PDF sering terputus di setiap akhir baris. Fungsi gabung baris atau cari dan ganti bisa membantu menyatukannya kembali menjadi paragraf.
  • Untuk tabel, tempel hasilnya ke lembar kerja lalu pisahkan kolom secara manual.
  • Cek ulang angka penting seperti nominal, tanggal, dan nomor rekening. Jangan percaya begitu saja.

Bagaimana dengan PDF hasil pindai?

Teks pada PDF hasil pindai perlu dikenali dengan OCR, dan hasilnya sangat bergantung pada kualitas pindaian. Pengambilan teks biasa, termasuk PDF ke Teks di KASKOW, tidak melakukan OCR, sehingga tidak akan menemukan apa pun pada file semacam ini. Jika hasilnya kosong, kemungkinan besar PDF Anda termasuk jenis ini.

Jika Anda membuat pindaian sendiri, pindai dengan resolusi cukup dan posisi lurus agar hasilnya lebih mudah diolah dengan aplikasi OCR. Bila memungkinkan, mintalah versi PDF asli dari pembuat dokumen, bukan hasil pindai dari cetakannya.

Masalah yang sering muncul

Teks tidak bisa disalin meskipun PDF berisi tulisan. PDF mungkin diberi batasan yang melarang penyalinan, atau dilindungi kata sandi. Untuk dokumen milik Anda dengan kata sandi yang Anda ketahui, buka dulu kuncinya. Lihat cara membuka PDF yang terkunci.

Huruf tampil aneh atau berupa simbol. Beberapa PDF menyimpan huruf dengan pengodean khusus, sehingga teks yang diambil tidak terbaca. Pada kasus ini, satu-satunya jalan adalah meminta file sumber dari pembuat dokumen.

Hanya butuh beberapa halaman. Ambil dulu halaman yang diperlukan menjadi PDF baru, lalu ambil teksnya. Lihat cara mengambil beberapa halaman PDF jadi file baru.

Fitur lain seperti gabung dan kompres tersedia di halaman Semua Alat PDF yang sama.

Retyping a PDF is slow and error-prone. Yet the text inside can often be extracted directly.

Two kinds of PDF, two different results

PDF typeHow to recognize itCan the text be extracted?
Text PDFMade from a word processor, a system report or an app export. Text can be highlighted with the cursorYes
Image PDF (scan)Each page is actually a photo. Text can't be highlightedNot directly; it needs text recognition (OCR)

A quick check: try to highlight a sentence with your cursor, or search for a word with your PDF reader's search feature. If it can be highlighted or found, it's a text PDF.

Steps to extract text

  1. Open a text extraction tool, for example PDF to Text on KASKOW.
  2. Click Choose file or drag and drop the PDF. You can select many PDFs at once.
  3. Turn on page separators if you want the boundary of each page to be clear. The text gets markers such as --- Page 3 ---, so you know which page a quote came from.
  4. Click Extract text. The text from each page appears.
  5. Click Copy to copy the text, or Download to save it as a .txt file. For many PDFs, each file becomes one .txt and they are all bundled in one .zip.
  6. Tidy up as needed: broken paragraphs, mixed columns and page numbers.

This tool works in your browser, so the document isn't uploaded to a server.

Note

PDFs with many columns, tables or complex layouts may produce text in an imperfect order. The result is also plain text without bold, colors or images. Check the result, especially numbers.

Tips for tidying the result

  • Remove double empty lines and extra spaces. KASKOW's Text Tools offer functions to remove empty lines, remove extra spaces, and find and replace, right in your browser.
  • Join broken lines. Text from PDFs is often cut at the end of every line. A join-lines function or find and replace can help put it back into paragraphs.
  • For tables, paste the result into a spreadsheet and split the columns manually.
  • Double-check important numbers such as amounts, dates and account numbers. Don't take them on trust.

What about scanned PDFs?

Text in a scanned PDF needs to be recognized with OCR, and the result depends heavily on scan quality. Ordinary text extraction, including PDF to Text on KASKOW, doesn't perform OCR, so it won't find anything in such files. If the result is empty, your PDF is most likely this kind.

If you make the scan yourself, scan at sufficient resolution and keep the page straight so the result is easier to process with an OCR app. Where possible, ask the document's creator for the original PDF rather than a scan of a printout.

Common problems

Text can't be copied even though the PDF contains writing. The PDF may have a restriction that blocks copying, or be password-protected. For your own document whose password you know, unlock it first. See how to open a locked PDF.

Letters show up garbled or as symbols. Some PDFs store characters with special encoding, so the extracted text is unreadable. In that case, the only option is to ask the document's creator for the source file.

You only need a few pages. Extract the pages you need into a new PDF first, then extract the text. See how to extract several PDF pages into a new file.

Other features such as merge and compress are available on the same All PDF Tools page.