تعقيم PDF
أزِل JavaScript والملفات المضمَّنة والإجراءات التي تعمل عند الفتح.
تعمل هذه الأداة داخل متصفحك بالكامل. لا يُرفع ملفك أبدًا، ويمكنك التحقق من ذلك في تبويب الشبكة بمتصفحك. تحقّق بنفسك: افتح تبويب الشبكة في متصفحك وراقب. سترى طلبًا صغيرًا واحدًا يسأل إن كان لديك مهام متبقية — اسم أداة وبصمة تجزئة، وليس الملف أبدًا.
ماذا تفعل هذه الأداة
A PDF is not a static document. It can carry JavaScript, run an action the moment it is opened, hold other files inside itself, and send a reader out to a URL. Those features have legitimate uses, and they are also why PDFs are a common malware carrier. This tool rebuilds the document from its pages alone, which leaves every document-level hook behind.
Use it on anything that arrived unexpectedly and has to be read anyway: an invoice from an address you do not recognise, a CV from a job board, a form downloaded from a site you have no reason to trust. It is also worth running on files you distribute, so nobody has to wonder whether the attachment inside yours is meant to be there.
كيف تعمل
- Drop the PDF onto this page.
- Leave the three main switches on. JavaScript, embedded files and open actions are all served by one rebuild, and together they cover nearly everything active a PDF can carry.
- Turn on Remove external links if the file came from a source you do not trust, since a link is a phishing vector even when nothing else in the file is.
- Turn on Strip metadata under advanced options if you also want the author and timestamps gone.
- Press Sanitize. The result reports the page count and how many embedded files were removed.
The removal works by not copying rather than by deleting. The document is rebuilt into an empty file with only its pages carried over, so document-level JavaScript, the name tree of embedded files, the action that fires on open and the rest are never brought across at all. That is more reliable than hunting through a file for each hook: you cannot forget to remove something you never copied.
Because it is one rebuild, the first three switches are effectively one decision. Turning any of them on rebuilds the document, and the rebuild leaves all of them behind. They are separate controls because they name separate worries, not because you can keep the JavaScript and lose the attachments.
The rebuild is thorough enough to cost you things you may want. Document-level structure is exactly what is discarded, so the interactive form dictionary, the outline and anything else attached to the document rather than to a page does not survive. A fillable form comes out as pages that look right and no longer fill in. That is why you should sanitise files you receive rather than files you are still working on.
A file attached as a page annotation is not in the name tree, so the rebuild alone would leave it in place. Attachments are counted before the rebuild and removed by name afterwards, which catches both kinds. The number in the result is what was actually found, so a report of zero embedded files is information rather than a shrug.
This runs entirely in your browser on qpdf compiled to WebAssembly. For a file you already suspect, that is the right shape: the document is never handed to a third party, and it is never opened by a full PDF reader with scripting enabled - qpdf parses the structure without executing anything in it.
ما لا تستطيع هذه الأداة فعله
- This is not antivirus software. It removes the categories of active content a PDF can hold; it does not scan for or identify malware, and it cannot tell you whether a file was hostile.
- The rebuild discards document-level structure, so a fillable form stops being fillable and the outline is not carried over.
أسئلة يطرحها الناس
- ما الذي يُعدّ محتوى نشطًا في ملف PDF؟
- سكربتات JavaScript على مستوى المستند، وقد يشغّلها القارئ تلقائيًا؛ وإجراء OpenAction الذي ينطلق لحظة فتح الملف، مع ما يماثله من مشغّلات عند تغيير الصفحة وأحداث النماذج؛ والملفات المضمَّنة داخل ملف PDF؛ والروابط أو الإجراءات التي تتصل بعنوان URL. وكلها خصائص مشروعة، وهي في الوقت نفسه الطرق المعتادة لاستخدام ملف PDF كوسيلة توصيل.
- هل يزيل هذا فيروسًا من ملف PDF؟
- يزيل أجزاء ملف PDF التي يمكن أن تحمل فيروسًا وتطلقه، وهذا ليس مثل الفحص بحثًا عن برمجيات خبيثة ولا ينبغي أن يُعامل كذلك. فإن كان لديك سبب حقيقي للاعتقاد بأن ملفًا عدائي، فلا تفتحه - استخدم برنامج مكافحة فيروسات، أو اسأل المرسِل عبر قناة تثق بها. التعقيم يقلّل ما يستطيع المستند فعله؛ وليس حكمًا عليه.
- ما الذي قد يتوقف عن العمل بعد ذلك؟
- كل ما يعتمد على المستند لا على الصفحة. النموذج القابل للتعبئة يتوقف عن قبول الإدخال، وفهرس الإشارات المرجعية لا يُنقل، والمرفقات المضمَّنة تختفي، والنموذج الذي كان يحسب المجاميع بـ JavaScript لا يعرض إلا آخر قيم محفوظة. أما محتوى الصفحات ونصوصها وصورها فلا يتغير.
- هل ينبغي أن أزيل الروابط الخارجية أيضًا؟
- الخيار معطّل افتراضيًا لأن معظم الروابط في معظم المستندات مطلوبة، وتجريدها من تقرير تقرؤه بنفسك مصدر إزعاج. فعّله لملف من مصدر لا تثق به: فالرابط الذي يبدو باسم مصرف تعرفه ويشير إلى مكان آخر هو أقدم حيلة في هذا الباب، وإزالة كل الروابط جواب فظّ لكنه كامل عليها.
- هل يُرفع الملف المشبوه إلى أي مكان؟
- لا. يعمل qpdf كـ WebAssembly في عامل ويب داخل متصفحك، ويحلّل بنية الملف دون تنفيذ أي شيء بداخله. فالملف الذي لا تثق به أصلًا لا يصل إلى خادم أبدًا، ولا يُسلَّم في الطريق إلى قارئ تعمل فيه السكربتات.