pdf-visual-compare
Version:
Visual regression testing library for PDFs in Js/Ts without binary and OS dependencies.
12 lines (11 loc) • 706 B
TypeScript
import type { ComparePdfOptions } from './types/ComparePdfOptions.js';
/**
* Compares two PDF files or buffers and returns a boolean indicating whether they are similar.
*
* @param actualPdf - The file path or buffer of the actual PDF to compare.
* @param expectedPdf - The file path or buffer of the expected PDF to compare against.
* @param opts - Optional comparison options.
* @returns A promise that resolves to a boolean indicating whether the PDFs are similar.
* @throws Will throw an error if the compare threshold is less than 0.
*/
export declare function comparePdf(actualPdf: string | ArrayBufferLike, expectedPdf: string | ArrayBufferLike, opts?: ComparePdfOptions): Promise<boolean>;