Forum Discussion
How to compress a pdf file to reduce the size before emailing on Windows?
Ghost script is an excellent, completely free choice to compress PDF file size, especially for your file sizes ranging from 50 MB to 100 MB. It is a professional-grade tool that has been the industry standard for PDF and PostScript processing for decades.
How to Compress PDF file size using Ghost script
First, you need to install Ghost script, which is a command-line tool capable of processing PDF files efficiently. Once installed, you can run a specific command to compress your large PDFs.
1. Download and install Ghost script.
2. Open Command Prompt:
- Press Windows + R, type cmd, and press Enter to open the command line interface.
3. Run the compression command:
- Navigate to the folder containing your PDF files, or specify the full path in the command.
- Use the following command to compress your PDF:
bash
gswin64c -sDEVICE= pdfwrite -dCompatibilityLevel= 1.4 -dPDFSETTINGS=/ ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed,pdf input,pdf
Here is a breakdown of what these options mean:
- gswin64c: Calls the Ghost script executable on Windows.
- -sDEVICE=pdfwrite: Tells Ghost script to output a PDF file.
- -dPDFSETTINGS: This is the most important setting for controlling the file size. The table below explains the four main presets.
- -sOutputFile= compressed, pdf: Specifies the name of your new, compressed file.
- input.pdf: The name of your original, large file.