Quickstart per language, configuration, format-specific notes, server processing, and hyperscaler marketplace API.
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.
The Server-side tier is licensed per production server. Domain Unlimited covers all servers within one organisation. Activation is offline-capable for air-gapped environments — request an activation file from the portal.
For evaluation and local development only — watermarked output, single dev machine. Move to a paid tier when ready for production.
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}");
<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 );
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 get github.com/abscode/compression-go
| 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 |
Compresses embedded JPG/PNG layers, removes redundant fonts and metadata, optimises stream encoding. Preserves text layer, form fields, annotations, and bookmarks.
CCITT G4 for B&W scans, JPEG for colour. Multi-page TIFFs processed as a single document, page tags preserved.
Embedded images downsampled per maxDpi and re-encoded at the configured quality level.
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.
var batch = new BatchCompressor(licenseKey: "abs_comp_..."); batch.EnqueueDirectory("/incoming", "/outgoing"); batch.OnDocumentCompressed += (s, e) => Log(e.Filename, e.SavedBytes); await batch.RunAsync();
Same compression engine, exposed as a REST API on AWS, Azure, and GCP marketplaces. For cloud-native customers using Lambda / Functions / Cloud Run, or for procurement under existing cloud commitments (AWS EDP, Azure MACC).
curl -X POST https://compress.abscode.com/v1/pdf \ -H "Authorization: Bearer abs_comp_..." \ -H "X-Marketplace: aws" \ -F "file=@input.pdf" \ -F "profile=balanced"
Billed per document through the marketplace at approximately $0.002–$0.005/document.
| 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 |
Full documentation will include per-method API reference, error code dictionary, marketplace billing docs, format-by-format tuning guides, and benchmark numbers per profile.