can you reproduce this issue in the demo project?
No, with demo code it works.
Do you have this problem with specific pdf or with all?
Yes, with all PDF...
I've already jave a look to that thread but it don't helps me
The strange behavior is that I need to kill app (not exit and restart, but kill app and restart) to make it work...
I summarizes the problem :
Do not work : launch app, open pdf with reader fragment, close pdf, launch merge ==>document.ImportPage return false.
Works : kill app, launch app, DO NOT open any pdf with reader fragment, launch merge ==> document is merged !
I think doc or stream is not closed, or context is not correct ?
Look at my ReaderFragment's onStop method :
@Override
public void onStop() {
clearCurrentDocument();
Global.RemoveTmp();
super.onStop();
}
public void clearCurrentDocument() {
if (mPdfThumbs != null) {
mPdfThumbs.thumbClose();
}
if (mPdfReaderController != null) {
mPdfReaderController.close();
mPdfReaderController = null;
}
if (doc != null) {
doc.Close();
doc = null;
}
if (stream != null) {
stream.close();
stream = null;
}
}