ProcessorProcess Method |
Apply OCR to a PDF document
Process the input PDF document with OCR according to the specified options. The processed document is written to the output stream.
Non-critical processing issues raise a Warning. It is recommended to review the WarningCategory and handle them if necessary for the application.
public Document Process( Document document, Engine engine, Stream outStream, OcrOptions options = null, OutputOptions outOptions = null )
The resulting output PDF which can be used as a new input for further processing.
Note that this object must be disposed before the output stream object (method argument outStream).
| Exception | Condition |
|---|---|
| LicenseException | The license check has failed. |
| IOException | Writing to the outStream failed. |
| ProcessingException | The document could not be processed. |
| ArgumentException | An OCR engine is required for the specified options but engine is . |
| ArgumentException | The options specifies invalid or contradictory settings. |
| ArgumentException | The outOptions specifies document encryption for a PDF/A file, which is not allowed. |
| GenericException | An unexpected failure occurred. |
| CorruptException | An input image in the document is corrupt and cannot be read. |
| PasswordException | The document is encrypted and the password is invalid. |
| ConformanceException | The document has an invalid conformance level. |
| UnsupportedFeatureException | The input PDF contains unrendered XFA form fields. See Xfa for more information. |
| ArgumentNullException | if document is . |
| ArgumentNullException | if outStream is . |