Table of Contents

Method SplitAsync

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

SplitAsync(Attachment, CancellationToken)

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

public Task<BarcodeSplittingResult> SplitAsync(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

Task<BarcodeSplittingResult>

The documents found; Document and OutputPath stay null.

Exceptions

ArgumentNullException

source is null.

SplitAsync(string, string, CancellationToken)

Finds the documents of a batch file without writing anything.

public Task<BarcodeSplittingResult> SplitAsync(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

Task<BarcodeSplittingResult>

Exceptions

ArgumentNullException

inputPath is null.

FileNotFoundException

The file does not exist.

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

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

public Task<BarcodeSplittingResult> SplitAsync(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

Task<BarcodeSplittingResult>

SplitAsync(Stream, string, string, CancellationToken)

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

public Task<BarcodeSplittingResult> SplitAsync(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

Task<BarcodeSplittingResult>
Share