How to use the isValidPdf function

The isValidPdf function is used to check whether an pdf file is valid or not. It accepts a Buffer as an argument.

import { isValidPdf } from 'multiform-validator';
import PdfBuffer from 'pdf-buffer';

const buffer: Buffer = PdfBuffer;
const isValid = isValidPdf(buffer);

console.log(isValid);  // true if the pdf is valid, false otherwise