ضغط PDF
اجعل ملف PDF أصغر، ولا تجعله أكبر أبدًا.
تعمل هذه الأداة داخل متصفحك بالكامل. لا يُرفع ملفك أبدًا، ويمكنك التحقق من ذلك في تبويب الشبكة بمتصفحك. تحقّق بنفسك: افتح تبويب الشبكة في متصفحك وراقب. سترى طلبًا صغيرًا واحدًا يسأل إن كان لديك مهام متبقية — اسم أداة وبصمة تجزئة، وليس الملف أبدًا.
ماذا تفعل هذه الأداة
Two different things make a PDF smaller, and this tool does both in turn. The structural pass repacks the file's objects and recompresses its streams, which is lossless and usually saves 10 to 25 per cent on a document nobody has optimised before. The image pass re-encodes the pictures at a lower resolution, which is where the large reductions on a scan come from, and it is lossy. Both results are measured against the original, and if neither won you get your own file back rather than a slightly bigger one labelled compressed.
The trigger is almost always a limit somewhere else: a mail server that bounces attachments over 25 MB, an application portal that stops at 2 MB, or a 40 MB scanned contract that has to reach someone on a phone connection.
كيف تعمل
- Drop the PDF onto this page. Files up to 300 MB are accepted.
- Pick a level. Light is structure only and changes nothing you can see; Balanced re-encodes images at 150 dpi; Strong drops to 100 dpi for getting a scan under an attachment limit.
- Choose Custom to set the numbers yourself - resolution between 72 and 300 dpi, quality between 30 and 95 per cent.
- Open advanced options if you also want the images turned grey, the metadata stripped, or a filled form flattened first. Each makes the file smaller.
- Press Compress. The result reports the size before and after, and how many pages were re-encoded.
The structural pass is qpdf rewriting the file with object streams, compressed cross-references and every flate stream recompressed at level 9. Nothing about the page content changes, so it always runs whatever level you picked. On a file that has already been through a good optimiser it saves nothing at all, which is a real outcome rather than a failure.
The image pass works by re-rendering. A browser cannot reach inside a PDF and re-encode the pictures in place, so every page is drawn at the resolution you chose and written back as a JPEG. That would normally cost you the text, so the text is read out with PDF.js first and drawn back over the images in an invisible layer, keeping words selectable and searchable. What this route cannot carry across is links, form fields and annotations - if you need those, use Light.
The rule this tool will not break is that it never hands back a bigger file. An already-optimised document, and one whose images are stored more efficiently than a fresh JPEG of the same page, both genuinely come out larger. When that happens the original bytes are returned untouched and the result says the file was already optimised, because a compressor that grows your file and reports success is worse than no compressor.
Knowing where the size sits will save you a disappointment. In a scan it is the images, so Strong can take 40 MB to under 5 MB. In a text report it is the embedded fonts and the structure, so 10 to 20 per cent is a good result and re-encoding its few images changes very little.
Everything runs on your device. qpdf and PDF.js are compiled to WebAssembly and run in Web Workers, so a 300 MB scan is processed without a byte being sent anywhere.
ما لا تستطيع هذه الأداة فعله
- Anything above Light re-encodes the images, which is lossy - fine print in a scan softens, and the loss cannot be undone from the output file.
- A document that has already been optimised may not shrink at all. In that case the original is returned unchanged and the result says so.
- When the image pass wins, the pages are rebuilt from pictures, so links, form fields and annotations are not carried over. The text layer is, invisibly.
أسئلة يطرحها الناس
- كم سيصغر ملفي؟
- يعتمد على ما بداخله. المستند الممسوح ضوئيًا صور، فالمستوى المتوازن ينزل به غالبًا إلى ربع حجمه، والقوي إلى أقل من العُشر. أما المستند النصي فخطوط وبنية، وفيه تعطي التمريرة بلا فقد بين 10 و25 بالمئة ولا يبقى الكثير لكسبه. وتُعرض النتيجة بالرقمين معًا لتقرر ما إذا كنت ستجرّب مستوى أقوى.
- هل سيظل المستند يبدو صحيحًا؟
- في المستوى الخفيف يبدو مطابقًا تمامًا، لأن البنية وحدها هي التي تتغير. وفي المتوازن يُعاد ترميز الصور بدقة 150 نقطة/بوصة، وهي تُقرأ على الشاشة قراءة ممتازة وتُطبع بشكل مقبول. وفي القوي تصبح دقة 100 نقطة/بوصة ظاهرة عند التدقيق في مسح ضوئي، وتبقى مع ذلك صالحة للقراءة. راجع صفحة من النتيجة قبل حذف الأصل.
- لماذا لم يصغر ملفي إطلاقًا؟
- لأنه كان محسَّنًا أصلًا. الملفات المصدَّرة من برنامج حديث، أو التي مرّت على ضاغط من قبل، لم يبقَ فيها ما يُحزَم. وبدل أن تعيد إليك ملفًا أكبر قليلًا مع رسالة نجاح، تعطيك الأداة الملف الأصلي وتقول لك ذلك.
- هل يجعل الضغط النص غير قابل للبحث؟
- لا. عند تشغيل تمريرة الصور، يُستخرج النص قبل استبدال الصفحات ثم يُرسم من جديد بشكل غير مرئي فوق الصور، فيمكنك تحديده والبحث فيه ونسخه. أما ما يُفقد في هذا المسار فهو الروابط وحقول النماذج والتعليقات، ولهذا يوجد المستوى الخفيف.
- هل يُرفع ملفي كي يُضغط؟
- لا. يجري الضغط داخل متصفحك، بتشغيل qpdf وPDF.js كـ WebAssembly في عمّال الويب. افتح أدوات المطوّر، وانتقل إلى تبويب الشبكة، ثم اضغط شيئًا: لا يوجد أي طلب صادر، وتعمل الأداة دون اتصال بعد تحميل الصفحة.
- أي مستوى أستخدم لأنزل تحت حد البريد الإلكتروني؟
- ابدأ بالمتوازن وانظر إلى الحجم المعروض. فإن بقي فوق الحد، جرّب القوي، وإن لم يكفِ فعّل تحويل الصور إلى رمادي في الخيارات المتقدمة، وهو يزيل عادةً ثلثًا آخر من مسح ضوئي ملوّن.