public class MSTPdf extends MSTDocument
Modifier and Type | Field and Description |
---|---|
java.io.ByteArrayInputStream |
bin |
static MST.Imaging.Document.MSTech.DocumentServiceProvider |
DocEngine |
MST.Imaging.Document.MSTech.Document |
hDocument |
java.awt.Image[] |
imageArray |
FileName, FileStream, PageCount, Size, Uri
Constructor and Description |
---|
MSTPdf() |
Modifier and Type | Method and Description |
---|---|
FileFormat |
Detect()
Gives the file format for the corresponding IMSTFileFormat object.
|
boolean |
DropDocument()
All the reference of the corresponding document are made null.
|
boolean |
Export(java.io.FileOutputStream fos,
OutputType outputtype)
Exports the file in specified output type.
|
boolean |
Export(java.lang.String DestFileName,
OutputType outputtype,
java.lang.String Annotations,
SAVEOPTION options)
Exports the file in specified output type.
|
void |
gateWay(java.util.List objList,
java.io.OutputStream destFileName,
FileFormat fileFormat) |
java.lang.String |
getFileName()
Gives the name of the file loaded into the MSTImage object.
|
java.io.InputStream |
getFileStream()
Gives the Inputstream of the file.
|
java.lang.String |
getMimeType(int fileType) |
IMSTPage |
GetPage(int pageNo)
This method loads the page data into the IMSTPage object.
|
IMSTPage |
GetPage(int PageNo,
PageInfo pgInfo)
This method loads the page data into the IMSTPage object with the given parameters in PageInfo.
|
int |
getPageCount()
Gives the number of pages in the file.
|
boolean |
GetPageInfo(int[] pageNo,
PageInfo[] pageInfo)
Gives the information about the given array of pages .
|
boolean |
GetPageInfo(int pageNo,
PageInfo pageInfo)
Gives the information about a specific page .
|
IMSTPage[] |
GetPages(int fromPage,
int toPage,
java.util.List<PageInfo> listPageInfo)
This method loads the page data into the IMSTPage object with the given parameters in PageInfo.
|
java.lang.String |
getPdfAnnotation(java.lang.String n)
This is to get the pdf annotation in the form of xml file.
|
int |
getSize()
Gives the size of byte array of the loaded file.
|
boolean |
Load(java.io.InputStream stream)
This method loads the image data into the MSTImage object.
|
boolean |
Load(java.lang.String FileName)
This method loads the image data into the MSTImage object.
|
boolean |
Load(java.net.URI uri)
This method loads the image data into the MSTImage object.
|
boolean |
setPdfAnnotation(java.lang.String xmlFilePath)
This is to embedd the pdf annotation exported from the xml file.
|
Export, Export, getCompression
public java.awt.Image[] imageArray
public java.io.ByteArrayInputStream bin
public MST.Imaging.Document.MSTech.Document hDocument
public static MST.Imaging.Document.MSTech.DocumentServiceProvider DocEngine
public MSTPdf() throws java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.Exception
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.Exception
public boolean Load(java.lang.String FileName)
IMSTFileFormat
Load
in interface IMSTFileFormat
Load
in class MSTDocument
FileName
- Either name or the path of file.public boolean Load(java.io.InputStream stream)
IMSTFileFormat
Load
in interface IMSTFileFormat
Load
in class MSTDocument
stream
- InputStream object associated with the file that is to be loaded.public boolean Load(java.net.URI uri)
IMSTFileFormat
Load
in interface IMSTFileFormat
Load
in class MSTDocument
uri
- URI path of the file.public boolean DropDocument()
IMSTFileFormat
DropDocument
in interface IMSTFileFormat
DropDocument
in class MSTDocument
public IMSTPage GetPage(int pageNo)
IMSTFileFormat
GetPage
in interface IMSTFileFormat
GetPage
in class MSTDocument
pageNo
- page no of which the page data is to be loaded.public IMSTPage GetPage(int PageNo, PageInfo pgInfo)
IMSTFileFormat
GetPage
in interface IMSTFileFormat
GetPage
in class MSTDocument
pgInfo
- PageInfo Object having parameters as rotate,scale to be applied.public IMSTPage[] GetPages(int fromPage, int toPage, java.util.List<PageInfo> listPageInfo)
IMSTFileFormat
GetPages
in interface IMSTFileFormat
GetPages
in class MSTDocument
fromPage
- Range of pages.toPage
- Range of pages.listPageInfo
- List having the PageInfo objectspublic boolean GetPageInfo(int pageNo, PageInfo pageInfo)
IMSTFileFormat
GetPageInfo
in interface IMSTFileFormat
GetPageInfo
in class MSTDocument
pageNo
- page no. of which the information is to be filled into the referenced PageInfo object.pageInfo
- PageInfo object reference.public boolean GetPageInfo(int[] pageNo, PageInfo[] pageInfo)
IMSTFileFormat
GetPageInfo
in interface IMSTFileFormat
GetPageInfo
in class MSTDocument
pageNo
- page no. of which the information is to be filled into the referenced PageInfo object.pageInfo
- PageInfo object reference.public boolean Export(java.lang.String DestFileName, OutputType outputtype, java.lang.String Annotations, SAVEOPTION options)
IMSTFileFormat
Export
in interface IMSTFileFormat
Export
in class MSTDocument
DestFileName
- name of file in which the file is to be saved.outputtype
- MIME type of file which is to be saved.Annotations
- string contains the data about annotation.options
- saving options with specified output type with scaling,bitdepth,rotation,compression,annotation,pageno.public boolean Export(java.io.FileOutputStream fos, OutputType outputtype)
IMSTFileFormat
Export
in interface IMSTFileFormat
Export
in class MSTDocument
fos
- streaming file in which output image is saved.outputtype
- MIME type of file which is to be saved.public java.lang.String getFileName()
IMSTFileFormat
getFileName
in interface IMSTFileFormat
getFileName
in class MSTDocument
public java.io.InputStream getFileStream()
IMSTFileFormat
getFileStream
in interface IMSTFileFormat
getFileStream
in class MSTDocument
public int getPageCount()
IMSTFileFormat
getPageCount
in interface IMSTFileFormat
getPageCount
in class MSTDocument
public int getSize()
IMSTFileFormat
getSize
in interface IMSTFileFormat
getSize
in class MSTDocument
public java.lang.String getMimeType(int fileType)
getMimeType
in class MSTDocument
public FileFormat Detect()
IMSTFileFormat
Detect
in interface IMSTFileFormat
Detect
in class MSTDocument
public void gateWay(java.util.List objList, java.io.OutputStream destFileName, FileFormat fileFormat)
public boolean setPdfAnnotation(java.lang.String xmlFilePath)
n
- source file name (xml annotation file name).public java.lang.String getPdfAnnotation(java.lang.String n)
n
- destination file name.