Posts

Showing posts from August, 2015

Online Book Store Website Using Java

Image
=============================================== Login.html:- ================================================ <html>     <title>|| Login Page ||</title>     <body class="bod">         <form action='login.action'  method="post">             <table align='center'>                 <tr><td colspan='2' align='center'>                         <br></br>                         <h2 style="color: black; font-size: 30px; padding-top: 1%;" class="Head">User Login</h2></td></tr>                 <tr>                     <td><h2>UserName</h2></td>                     <td><input type='text' name='UserName' placeholder="UserName" autocomplete="off" required=""/></td></tr>                 <tr>                     <td><h

How to Create PDF File Using Java Code

package com.anand; import com.lowagie.text.Document; import com.lowagie.text.Paragraph; import com.lowagie.text.pdf.PdfWriter; import java.io.File; import java.io.FileOutputStream; import java.io.OutputStream; import java.util.Date; public class GeneratePDF {     public static void main(String[] args) {         try {             OutputStream file = new FileOutputStream(new File("/home/ananddw/test.pdf"));             Document document = new Document();             PdfWriter.getInstance(document, file);             document.open();             document.add(new Paragraph("welcome Anand in the World of PDF "));                        document.close();             file.close();         } catch (Exception e) {             e.printStackTrace();         }     } } =============================================== Attach Some Require Jar else you will get error  Thanks  Anand Dwivedi