Click or drag to resize

IFilter Interface

Provides a generic view of a sequence of bytes.

A Filter is an abstraction of a sequence of bytes, such as a file, an input/output device, an inter-process communication pipe, or a TCP/IP socket. The Filter class and its derived classes provide a generic view of these different types of input and output, isolating the programmer from the specific details of the operating system and the underlying devices.

Besides providing access to input/output sources Filters can be also to transform the data (e.g. to compress the data stream, to normalize the image data, to encrypt data, etc). Filters can also be attached to each other to form pipelines. For example, a filter used to open an image data file can be attached to a filter that decompresses the data, which is attached to another filter that will normalize the image data.

Depending on the underlying data source or repository, filters might support only some of these capabilities. An application can query a stream for its capabilities by using the IsInputFilter() and CanSeek() properties.

To read or write data to a filter, a user will typically use FilterReader/FilterWriter class. instead of using Filter methods
MappedFile file = new MappedFile("my_stream.txt", MappedFile.e_read_mode);
FilterReader reader = new FilterReader(file);
while (reader.Read(...)) ...

Namespace:  pdftron.Filters
Assembly:  pdftron (in pdftron.dll) Version:
public interface IFilter

The IFilter type exposes the following members.

Public methodGetFilterType
Returns the type of this filter.
Public methodWriteToFile
Writes the entire filter, starting at current position, to specified filepath. Should only be called on an input filter.
See Also