GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Java/itext-java-html-pdf/src/main/java/com/hmkcode/App.java at master · user-git/Java Expand file tree/ Copy pathApp.javaMore file actions 31 lines (21 loc) · 790 Bytes / Copy pathApp.javaFile metadata and controls31 lines (21 loc) · 790 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 package com.hmkcode; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import com.itextpdf.html2pdf.HtmlConverter; public class App { public static final String HTML = "<h1>Hello</h1>" + "<p>This was created using iText</p>" + "<a href='hmkcode.com'>hmkcode.com</a>"; public static void main( String[] args ) throws FileNotFoundException, IOException { // String to PDF HtmlConverter.convertToPdf(HTML, new FileOutputStream("string-to-pdf.pdf")); // HTML file to PDF HtmlConverter.convertToPdf(new FileInputStream("index.html"), new FileOutputStream("index-to-pdf.pdf")); System.out.println( "PDF Created!" ); } } |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |