public class ERPDFUtilities extends Object
Modifier and Type | Method and Description |
---|---|
static NSData |
htmlAsPdf(String content)
Turns a valid XHTML document string and renders it as a PDF document.
|
static NSData |
htmlAsPdf(String content,
String encoding)
Turns a valid XHTML document string and renders it as a PDF document.
|
static NSData |
htmlAsPdf(String content,
String encoding,
String urlPrefix)
Turns a valid XHTML document string and renders it as a PDF document.
|
static NSData |
htmlAsPdf(String html,
String encoding,
String urlPrefix,
NSDictionary<String,Object> config)
Turns a valid XHTML document string and renders it as a PDF document.
|
static WOActionResults |
pageAsPdf(WOElement element)
Creates and returns a component that will render the output of the passed
wocomponent as a PDF when response generation is invoked.
|
static WOActionResults |
pageAsPdf(WOElement element,
NSDictionary<String,Object> config)
Creates and returns a page component that will render the output of the
passed component as a PDF when appendToResponse() is called.
|
static NSData |
xml2Fop2Pdf(String xml,
String fopxsl,
NSDictionary<String,Object> config)
takes xml as a string and a transform document as a url and transforms it
to pdf like freakin' magic.
|
public static WOActionResults pageAsPdf(WOElement element)
element
- the component you want to render as a PDFpublic static WOActionResults pageAsPdf(WOElement element, NSDictionary<String,Object> config)
element
- the component you want to render as a PDFconfig
- a dictionary of binding values to use to configure the PDFWrapper
component and subsequent rending engine. See PDFWrapper for
details on available bindings.public static NSData htmlAsPdf(String content)
content
- a string containing valid XHTML markuppublic static NSData htmlAsPdf(String content, String encoding)
content
- a string containing valid XHTML markupencoding
- the encoding type used by the html stringpublic static NSData htmlAsPdf(String content, String encoding, String urlPrefix)
content
- a string containing valid XHTML markupencoding
- the encoding type used by the html stringurlPrefix
- the URL prefix to prepend to unqualified URLs in the htmlpublic static NSData htmlAsPdf(String html, String encoding, String urlPrefix, NSDictionary<String,Object> config)
html
- a string containing valid XHTML markupencoding
- the encoding type used by the html stringurlPrefix
- the URL prefix to prepend to unqualified URLs in the htmlconfig
- a dictionary of binding values used to configure the rending
engine specified in the "engine" key. See the chosen rendering
engine's documentation for available config options.public static NSData xml2Fop2Pdf(String xml, String fopxsl, NSDictionary<String,Object> config) throws Throwable
xml
- a string of xml to be passed into the transformation processfopxsl
- the location of the xml->fo transform sheet (should be in the classpath)config
- dictionary of additional configuration elements for the fop engineThrowable
- java.io.IOExceptionCopyright © 2002 – 2024 Project Wonder.