public interface IpCOS
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convert_to_unicode(java.lang.String inputformat,
byte[] inputstring,
java.lang.String optlist)
Convert a string in an arbitrary encoding to a Unicode string in various formats.
|
void |
create_pvf(java.lang.String filename,
byte[] data,
java.lang.String optlist)
Create a named virtual read-only file from data provided in memory.
|
int |
delete_pvf(java.lang.String filename)
Delete a named virtual file and free its data structures (but not the contents).
|
void |
delete()
Delete underlying object.
|
java.lang.String |
get_apiname()
Get the name of the API function which threw the last exception or failed.
|
java.lang.String |
get_errmsg()
Get the text of the last thrown exception or the reason of a failed function call.
|
int |
get_errnum()
Get the number of the last thrown exception or the reason of a failed function call.
|
double |
info_pvf(java.lang.String filename,
java.lang.String keyword)
Query properties of a virtual file or the PDFlib Virtual Filesystem (PVF).
|
void |
pcos_close_document(int doc,
java.lang.String optlist)
Close the input PDF document.
|
double |
pcos_get_number(int doc,
java.lang.String path)
Get the value of a pCOS path with type number or boolean.
|
byte[] |
pcos_get_stream(int doc,
java.lang.String optlist,
java.lang.String path)
Get the contents of a pCOS path with type stream, fstream, or string.
|
java.lang.String |
pcos_get_string(int doc,
java.lang.String path)
Get the value of a pCOS path with type name, number, string, or boolean.
|
int |
pcos_open_document(java.lang.String filename,
java.lang.String optlist)
Open a disk-based or virtual PDF document and prepare it for later use.
|
void |
set_option(java.lang.String optlist)
Set one or more global options.
|
double pcos_get_number(int doc, java.lang.String path) throws java.lang.Exception
doc
- A valid document handle obtained with pcos_open_document()path
- A full pCOS path for a numerical or boolean objectjava.lang.Exception
- (see manual)java.lang.String pcos_get_string(int doc, java.lang.String path) throws java.lang.Exception
doc
- A valid document handle obtained with pcos_open_document()path
- A full pCOS path for a string, number, name, or boolean objectjava.lang.Exception
- (see manual)byte[] pcos_get_stream(int doc, java.lang.String optlist, java.lang.String path) throws java.lang.Exception
doc
- A valid document handle obtained with pcos_open_document()optlist
- An option list specifying stream retrieval optionspath
- A full pCOS path for a stream or string objectjava.lang.Exception
- (see manual)int pcos_open_document(java.lang.String filename, java.lang.String optlist) throws java.lang.Exception
filename
- The full path name of the PDF file to be opened.
The file will be searched by means of the SearchPath resource.optlist
- An option list with document options.java.lang.Exception
- (see manual)void pcos_close_document(int doc, java.lang.String optlist) throws java.lang.Exception
doc
- A valid document handle obtained with pcos_open_document()optlist
- An option listjava.lang.Exception
- (see manual)void set_option(java.lang.String optlist) throws java.lang.Exception
optlist
- An option list specifying global optionsjava.lang.Exception
- (see manual)void create_pvf(java.lang.String filename, byte[] data, java.lang.String optlist) throws java.lang.Exception
filename
- The name of the virtual filedata
- Data for the virtual fileoptlist
- An option listjava.lang.Exception
- (see manual)int delete_pvf(java.lang.String filename) throws java.lang.Exception
filename
- The name of the virtual file.java.lang.Exception
- (see manual)double info_pvf(java.lang.String filename, java.lang.String keyword) throws java.lang.Exception
filename
- The name of the virtual file. The filename may be empty
if keyword=filecount.keyword
- A keyword for the requested informationjava.lang.Exception
- (see manual)java.lang.String convert_to_unicode(java.lang.String inputformat, byte[] inputstring, java.lang.String optlist) throws java.lang.Exception
inputformat
- Unicode text format or encoding name specifying
interpretation of the input stringinputstring
- String to be converted to Unicodeoptlist
- An option list specifying options for input
interpretation and Unicode conversionjava.lang.Exception
- (see manual)void delete()
java.lang.String get_errmsg()
int get_errnum()
java.lang.String get_apiname()