DOCUMENTATION · COMPRESSION SDK

Compression SDK integration guide.

Quickstart per language, configuration, format-specific notes, server processing, and license activation.

Other docs: Document AI APIs · Scanning SDK · Docs home

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#)

NuGet
dotnet add package Abscode.Compression
csharp
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

Maven
<dependency>
  <groupId>com.abscode</groupId>
  <artifactId>compression</artifactId>
  <version>1.0.0</version>
</dependency>
java
PdfCompressor compressor = new PdfCompressor("abs_comp_...");

CompressionResult result = compressor.compress(
    "input.pdf",
    "output.pdf",
    CompressionProfile.BALANCED
);

Node.js

npm
npm install @abscode/compression
javascript
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.mod
go get github.com/abscode/compression-go

Configuration

OptionValuesNotes
profilemin · balanced · maxTrade-off between size and quality
targetSizeBytesintegerCompress until target reached (overrides profile)
maxDpi72 / 150 / 300 / 600Downsample embedded images above this DPI
preserveLayoutbooleanDefault true, keeps text/table positions exact
preserveSearchablebooleanKeeps PDF text layer intact for OCR-readable PDFs
threadsintegerServer-side only, default = CPU count

Format-specific notes

PDF

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

csharp
var batch = new BatchCompressor(licenseKey: "abs_comp_...");

batch.EnqueueDirectory("/incoming", "/outgoing");
batch.OnDocumentCompressed += (s, e) => Log(e.Filename, e.SavedBytes);
await batch.RunAsync();

Versions

LanguageLatestPackage
.NET1.0.0Abscode.Compression
Java1.0.0com.abscode:compression
Node.js1.0.0@abscode/compression
Go1.0.0github.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.