PDF إلى نص
استخرج الكلمات في ملف .txt عادي.
تعمل هذه الأداة داخل متصفحك بالكامل. لا يُرفع ملفك أبدًا، ويمكنك التحقق من ذلك في تبويب الشبكة بمتصفحك. تحقّق بنفسك: افتح تبويب الشبكة في متصفحك وراقب. سترى طلبًا صغيرًا واحدًا يسأل إن كان لديك مهام متبقية — اسم أداة وبصمة تجزئة، وليس الملف أبدًا.
ماذا تفعل هذه الأداة
This extracts the words from a PDF and writes them into a plain .txt file. A PDF does not store text as sentences - it stores glyphs at coordinates - so reading order, word boundaries and paragraph breaks are all reconstructed from the geometry of the page. Every extractor guesses that slightly differently, which is why the same document gives different output in different tools, and why there are two modes here rather than one.
Lifting a quotation out of a report without retyping it, feeding a document to a script or a language model, searching a book you only have as a PDF, or checking what a page actually contains when a table detector insists it found nothing.
كيف تعمل
- Drop the PDF onto this page. One file at a time, up to 300 MB.
- Choose reading order for prose you intend to paste somewhere, or layout to keep columns and tables lined up with spaces.
- Decide whether pages are separated by a marker line and whether page numbers are printed into the file.
- Leave rejoin hyphenated words on so a word broken across a line break comes back together.
- Under advanced options, set a page range, or switch the encoding to UTF-8 with a BOM if Excel or Notepad will open the file.
- Press Convert to text and the .txt downloads on its own.
The two modes solve opposite problems. Reading order joins the lines of a paragraph back into flowing prose, which is what you want in an email, a script or a quotation. Layout mode keeps every line where it was on the page, padding with spaces so columns stay aligned - right for a table, a code listing or a form, and wrong for prose, where the padding becomes ragged whitespace you then strip out. If the output looks strange, the mode is usually why.
Rejoining hyphenated words is more careful than a search-and-replace. A hyphen at the end of a line is joined only when the character before it and the first character of the next line are both lowercase, so a word broken as inter- and national comes back as international, while a compound such as self-service, or a hyphen followed by a capitalised name, is left as written. The rule errs towards leaving a real hyphen alone rather than towards editing your text.
A scanned document is detected before any work happens. The first five pages are sampled for a text layer, and when there is none the tool stops and points at OCR, since a scan is a picture of words with nothing in it to extract. Reporting no text found would be technically true and practically useless.
The encoding option is small and saves a familiar afternoon. UTF-8 without a byte order mark is what a script, a git repository or a text editor wants. UTF-8 with a BOM is what makes Excel and Notepad recognise the file as UTF-8 instead of guessing a legacy code page and mangling every accented character. If names come out as strings of symbols, the BOM is what was missing.
Extraction runs in a Web Worker and the text file is written there too, so a confidential document is never sent anywhere to have its words read. The result reports the page count, the character and word counts and how many pages came out empty - often the quickest sign that part of a document is scanned while the rest is not.
ما لا تستطيع هذه الأداة فعله
- Columns, sidebars, headers and footnotes come out in the order the reconstruction decides on, which is not always the order a person reads them in. Layout mode is often clearer for those pages.
- A scanned page contains no text to extract. That is detected and reported with a link to OCR rather than writing an empty file.
أسئلة يطرحها الناس
- ما الفرق بين ترتيب القراءة والتخطيط؟
- ترتيب القراءة يعيد بناء الفقرات، فيصل أسطر كل فقرة في نص متدفّق يمكنك لصقه في أي مكان. والتخطيط يحفظ شكل الصفحة بالحشو بالمسافات، فتبقى الأعمدة والجداول وقوائم الشيفرة مصطفّة في عرض بعرض ثابت. استخدم ترتيب القراءة للنثر، والتخطيط حين يحمل الموضع الأفقي للنص معنى.
- لم يخرج شيء من ملف PDF. لماذا؟
- على الأرجح لأنه مسح ضوئي. الصفحة الممسوحة تحمل صورة للكلمات لا كلمات، فلا توجد طبقة نصية يُستخرج منها. تُفحص أول خمس صفحات قبل بدء أي عمل، وإن لم توجد طبقة تتوقف الأداة وتوجّهك إلى أداة OCR للـ PDF، التي تحوّل الصورة إلى نص حقيقي يمكنك استخراجه بعدها.
- خرج النص مبعثرًا. هل يمكن إصلاح ذلك؟
- جرّب وضع التخطيط أولًا - فالمخرَج المبعثر يعني عادةً صفحة متعددة الأعمدة وُصلت أسطرها عبر الأعمدة. التخطيط يُبقي كل عمود في موضعه، وهو أسهل في القراءة وأسهل في التنظيف. وبعض المستندات تضع الترويسات والتذييلات وحواشي الهامش بترتيب لا صلة له بطريقة قراءتها، ولا يمكن لأي أداة استخراج أن تعرف الأفضل على وجه اليقين.
- الحروف ذات العلامات تبدو خاطئة عند فتح الملف. ما العمل؟
- بدّل الترميز إلى UTF-8 مع BOM وحوّل مرة أخرى. علامة ترتيب البايت تخبر Excel وNotepad أن الملف UTF-8 بدل تركهما يخمّنان صفحة ترميز قديمة، وهو ما يحوّل الحرف ذا العلامة إلى رمزين. أبقِه على UTF-8 العادي للسكربتات والمحرّرات وأنظمة إدارة الإصدارات.
- هل يُرفع المستند لاستخراج النص؟
- لا. يُحلَّل PDF ويُكتب الملف النصي داخل متصفحك، ولا يُرسل شيء في أي مرحلة - وهو أمر يستحق المعرفة حين يكون المستند عقدًا أو سجلًا طبيًا. يمكنك مراقبة تبويب الشبكة في أدوات المطوّر أثناء التحويل للتأكد، والأداة تعمل دون اتصال.