/** * Client-side PDF validation utilities. * * Provides quick checks (magic bytes, MIME type, file size) before * handing a file to the viewer or pdf.js fallback. These run entirely * in the browser — no server round-trip required. * * @public */ /** Result of a PDF validation check. */ export interface PdfValidationResult { /** Whether the file passed all checks. */ valid: boolean; /** Human-readable error message when `valid` is false. */ error?: string; } /** * Validate a `File` object before loading it into the viewer. * * Checks (in order): * 1. MIME type is `application/pdf` (or empty — some browsers don't * populate it for drag-dropped files). * 2. First 5 bytes match the PDF magic signature `%PDF-`. * 3. File size is within the allowed limit. * * @param file - The `File` to validate. * @param maxBytes - Maximum allowed size in bytes. Default: 50 MB. * @returns A promise resolving to the validation result. * * @public */ export declare function validatePdfFile(file: File, maxBytes?: number): Promise; /** * Validate a PDF URL string before loading it into the viewer. * * This is a **synchronous** surface-level check — it validates URL * format only. It does not fetch the URL or inspect response headers. * * @param url - The URL string to validate. * @returns The validation result. * * @public */ export declare function validatePdfUrl(url: string): PdfValidationResult; //# sourceMappingURL=pdfValidation.d.ts.map