GroupDocs.Parser for Java requires Java 8 (1.8) or later (JDK to build your application, JRE or JDK to run it). See System Requirements for the full list of supported operating systems and development environments.
Item
Value
Group ID
com.groupdocs
Artifact ID
groupdocs-parser
Current version
26.10
Repository
https://releases.groupdocs.com/java/repo/
Note
The groupdocs-parser JAR is self-contained: its POM declares no transitive dependencies, so you add only the one artifact. A JDBC driver is needed only if you extract data from databases, and an OCR library only if you plug in an OCR connector.
After performing above-mentioned steps, GroupDocs.Parser for Java dependency will finally be added to your Maven project. Run mvn compile (or reload the Maven project in your IDE) to download it.
Install using Gradle
Add the GroupDocs repository and the dependency to your build.gradle:
Here’s a complete example of setting up a new console project:
# 1. Create a new projectmvn archetype:generate -DgroupId=com.example -DartifactId=parser-demo -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=falsecd parser-demo
# 2. Add the GroupDocs repository and the groupdocs-parser dependency to pom.xml (see above),# and set the compiler level to Java 8 or later# 3. Build and run the projectmvn compile exec:java -Dexec.mainClass=com.example.App
Then update src/main/java/com/example/App.java:
packagecom.example;importcom.groupdocs.parser.Parser;importcom.groupdocs.parser.data.TextReader;importjava.io.IOException;publicclassApp{publicstaticvoidmain(String[]args)throwsIOException{// Create an instance of Parser class
try(Parserparser=newParser("sample.pdf")){// Extract a text to the reader
try(TextReaderreader=parser.getText()){// Print an extracted text (or "not supported" message)
System.out.println(reader==null?"Text extraction isn't supported":reader.readToEnd());}}}}
Install from official GroupDocs website
You can follow the steps below to reference GroupDocs.Parser for Java downloaded from official website Downloads section:
Unpack zip archive.
Switch to lib folder.
Run install.bat (for Windows) or install.sh (for Linux) file to install the library in your local maven repository.
After this you should add the GroupDocs.Parser for Java dependency block to your pom.xml project file.
If you don’t use Maven or Gradle, add the groupdocs-parser-26.10.jar file to the classpath of your application (for example, in IntelliJ IDEA: File -> Project Structure -> Modules -> Dependencies -> + -> JARs or directories).
Linux environment
GroupDocs.Parser for Java is pure Java: unlike the .NET version, it doesn’t need native packages such as libgdiplus on Linux.
Text layout operations — page previews, text areas, formatted text and table detection in Word processing documents and presentations — use the fonts installed on the machine. Minimal Linux images often contain no fonts at all, which can change the measured positions of text. Install a set of TrueType fonts, for example the Microsoft compatible fonts: