Skip to content

TypeScript API / laikacms/file-sanitizer / PdfScanner

Class: PdfScanner ​

Interface for file type specific scanners

Implements ​

Constructors ​

Constructor ​

ts
new PdfScanner(): PdfScanner;

Returns ​

PdfScanner

Properties ​

supportedTypes ​

ts
readonly supportedTypes: readonly DetectedFileType[];

File types this scanner can handle

Implementation of ​

DangerousContentScanner.supportedTypes

Methods ​

canHandle() ​

ts
canHandle(fileType): boolean;

Check if this scanner can handle the given file type

Parameters ​

ParameterType
fileTypeDetectedFileType

Returns ​

boolean

Implementation of ​

DangerousContentScanner.canHandle


scan() ​

ts
scan(data, _fileType): ScanResult;

Scan the file for dangerous content

Parameters ​

ParameterType
dataUint8Array
_fileTypeDetectedFileType

Returns ​

ScanResult

Implementation of ​

DangerousContentScanner.scan

Released under the MIT License.