Defines the methods that are required for instantiating and releasing an output page stream.
The PageStreamFactory interface declares methods that are used to create and release an output page stream. Implementations of this interface should provide the necessary functionality to create a page stream for writing output page data, as well as release any resources associated with the page stream.
Example usage:
final PageStreamFactory pageStreamFactory = new PageStreamFactory() {
public OutputStream createPageStream(int pageNumber) {
// Custom implementation to create and return an output page stream for the specified page number
}
@Override
public void closePageStream(int pageNumber, OutputStream pageStream) {
// Custom implementation to release any resources associated with the output page stream
}
};
PngViewOptions pngViewOptions = new PngViewOptions(pageStreamFactory);
// Use pngViewOptions in Viewer