FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java/itext-java-pdf-table/src/main/java/com/hmkcode/App.java at master · polpal/Java · GitHub
polpal
Java
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Java
/
itext-java-pdf-table
/
src
/
main
/
java
/
com
/
hmkcode
/
App.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (25 loc) · 815 Bytes
Breadcrumbs
Java
/
itext-java-pdf-table
/
src
/
main
/
java
/
com
/
hmkcode
/
App.java
Copy path
File metadata and controls
34 lines (25 loc) · 815 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
package
com
.
hmkcode
;
import
java
.
io
.
FileNotFoundException
;
import
java
.
io
.
FileOutputStream
;
import
com
.
itextpdf
.
text
.
Document
;
import
com
.
itextpdf
.
text
.
DocumentException
;
import
com
.
itextpdf
.
text
.
PageSize
;
import
com
.
itextpdf
.
text
.
pdf
.
PdfWriter
;
public
class
App
{
public
static
void
main
(
String
[]
args
)
throws
FileNotFoundException
,
DocumentException
{
// step 1
Document
document
=
new
Document
();
document
.
setPageSize
(
PageSize
.
A4
);
// step 2
PdfWriter
.
getInstance
(
document
,
new
FileOutputStream
(
"pdf.pdf"
));
// step 3
document
.
open
();
// step 4 create PDF contents
document
.
add
(
TableBuilder
.
createTable
());
//step 5
document
.
close
();
System
.
out
.
println
(
"PDF Created!"
);
}
}
Back
|
FazBrowse Home
|
New Git URL