pcorless / icepdf

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

ICEPdf 7.2.1 is not loading PDF and Hangs at all? #369

Closed ctoabidmaqbool closed 2 months ago

ctoabidmaqbool commented 3 months ago

I am not sure, but after upgrading ICEPdf 7.2.1 from 7.2.0 it continously hangs and not loading PDF at all!

This is just the info i can see on console window!

Aug 24, 2024 3:50:11 PM org.icepdf.core.pobjects.Catalog <clinit>
INFO: ICEpdf Core 7.2.1

How can i debug the issue and solve my problem, Iss there anything i have to change for working with 7.2.1?

Note: ICEPdf 7.2.0 is working well. My project is using Gradle 7.6.4 Java 17+

ctoabidmaqbool commented 3 months ago

Make sure, I am currently working with non-modular project, should this be the issue?

pcorless commented 3 months ago

Make sure you do gradle clean. The new fontbox jar depends on a pdfbox-io.jar, which is new to 7.2.1. I suspect this is why pages look blank

ctoabidmaqbool commented 3 months ago

@pcorless I also have tried by first cleaning (gradlew clean) my project then running (gradlew run) again, but still same issue:

image

pcorless commented 3 months ago

Can you list the jars on your class path, also any stack traces with debug level logging enabled

pcorless commented 2 months ago

any update?

ctoabidmaqbool commented 2 months ago

@pcorless Sorry! I can't update you back! I was actually working on some critical tasks. As soon as i have enough time, I will update back soon!

ctoabidmaqbool commented 2 months ago

@pcorless Okey! Fortunatly I have solve the solved. Actually I was working in a Complex project having hundreds of depedencies / libraries.

I was using org.apache.pdfbox:pdfbox:2.0.23, when i was using com.github.pcorless.icepdf:icepdf-core:7.2.0.

So after upgrading icepdf to 7.2.1, the old pdfbox lib e.g. 2.0.23 was causing the issue.

So I try to upgrade the pdfbox also to 3.0.3, which solved the above issue!

The IntelliJ Idea -> Dependency Analyzer becomes much help full to solve the issue. Also --stacktrace was nothing show any error / warning too!

pcorless commented 2 months ago

Good to hear.