Table of Contents

Method Split

Namespace
LMKit.Extraction.Barcodes
Assembly
LM-Kit.NET.dll

Split(Attachment, CancellationToken)

Finds the documents of a batch without writing anything: their pages, values and barcodes, and the role of every scanned page.

public BarcodeSplittingResult Split(Attachment source, CancellationToken cancellationToken = default)

Parameters

source Attachment

The batch: a PDF, an image, a multi-page TIFF or any renderable document.

cancellationToken CancellationToken

Cancels the run between pages.

Returns

BarcodeSplittingResult

The documents found; Document and OutputPath stay null.

Exceptions

ArgumentNullException

source is null.

Split(string, string, CancellationToken)

Finds the documents of a batch file without writing anything.

public BarcodeSplittingResult Split(string inputPath, string password = "", CancellationToken cancellationToken = default)

Parameters

inputPath string

The batch file.

password string

The password of an encrypted PDF.

cancellationToken CancellationToken

Cancels the run between pages.

Returns

BarcodeSplittingResult

Exceptions

ArgumentNullException

inputPath is null.

FileNotFoundException

The file does not exist.

Split(byte[], string, string, CancellationToken)

Finds the documents of a batch held in memory without writing anything.

public BarcodeSplittingResult Split(byte[] data, string fileName, string password = "", CancellationToken cancellationToken = default)

Parameters

data byte[]

The batch's bytes.

fileName string

The batch's name; its extension tells its type.

password string

The password of an encrypted PDF.

cancellationToken CancellationToken

Cancels the run between pages.

Returns

BarcodeSplittingResult

Split(Stream, string, string, CancellationToken)

Finds the documents of a batch read from a stream (left open) without writing anything.

public BarcodeSplittingResult Split(Stream stream, string fileName, string password = "", CancellationToken cancellationToken = default)

Parameters

stream Stream

The batch's stream; a stream that cannot seek is copied once.

fileName string

The batch's name; its extension tells its type.

password string

The password of an encrypted PDF.

cancellationToken CancellationToken

Cancels the run between pages.

Returns

BarcodeSplittingResult
Share