Compression SDK integration guide.
Quickstart per language, configuration, format-specific notes, server processing, and license activation.
Overview
The Compression SDK is a compiled library distributed for .NET, Java, Node.js, and Go. Layout-preserving compression for PDF, TIFF, JPG, and PNG within PDFs. Designed for production server pipelines, multi-threaded, batch-capable, with predictable per-server licensing.
License + activation
The SDK is licensed per production server at per year. A site license at per year covers every server in one organisation, and OEM redistribution is available through sales. 3-year terms save 10%, 5-year terms save 20%; see the pricing page for the full breakdown. Activation is offline-capable for air-gapped environments, request an activation file from the portal.
All prices exclude tax. In India, GST is added at the prevailing rate.All prices exclude VAT, sales tax and any withholding tax.
Free 30-day trial
Evaluate with the full engine for 30 days, all formats, license key issued instantly. Move to a per-server license when you go to production.
.NET (C#)
dotnet add package Abscode.Compression
using Abscode.Compression; var compressor = new PdfCompressor(licenseKey: "abs_comp_..."); var result = compressor.Compress( inputPath: "input.pdf", outputPath: "output.pdf", profile: CompressionProfile.Balanced ); Console.WriteLine($"Reduced {result.OriginalSize} → {result.CompressedSize}");
Java
<dependency> <groupId>com.abscode</groupId> <artifactId>compression</artifactId> <version>1.0.0</version> </dependency>
PdfCompressor compressor = new PdfCompressor("abs_comp_..."); CompressionResult result = compressor.compress( "input.pdf", "output.pdf", CompressionProfile.BALANCED );
Node.js
npm install @abscode/compression
import { PdfCompressor } from "@abscode/compression"; const compressor = new PdfCompressor({ licenseKey: "abs_comp_..." }); const result = await compressor.compress({ input: "input.pdf", output: "output.pdf", profile: "balanced" });
Go
go get github.com/abscode/compression-go
Configuration
| Option | Values | Notes |
|---|---|---|
profile | min · balanced · max | Trade-off between size and quality |
targetSizeBytes | integer | Compress until target reached (overrides profile) |
maxDpi | 72 / 150 / 300 / 600 | Downsample embedded images above this DPI |
preserveLayout | boolean | Default true, keeps text/table positions exact |
preserveSearchable | boolean | Keeps PDF text layer intact for OCR-readable PDFs |
threads | integer | Server-side only, default = CPU count |
Format-specific notes
Compresses embedded JPG/PNG layers, removes redundant fonts and metadata, optimises stream encoding. Preserves text layer, form fields, annotations, and bookmarks.
TIFF (single + multi-page)
CCITT G4 for B&W scans, JPEG for colour. Multi-page TIFFs processed as a single document, page tags preserved.
JPG / PNG within PDFs
Embedded images downsampled per maxDpi and re-encoded at the configured quality level.
Server processing
The Server-side tier unlocks multi-threaded processing, batch pipelines, and DPI / size-cap controls. Thread count defaults to your CPU count; tune via threads option.
Batch pipelines
var batch = new BatchCompressor(licenseKey: "abs_comp_..."); batch.EnqueueDirectory("/incoming", "/outgoing"); batch.OnDocumentCompressed += (s, e) => Log(e.Filename, e.SavedBytes); await batch.RunAsync();
Versions
| Language | Latest | Package |
|---|---|---|
| .NET | 1.0.0 | Abscode.Compression |
| Java | 1.0.0 | com.abscode:compression |
| Node.js | 1.0.0 | @abscode/compression |
| Go | 1.0.0 | github.com/abscode/compression-go |
This is a docs landing page
Full documentation will include per-method API reference, error code dictionary, format-by-format tuning guides, and benchmark numbers per profile.