Commit 5bc8c82e authored by --global's avatar --global

Lab4 finalfinal

parent ac061b61
Pipeline #313 canceled with stages
import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.parser.PdfTextExtractor;
public class gg { public class gg {
public static void main(String[] args) { public static void main(String[] args) {
...@@ -7,10 +8,10 @@ public class gg { ...@@ -7,10 +8,10 @@ public class gg {
int pages = pdfReader.getNumberOfPages(); int pages = pdfReader.getNumberOfPages();
System.out.println(pages); System.out.println(pages);
//for (int i=1; i<=pages; i++) { for (int i=1; i<=pages; i++) {
// String pageContent = PdfTextExtractor.getTextFromPage(pdfReader, i); String pageContent = PdfTextExtractor.getTextFromPage(pdfReader, i);
// System.out.println("Content on Page " + i + ": " + pageContent); System.out.println("Content on Page " + i + ": " + pageContent);
// } }
} catch (Exception e) } catch (Exception e)
{ e.printStackTrace(); { 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