Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lab4
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731069
Lab4
Commits
40f0fa4e
Commit
40f0fa4e
authored
Mar 11, 2019
by
m.m.vahedi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
somethings added
parents
Pipeline
#334
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
Main.java
src/Main.java
+6
-0
PDFReaderTest.java
src/PDFFReaderTest/PDFReaderTest.java
+23
-0
test.pdf
src/PDFFReaderTest/test.pdf
+0
-0
No files found.
src/Main.java
0 → 100644
View file @
40f0fa4e
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
// write your code here
}
}
src/PDFFReaderTest/PDFReaderTest.java
0 → 100644
View file @
40f0fa4e
package
PDFFReaderTest
;
import
com.itextpdf.text.pdf.*
;
import
com.itextpdf.text.pdf.parser.PdfTextExtractor
;
import
java.io.IOException
;
public
class
PDFReaderTest
{
public
static
void
main
(
String
arf
[])
throws
IOException
{
PdfReader
pdfReader
=
null
;
try
{
pdfReader
=
new
PdfReader
(
"test.pdf"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
int
pages
=
pdfReader
.
getNumberOfPages
();
for
(
int
i
=
1
;
i
<=
pages
;
i
++
){
String
pageContent
=
PdfTextExtractor
.
getTextFromPage
(
pdfReader
,
i
);
System
.
out
.
println
(
"Content on page "
+
i
+
": "
+
pageContent
);
}
}
}
src/PDFFReaderTest/test.pdf
0 → 100644
View file @
40f0fa4e
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment