New PDF Compression Feature for Microsoft SharePoint and OneDrive

Listen to this Post

Featured Image
Microsoft has introduced a new PDF compression feature for Microsoft SharePoint and Microsoft OneDrive, allowing users to reduce PDF file sizes directly within these platforms.

Rollout Timeline

  • Targeted Release: Late April 2025 – Early May 2025
  • General Availability (Worldwide, GCC, GCC High, DoD): Early May 2025 – Mid-May 2025

How to Use PDF Compression

  1. Open a PDF in OneDrive for the web (or in SharePoint, go to the document library and choose Preview).
  2. Select the Compress button at the top of the screen.
  3. Choose a compression level and select Save a copy to store the compressed file.
  4. After compression, select Open from the notification to view the new file.

Compression Levels

  • Light: 4:2:0 color subsampling, 25% pixel reduction
  • Medium: 4:2:0 color subsampling, 50% pixel reduction
  • Heavy: 4:2:0 color subsampling, 75% pixel reduction

Limitations:

  • Original file must be smaller than 300 MB.
  • Only one PDF at a time can be compressed.

You Should Know: PDF Compression & Security Best Practices

  1. Compressing PDFs via Command Line (Linux & Windows)

Linux (Using Ghostscript)

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf original.pdf 

/screen: Low quality, smallest size (~72 dpi)
/ebook: Medium quality (~150 dpi)
/printer: High quality (~300 dpi)

Windows (Using PowerShell & PDFtk)

pdftk original.pdf output compressed.pdf compress 

2. Automating Bulk PDF Compression (Bash Script)

for file in .pdf; do 
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -sOutputFile="compressed_$file" "$file" 
done 

3. Checking PDF Metadata & Security

exiftool original.pdf  View metadata 
pdfinfo original.pdf  Check PDF structure 

4. Removing Sensitive Data Before Compression

pdftk original.pdf dump_data output metadata.txt 
sed -i '/Producer/d;/Creator/d;/ModDate/d' metadata.txt 
pdftk original.pdf update_info metadata.txt output cleaned.pdf 

5. Password-Protecting Compressed PDFs

pdftk compressed.pdf output secured.pdf user_pw "YourPassword" 

What Undercode Say

PDF compression is useful for storage efficiency, but security should not be overlooked. Always:
– Remove metadata before sharing.
– Use encryption (pdftk or qpdf).
– Verify file integrity after compression.
– Automate compression in workflows using scripts.

For enterprise environments, consider SharePoint PowerShell automation:

Connect-SPOService -Url https://yourdomain-admin.sharepoint.com 
Set-SPOTenant -DisableReportProblemDialog $true 

Expected Output: A compressed PDF with reduced size while maintaining security best practices.

Relevant URLs:

References:

Reported By: Alitajran Microsoft365 – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 Telegram