←Select platform

WriteAsyncCompleted Event

Summary

Fires when the asynchronous PdfCompressorEngine.WriteAsync method finishes.

Syntax
C#
C++/CLI
Python
public event EventHandler<PdfCompressorWriteAsyncCompletedEventArgs> WriteAsyncCompleted 
public: 
event EventHandler<PdfCompressorWriteAsyncCompletedEventArgs^>^ WriteAsyncCompleted 
def WriteAsyncCompleted(sender,e): # sender: PdfCompressorEngine e: PdfCompressorWriteAsyncCompletedEventArgs 
Event Data

The event handler receives an argument of type PdfCompressorWriteAsyncCompletedEventArgs containing data related to this event. The PdfCompressorWriteAsyncCompletedEventArgs properties provide information specific to this event. Here is a summary of the most useful properties:

Property Description
FileName The name of the output PDF file. Can be null if the output was written to a stream.
Stream The stream containing the PDF output. Can be null if the output was written to a file.
UserState The userState parameter passed to the PdfCompressorEngine.WriteAsync method.
Cancelled true if the operation was cancelled, false otherwise.
Error The exception information class, if the operation threw an exception. null if the operation did not throw an exception.

The PdfCompressorEngine.WriteAsync method succeeded if Cancelled is false and Error is null.

Refer to PdfCompressorWriteAsyncCompletedEventArgs for more information.

The WriteAsyncCompleted property of the PdfCompressorEngine object allows you to register handlers for the WriteAsyncCompleted event. The first parameter passed to the event handler indicates which PdfCompressorEngine object fired the event.

Remarks

For more information, refer to Creating a Compressed PDF File.

Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.PdfCompressor Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.