public class Document
extends java.lang.Object
Constructor and Description |
---|
Document() |
Document(int[] vals)
inner function.
|
Modifier and Type | Method and Description |
---|---|
boolean |
CanSave()
check if document can be modified or saved.
this always return false, if no license actived. |
void |
Close()
close the document.
|
java.lang.String |
GetMeta(java.lang.String tag)
get meta data for document.
|
int |
GetOutlineChild(int outline)
get first child outline item.
|
int |
GetOutlineDest(int outline)
get goto page NO.
|
int |
GetOutlineNext(int outline)
get next outline item
|
int |
GetOutlines()
get root outline item.
|
java.lang.String |
GetOutlineTitle(int outline)
get label of the outline item
|
Page |
GetPage(int pageno)
get a Page object for page NO.
|
int |
GetPageCount()
get pages count.
|
float |
GetPageHeight(int pageno)
get page height by page NO.
|
float |
GetPageWidth(int pageno)
get page width by page NO.
|
int[] |
getVals()
inner function.
|
boolean |
is_opened()
check if opened.
|
boolean |
IsEncrypted()
check if document is encrypted.
|
int |
Open(java.lang.String path,
java.lang.String password)
open document.
first time, SDK try password as user password, and then try password as owner password. |
int |
OpenMem(byte[] data,
java.lang.String password)
open document in memory.
|
boolean |
Save()
save the document.
this always return false, if no license actived. |
boolean |
SaveAs(java.lang.String path)
save as the document to another file.
|
boolean |
SetMeta(java.lang.String tag,
java.lang.String val)
set meta data for document.
this method valid only in premium version. |
public Document()
public Document(int[] vals)
vals
- public int[] getVals()
public boolean is_opened()
public int Open(java.lang.String path, java.lang.String password)
path
- PDF file to be open.password
- password or null.public int OpenMem(byte[] data, java.lang.String password)
data
- data for whole PDF file in byte array. developers should retain array data, till document closed.password
- password or null.public void Close()
public Page GetPage(int pageno)
pageno
- 0 based page NO. range:[0, GetPageCount()-1]public int GetPageCount()
public float GetPageWidth(int pageno)
pageno
- 0 based page NO. range:[0, GetPageCount()-1]public float GetPageHeight(int pageno)
pageno
- 0 based page NO. range:[0, GetPageCount()-1]public java.lang.String GetMeta(java.lang.String tag)
tag
- Predefined values:"Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", "ModDate".public boolean SetMeta(java.lang.String tag, java.lang.String val)
tag
- Predefined values:"Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", "ModDate".val
- string value.public int GetOutlines()
public int GetOutlineDest(int outline)
outline
- handle value of outline item.public int GetOutlineNext(int outline)
outline
- handle value of current outline item.public int GetOutlineChild(int outline)
outline
- handle value of parent outline item.public java.lang.String GetOutlineTitle(int outline)
outline
- handle value of outline item.public boolean CanSave()
public boolean Save()
public boolean SaveAs(java.lang.String path)
path
- path to save.public boolean IsEncrypted()