FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
excel_pdf/JavaTPCProject/src/Project04_B.java at master · TypeP/excel_pdf · GitHub
TypeP
excel_pdf
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
excel_pdf
/
JavaTPCProject
/
src
/
Project04_B.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (31 loc) · 929 Bytes
Breadcrumbs
excel_pdf
/
JavaTPCProject
/
src
/
Project04_B.java
Copy path
File metadata and controls
46 lines (31 loc) · 929 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import
java
.
io
.*;
import
com
.
itextpdf
.
text
.*;
import
com
.
itextpdf
.
text
.
pdf
.
PdfWriter
;
public
class
Project04_B
{
public
static
void
main
(
String
[]
args
) {
Document
doc
=
new
Document
();
try
{
FileOutputStream
fos
=
new
FileOutputStream
(
"paragraphDemo.pdf"
);
PdfWriter
.
getInstance
(
doc
,
fos
);
doc
.
open
();
String
content
=
"Your word is a lamp to my feet and a light for my path"
;
Paragraph
par1
=
new
Paragraph
(
32
);
par1
.
setSpacingBefore
(
50
);
par1
.
setSpacingAfter
(
50
);
for
(
int
i
=
0
;
i
<
20
;
i
++) {
Chunk
chunk
=
new
Chunk
(
content
);
par1
.
add
(
chunk
);
}
doc
.
add
(
par1
);
Paragraph
par2
=
new
Paragraph
();
for
(
int
i
=
0
;
i
<
10
;
i
++) {
par2
.
add
(
new
Chunk
(
content
));
}
doc
.
add
(
par2
);
doc
.
close
();
System
.
out
.
println
(
"paragraphDemo 생성"
);
}
catch
(
Exception
e
) {
e
.
printStackTrace
();
}
}
}
Back
|
FazBrowse Home
|
New Git URL