Advertisement
Guest User

Untitled

a guest
Sep 6th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1.  
  2. import com.itextpdf.text.Document;
  3. import com.itextpdf.text.Paragraph;
  4. import com.itextpdf.text.pdf.PdfWriter;
  5. import java.io.FileOutputStream;
  6.  
  7. public class PDFTest {
  8. public static void main (String[] args){
  9. Document deck = new Document();
  10. try{
  11. PdfWriter.getInstance(deck, new FileOutputStream("Deck Of Cards.pdf"));
  12. deck.open();
  13. Paragraph cards = new Paragraph();
  14. cards.add("This is a deck of cards");
  15. deck.close();
  16. } catch(Exception e){
  17. e.printStackTrace();
  18. }
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement