pcorless / icepdf

PDF Rendering and Viewing API in Java
Apache License 2.0
76 stars 21 forks source link

Pdf viewer in Javafx not propperly close, #350

Closed ctoabidmaqbool1 closed 4 months ago

ctoabidmaqbool1 commented 4 months ago

I am not sure it's icepdf viewer issue or gluon side,

but when I run task gradlew nativeRunAgent after closing ice-pdf viewer still my app is running e.g. not propperly closing!

I have post the issue here too:

https://github.com/gluonhq/gluonfx-gradle-plugin/issues/188

ctoabidmaqbool1 commented 4 months ago

Okey, problem is fixed, it's was because PDF-Viewer was not closing propperly and was running in background after closing too.

Fixed using:


        viewerFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // Dispose JFrame on close
        viewerFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                viewerFrame.dispose(); // Dispose JFrame on window closing
            }
        });

Also comment is above sample provided!