OptimizerOptimize |
Optimize the PDF document
public Document OptimizeDocument( Document inDoc, Stream outStream, Profile profile, OutputOptions outOptions = null )
The optimized result 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. |
| ArgumentException | An invalid encryption was specified in outOptions. |
| ProcessingException | The processing has failed. |
| IOException | Writing to the output PDF has failed. |
| GenericException | A generic error occurred. |
| ArgumentNullException | if inDoc is . |
| ArgumentNullException | if outStream is . |
| ArgumentNullException | if profile is . |