java.lang.AutoCloseable
MultiPageDocument
, SinglePageDocument
public abstract class Document extends NativeObject implements java.lang.AutoCloseable
open(com.pdftools.sys.Stream)
or the result of an operation, e.g. of PDF to image conversion using pdftools.pdf2image.Converter.convertPage
.Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Close the object.
|
static Document |
open(Stream stream) |
Open an image document
|
equals, hashCode
public static Document open(Stream stream) throws LicenseException, UnknownFormatException, CorruptException
stream
- The stream from which the image is read.LicenseException
- The license check has failed.UnknownFormatException
- The document has a not recognized image format.CorruptException
- The document is corrupt or not an image.java.lang.IllegalArgumentException
- if stream
is null
public void close() throws PdfToolsException, java.io.IOException
close
in interface java.lang.AutoCloseable
PdfToolsException
- only explicitly stated in a superclassjava.io.IOException