Commit df2ef48b authored by Amirhosein Rajabpour's avatar Amirhosein Rajabpour

third commit

parent c2c6c27c
Pipeline #314 canceled with stages
......@@ -7,16 +7,14 @@ public class Main {
try {
PdfReader pdfReader = new PdfReader("Lab1.pdf");
System.out.println(pdfReader.getNumberOfPages());
} catch (Exception e) {
e.printStackTrace();
}
int pages = pdfReader.getNumberOfPages();
for (int i = 1; i <= pages; i++) {
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