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.0095 sec