Java๋ฅผ ์ด์ฉํ์ฌ PDF ํ์ผ์ ์ ์์ ๋์์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ. ๋ผ์ด์ ์ค๋ MPL๊ณผ LGPL.
RefactorMe ํ์ด์ง์ด๋ฆ์ด ๋ถ์ ์ ํ๋ค๊ณ ์๊ฐํ์๋ ๋ถ์ ํ์ด์ง์ด๋ฆ๋ฐ๊พธ๊ธฐํด ์ฃผ์ธ์. ํ๋ก์ ํธ(๋ผ์ด๋ธ๋ฌ๋ฆฌ) ์ด๋ฆ์ ๊ทธ๋๋ก ์ฌ์ฉํ์ต๋๋ค.
์์ ¶
- HelloWorld
~cpp package spike; import java.io.FileNotFoundException; import java.io.FileOutputStream; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Paragraph; import com.lowagie.text.pdf.PdfWriter; public class HelloWorld { public HelloWorld() { writeHello(); } private void writeHello() { Document document = new Document(); try { PdfWriter.getInstance(document, new FileOutputStream("Hello.pdf")); document.open(); document.add(new Paragraph("Hello, World")); document.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (DocumentException e) { e.printStackTrace(); } } public static void main(String args[]) { new HelloWorld(); } }
๊ฒฐ๊ณผ ํ์ผ :Hello.pdf
๋๊ตฌ๋ถ๋ฅ, ํ๋ก๊ทธ๋๋ฐ๋ถ๋ฅ