Commit ac061b61 authored by shayan's avatar shayan

gg class created.

parents
Pipeline #306 canceled with stages
File added
import com.itextpdf.text.pdf.PdfReader;
public class gg {
public static void main(String[] args) {
try {
PdfReader pdfReader = new PdfReader("test.pdf");
int pages = pdfReader.getNumberOfPages();
System.out.println(pages);
//for (int i=1; i<=pages; i++) {
// String pageContent = PdfTextExtractor.getTextFromPage(pdfReader, i);
// System.out.println("Content on Page " + i + ": " + pageContent);
// }
} catch (Exception e)
{ e.printStackTrace();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment