- Posts: 3
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Android - Merge document - import fail
- maclanglade
- Topic Author
- Offline
- New Member
-
Less
More
11 years 4 months ago #8870
by maclanglade
Android - Merge document - import fail was created by maclanglade
Hi !
I'm trying to create an app which allow user to merge pdf.
I'm a radaee premium user.
My problem is :
- When I open a PDF in a fragment, and THEN, I'm launching merge => document.ImportPage return false.
- When I kill app and I start merge without open PDF, merge works fine.
Am I forging something ?
On Fragment finishing, I close document and stream...
Thanks.
I'm trying to create an app which allow user to merge pdf.
I'm a radaee premium user.
My problem is :
- When I open a PDF in a fragment, and THEN, I'm launching merge => document.ImportPage return false.
- When I kill app and I start merge without open PDF, merge works fine.
Am I forging something ?
On Fragment finishing, I close document and stream...
Thanks.
11 years 4 months ago - 11 years 4 months ago #8871
by Davide
Replied by Davide on topic Android - Merge document - import fail
Hi,
can you reproduce this issue in the demo project? Do you have this problem with specific pdf or with all?
You have to invoke ImportContext.Destroy() after all pages are imported.
For more info check this:
Maybe this thread will help you: www.radaeepdf.com/forum/Android-developm...g-false?limitstart=0
can you reproduce this issue in the demo project? Do you have this problem with specific pdf or with all?
You have to invoke ImportContext.Destroy() after all pages are imported.
For more info check this:
Maybe this thread will help you: www.radaeepdf.com/forum/Android-developm...g-false?limitstart=0
Last edit: 11 years 4 months ago by Davide.
- maclanglade
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
11 years 4 months ago #8873
by maclanglade
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 :
Replied by maclanglade on topic Android - Merge document - import fail
No, with demo code it works.can you reproduce this issue in the demo project?
Yes, with all PDF...Do you have this problem with specific pdf or with all?
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 :
Code:
@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;
}
}
- maclanglade
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
11 years 4 months ago #8877
by maclanglade
Replied by maclanglade on topic Android - Merge document - import fail
I've found the solution : I called Global.RemoveTmp();
Time to create page: 0.412 seconds