Publish a PDF
Optimize a PDF without rasterizing pages
Apply deterministic lossless PDF optimization, deduplication, compression, or Fast Web View and retain the original when a candidate is not smaller.
Optimization summary
- Input
- Output
- Losslessly optimized PDF
- Package
- OfficeIMO.Pdf
- Runs on
- Browser-local WebAssembly or .NET
- Microsoft Office
- Not required
- License
- MIT
OfficeIMO optimization is lossless; it does not downsample scans or replace pages with images.
Browse all PDF workflowsPractical steps
Optimize a PDF with an explicit profile
Choose a lossless policy, inspect the candidate result, and keep the smaller safe artifact.
- SelectChoose one PDF and note its original size.
- ProfileChoose Balanced, Maximum Compression, Web, or Archival behavior.
- ReviewDownload the result and inspect saved bytes, actions, skipped opportunities, and linearization evidence.
OfficeIMO optimization works on PDF structure and streams without rasterizing pages. Text remains text, and the operation does not deliberately trade fidelity for a smaller scan image.
Optimize from .NET
using OfficeIMO.Pdf;
PdfDocument source = PdfDocument.Load("report.pdf");
PdfOptimizationActionResult result =
source.Optimization.Apply(PdfOptimizationProfile.Web);
File.WriteAllBytes("report.optimized.pdf", result.Bytes);
Console.WriteLine($"Saved bytes: {result.SavedBytes}");
Console.WriteLine($"Returned original: {result.ReturnedOriginal}");
If the optimized candidate is not smaller, the result can retain the original bytes rather than making the file larger merely to claim success. The action report records requested profile, candidate and returned sizes, applied actions, skipped opportunities, and linearization state.
Compression boundaries
This is not scan downsampling, JPEG recompression, or page rasterization. Those policies can remove selectable text, accessibility information, vector quality, and signature meaning. OfficeIMO keeps that lossy workflow separate until it has explicit quality controls and evidence.