E D R , A S I H C RSS

i Text

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();
        }
    }
      
    ๊ฒฐ๊ณผ ํŒŒ์ผ : Upload:Hello.pdf
----
๋„๊ตฌ๋ถ„๋ฅ˜, ํ”„๋กœ๊ทธ๋ž˜๋ฐ๋ถ„๋ฅ˜
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:41
Processing time 0.0935 sec