매일매일 IT
[NodeJS PDFKit] PDFKit 라이브러리로 PDF 만들기 본문
마지막에는 doc.end() 메소드를 호출해야 한당 !
어흥 ! PDFKit로 그래프 그리기 코드
메소드 이름 |
설명 |
rect(x, y, width, height) |
직사각형 그리기 |
roundRect(x, y, width, height, conerRadius) |
모퉁이가 둥근 사각형 그리기 |
ellipse(cx, cy, radiusX, radiusY) |
타원 그리기 |
circle(cx, cy, radius) |
원 그리기 |
polygon(points...) |
다각형 그리기 |
path(pathData) |
SVG의 path 지정하여 그리기 |
polygon() 메소드 사용법 ><
doc.polygon(
[150, 50], [100, 150], [200, 150]);
doc.stroke();
PDFKit : http://pdfkit.org
'Programming Language > JavaScript' 카테고리의 다른 글
[Rhino Apache POI] MS 엑셀을 자바에서 조작하는 라이브러리 JS로 이용하기 (0) | 2017.07.26 |
---|---|
[NodeJS Officegen] 신규 시트(sheet)에 데이터 쓰기 (0) | 2017.07.26 |
[NodeJS PhantomJS CasperJS] HTML 파일을 PDF로 변환 (0) | 2017.07.25 |
CoffeeScript (0) | 2017.07.24 |
String.replace() 메소드 (0) | 2017.07.20 |
Comments