-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPdfWriter.java
More file actions
70 lines (53 loc) · 1.42 KB
/
PdfWriter.java
File metadata and controls
70 lines (53 loc) · 1.42 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
Class for native interface of pdf file with Cpp pdf writer.
*/
public class PdfWriter {
/*
Static block to load the pdf shared library.
*/
static{
System.loadLibrary("pdf");
}
/*
Method to set width and height of a pdf page.
@param width
@param height
*/
public native void setWidthHeight(int width, int height);
/*
Method to set the font type and the font size.
@param font
@prarm size
*/
public native void setFont(int font, int size);
/*
Method to set the text content of the page.
@param content
*/
public native void setContent(String content);
/*
Method to wrap text to page's width and height
@param maxWidth
@param isRightJustified
*/
public native void warpText(int maxWidth, boolean isRightJustified);
/*
Method to add page's meta data to a vector list in c++.
*/
public native void addToPage();
/*
Method to add new page.
*/
public native void addNewPage();
/*
Method to create a pdf file.
@return boolean value of the file is written or not.
*/
public native boolean writeToFile(String fileName);
/*
Method to set the x and y coordinated of the page content.
@param x
@param y
*/
public native void setXY(int x, int y);
}