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