Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Android - Merge document - import fail 8 years 11 months ago #8870

  • maclanglade
  • maclanglade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
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.

Please Log in or Create an account to join the conversation.

Android - Merge document - import fail 8 years 11 months ago #8871

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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

Please Log in or Create an account to join the conversation.

Last edit: by Davide.

Android - Merge document - import fail 8 years 11 months ago #8873

  • maclanglade
  • maclanglade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0

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;
        }
    }

Please Log in or Create an account to join the conversation.

Android - Merge document - import fail 8 years 11 months ago #8877

  • maclanglade
  • maclanglade's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
I've found the solution : I called Global.RemoveTmp();

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum