public class PDFPrinterBuilder extends Object
| Modifier and Type | Field and Description | 
|---|---|
static boolean | 
DEBUG  | 
| Constructor and Description | 
|---|
PDFPrinterBuilder()  | 
| Modifier and Type | Method and Description | 
|---|---|
static byte[] | 
createPDF(javax.faces.context.FacesContext context,
         String html)
Return a byte representation of a PDF file, based on a HTML String. 
 | 
static byte[] | 
createPDF(javax.faces.context.FacesContext context,
         String html,
         PageOrientation pageOrientation,
         boolean cacheCss,
         boolean replaceHttp)
Return a byte representation of a PDF file, based on a HTML String. 
 | 
static String | 
getBaseURI(javax.faces.context.FacesContext context)
Get base URI of application, the pattern is : scheme + server name+ port,
 example: http://180.1.1.10:8080 
 | 
Document | 
getDocument(String content)  | 
public static String getBaseURI(javax.faces.context.FacesContext context)
context - public static byte[] createPDF(javax.faces.context.FacesContext context,
               String html)
                        throws com.itextpdf.text.DocumentException,
                               IOException
context - html - com.itextpdf.text.DocumentExceptionIOExceptionpublic static byte[] createPDF(javax.faces.context.FacesContext context,
               String html,
               PageOrientation pageOrientation,
               boolean cacheCss,
               boolean replaceHttp)
                        throws com.itextpdf.text.DocumentException,
                               IOException
context - html - pageOrientation - cacheCss - Cache CSS resourcesreplaceHttp - Replace HTTPS with HTTPcom.itextpdf.text.DocumentExceptionIOExceptionpublic Document getDocument(String content) throws UnsupportedEncodingException, SAXException, IOException, ParserConfigurationException
Copyright © 2015. All rights reserved.