Click or drag to resize
Pdf Library for .NET

PdfPreflightFix Method

Fixes pdf for standard and verifies the result.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public static PreflightResult Fix(
	byte[] pdf,
	string password,
	PdfConformanceStandard standard,
	PreflightOptions options = null
)

Parameters

pdf  Byte
The document.
password  String
Its password, when it is encrypted.
standard  PdfConformanceStandard
The standard to fix the document for.
options  PreflightOptions  (Optional)
How to fix it; the defaults when null.

Return Value

PreflightResult
The fixed document, the fixes applied and its validation report.
Exceptions
ExceptionCondition
ArgumentNullExceptionpdf is null.
ArgumentOutOfRangeExceptionA validation option is out of range.
ArgumentExceptionThe output profile is not a printer profile, or (PDF/X-1a) not CMYK.
InvalidOperationExceptionThe document is signed, a fix failed, or the document is larger than the memory limit allows; the message says which.
TimeoutExceptionThe fix did not finish within the timeout.
PdfDocumentExceptionThe password does not open the encrypted document.
Remarks
The whole fix - the verification before, the fixes, and the verification after - runs within the Timeout of Validation, and under the memory limit a validation has.
See Also