import com.cete.dynamicpdf.merger.PdfDocument; public class MyClass { public static void main(String args[]) { // Create PDF document object PdfDocument pdfA = new PdfDocument("[physicalpath]/ImportPDF.pdf"); // Call GetText method from PDF document object to get the text from the document String extractedText = pdfA.getText(); } }