create complex pdf from text file.
This program is executable file for windows, mac or linux.
Any language which create text file and execute child process can use this program.
This program use github.com/signintech/gopdf for pdf generation.
Columns must be separated by tab(\t).
P mm A4 L
F IPAexG 14
C1 50.00 15.00 Sales Report
F IPAexG 12
C1 240.00 20.00 page
C1 260.00 20.00 1
C1 15.00 23.00 D No
C1 30.00 23.00 Dept
C1 60.00 23.00 Order
C1 90.00 23.00 Stock
C1 120.00 23.00 Name
CR 135.00 23.00 25.00 Unit Price
CR 160.00 23.00 20.00 Qty
CR 190.00 23.00 20.00 Amount
pdf-by-text(.exe) -f fontfile -o outputfile -e encoding inputfile
-f -o -e are optional
fontfile default is font.yml
outputfile default is inputfile name with file extension changed to pdf
encoding default is UTF8. Accept ShiftJIS, EUCJP.
windows 386
windows amd64
mac 386
mac amd64
linux 386
linux amd64
- Simple command to draw object
- Support unit of mm(millimeter), pt(point) and in(Inch).
- Line can be used as gray fill pattern.
-
name:IPAexG
file:ttf\ipaexg.ttf
-
name:MPBOLD
file:ttf\mplus-1p-bold.ttf
Elements must be separated by tab(\t).
-
Page Setup
-
Predefined page
A {unit} {size} {orientation}
//unit mm(millimeter), pt(point), in(Inch)
//size A4 or LTR
//orientation P(portrate) or L(Landscape) -
Frexible Page
A1 {unit} {width} {height} -
New Page
NP -
Font setting
-
Font face F {fontname} {size} {style}
//style U for underline -
Text Color
TC {red} {green} {blue}
//color 255 - 0 -
Text Gray Scale
GF {scale}
// scale 100 - 0 -
Text Draw
-
Normal text
C1 {x} {y} {content} -
Right Jusify text
CR {x} {y} {width} {content} -
Line Draw
-
Line Type
LT {linetype} {width}
//lineType "dashed" ,"dotted","straight". "" = "straight" -
Gray Stroke (Gray Scale)
GS {scale}
// scale 100 - 0 -
Horizontal Line
LH {x1} {y} {x2} -
Vertical Line
LV {x} {y1} {y2} -
Line
L {x1} {y1} {x2} {y2} -
Shape Draw
- Rectangle
R {x1} {y1} {x2} {y2} - Oval
O {x1} {y1} {x2} {y2}
- Rectangle
-
Image Draw
I {path} {x1} {y1} {x2} {y2}
- Font style not allow B(bold) and I(italic).
- Line, Rect and Oval are Black and Gray only.
- Image file format is jpeg only.