public class ComHelper extends Object
Provides methods for COM clients to load a document into Aspose.PDF.
Use the ComHelper class to load a document from a file or stream into a Document object in a COM application. The Document class provides a default constructor to create a new document and also provides overloaded constructors to load a document from a file or stream. If you are using Aspose.Words from a .NET application, you can use all of the Document constructors directly, but if you are using Aspose.PDF from a COM application, only the default Document constructor is available.
Constructor and Description |
---|
ComHelper() |
Modifier and Type | Method and Description |
---|---|
Document |
openFile(String filename)
Just create and return Document using
filename . |
Document |
openFile(String filename,
LoadOptions options)
Open an existing document from a file providing necessary converting oprions to get pdf
document.
|
Document |
openFile(String filename,
String password)
Initialize and return new instance of the
Document class for working with encrypted
document. |
Document |
openFile(String filename,
String password,
boolean isManagedStream)
Initialize new instance of the
Document class for working with encrypted document. |
Document |
openStream(InputStream input)
Initialize and return new Document instance from the
input stream. |
Document |
openStream(InputStream input,
boolean isManagedStream)
Initialize and return new Document instance from the
input stream. |
Document |
openStream(InputStream input,
LoadOptions options)
Open and return an existing document from a stream providing necessary converting to get pdf
document.
|
Document |
openStream(InputStream input,
String password)
Initialize and return new Document instance from the
input stream. |
Document |
openStream(InputStream input,
String password,
boolean isManagedStream)
Initialize and return new Document instance from the
input stream. |
public Document openStream(InputStream input)
Initialize and return new Document instance from the input
stream.
input
- Stream with pdf document.public Document openStream(InputStream input, String password)
Initialize and return new Document instance from the input
stream.
input
- Input stream object, corresponding pdf is password protected.password
- User or owner password.public Document openStream(InputStream input, boolean isManagedStream)
Initialize and return new Document instance from the input
stream.
input
- Stream with pdf document.isManagedStream
- if set to true
inner stream is closed before exit; otherwise, is not.public Document openStream(InputStream input, String password, boolean isManagedStream)
Initialize and return new Document instance from the input
stream.
input
- Stream with pdf document.password
- User or owner password.isManagedStream
- if set to true
inner stream is closed before exit; otherwise, is not.public Document openStream(InputStream input, LoadOptions options)
Open and return an existing document from a stream providing necessary converting to get pdf document.
input
- Input stream to convert into pdf document.options
- Represents properties for converting input
into pdf document.public Document openFile(String filename)
Just create and return Document using filename
. The same as Document(Stream)
.
filename
- The name of the pdf document file.public Document openFile(String filename, String password)
Initialize and return new instance of the Document
class for working with encrypted
document.
filename
- Document file name.password
- User or owner password.public Document openFile(String filename, String password, boolean isManagedStream)
Initialize new instance of the Document
class for working with encrypted document.
filename
- Document file name.password
- User or owner password.isManagedStream
- if set to true
inner stream is closed before exit; otherwise, is not.public Document openFile(String filename, LoadOptions options)
Open an existing document from a file providing necessary converting oprions to get pdf document.
filename
- Input file to convert into pdf document.options
- Represents properties for converting filename
into pdf document.