I’m trying to merge PDFs using iText 8.0.4 in a Java project. However, I’m encountering an issue where the class files seem to be incompatible with my Java version. Here are the details:
- Java version: Java 6 (1.6.0_27)
- iText version: 8.0.4
- Operating System: Windows 10
Error Message:
D:ProjectsPDFPRojectsrccomlgcdwsdimsngwellexplorerPDFMerge.java:3:38
java: /D:/Projects/PDFPRoject/src/com/lgc/dws/dimsng/wellexplorer/PDFMerge.java:3: cannot access com.itextpdf.io.font.constants.StandardFonts
bad class file: jar:///D:/Projects/PDFPRoject/lib/iText/io-8.0.4.jar!/com/itextpdf/io/font/constants/StandardFonts.class from ZipFileObject
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Why am I encountering the class file has wrong version 52.0, should be 50.0 error, and how can I resolve this issue to successfully compile and run my project with iText 8.0.4 and Java 1.6.0_27?
If I need a legacy version of iText then please guide me from where I can find legacy iText jar files.
Note: I cannot upgrade my Java version.