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
sourceAttachmentThe batch: a PDF, an image, a multi-page TIFF or any renderable document.
cancellationTokenCancellationTokenCancels the run between pages.
Returns
- BarcodeSplittingResult
The documents found; Document and OutputPath stay
null.
Exceptions
- ArgumentNullException
sourceisnull.
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
inputPathstringThe batch file.
passwordstringThe password of an encrypted PDF.
cancellationTokenCancellationTokenCancels the run between pages.
Returns
Exceptions
- ArgumentNullException
inputPathisnull.- 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
databyte[]The batch's bytes.
fileNamestringThe batch's name; its extension tells its type.
passwordstringThe password of an encrypted PDF.
cancellationTokenCancellationTokenCancels the run between pages.
Returns
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
streamStreamThe batch's stream; a stream that cannot seek is copied once.
fileNamestringThe batch's name; its extension tells its type.
passwordstringThe password of an encrypted PDF.
cancellationTokenCancellationTokenCancels the run between pages.