Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lab 4
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
9731016
lab 4
Commits
ec95590f
Commit
ec95590f
authored
Mar 12, 2019
by
m0hh0s
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parents
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
itext-5.0.5.jar
itext-5.0.5.jar
+0
-0
lab4.iml
lab4.iml
+21
-0
Main.java
src/Main.java
+18
-0
No files found.
itext-5.0.5.jar
0 → 100644
View file @
ec95590f
File added
lab4.iml
0 → 100644
View file @
ec95590f
<?xml version="1.0" encoding="UTF-8"?>
<module
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
inherit-compiler-output=
"true"
>
<exclude-output
/>
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$/src"
isTestSource=
"false"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"module-library"
>
<library>
<CLASSES>
<root
url=
"jar://$MODULE_DIR$/itext-5.0.5.jar!/"
/>
</CLASSES>
<JAVADOC
/>
<SOURCES
/>
</library>
</orderEntry>
</component>
</module>
\ No newline at end of file
src/Main.java
0 → 100644
View file @
ec95590f
import
com.itextpdf.text.pdf.PdfReader
;
public
class
Main
{
public
static
void
main
(
String
[]
args
)
{
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
);
}
}
}
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