Frequently Asked Question
How to use OpenMem method
Last Updated a year ago
This article shows how to use OpenMem method to open pdf with data (note: the pdf will be readonly).
int it;
for(it = 0; it < 512; it++) {
try {
InputStream str = getAssets().open("test.PDF");
byte data[] = new byte[115557];
str.read(data);
Document doc1 = new Document();
doc1.OpenMem(data, null);
doc1.Close();
str.close();
} catch (IOException e) {
e.printStackTrace();
}
}