Knowledge Base - Import page to a document

/**
* Import a page from source document to destination document in the specified index.
*
* @param srcPath the path of the source document.
* @param srcPass the password of the source document.
* @param srcPage the number of the page to import from source document. (0 based page NO)
* @param destDoc the destination document object
* @param destPage the number of the page to import into. (0 based page NO)
* @return the imported page number
*/
public static int importPageInto(String srcPath, String srcPass, int srcPage, Document destDoc, int destPage) {
try {
Document mSrcDoc = new Document();
if(mSrcDoc.Open(srcPath, srcPass) == 0) {
ImportContext mContext = destDoc.ImportStart(mSrcDoc);
if(mContext != null) {
if(destDoc.ImportPage(mContext, srcPage, destPage)) {
destPage++;
}
mContext.Destroy();
}
}
mSrcDoc.Close();
} catch (Exception e) {
e.printStackTrace();
}
return destPage;
}
Applies To

RadaeePDF SDK for Android, RadaeePDF Master SDK

Details

Created : 2020-10-01 09:34:24, Last Modified : 2020-10-01 09:37:24