Htmltopdf

org.beangle.doc.pdf.wk.Htmltopdf
See theHtmltopdf companion object
class Htmltopdf

转换HTML到PDF工具类

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Constructors

def this(initSettings: Map[String, String])

Concrete methods

def collate(collate: Boolean): Htmltopdf.this.type

打印多份时,是否连续生成一份之后再生成下一份

打印多份时,是否连续生成一份之后再生成下一份

Attributes

def colorMode(colorMode: String): Htmltopdf.this.type

输出文档的颜色模式,Color/Grayscale

输出文档的颜色模式,Color/Grayscale

Attributes

def compression(compression: Boolean): Htmltopdf.this.type

是否启用PDF压缩

是否启用PDF压缩

Attributes

def cookieJar(cookieJar: String): Htmltopdf.this.type

当加载和存储cookie时使用的jar路径

当加载和存储cookie时使用的jar路径

Attributes

def disableSmartShrinking(disable: Boolean): Htmltopdf.this.type

禁止只能缩小策略(WebKit会依据pixel/dpi比例)

禁止只能缩小策略(WebKit会依据pixel/dpi比例)

Attributes

def documentTitle(title: String): Htmltopdf.this.type

文档的标题

文档的标题

Attributes

def dpi(dpi: Int): Htmltopdf.this.type

文档的DPI

文档的DPI

Attributes

def error(errorConsumer: Consumer[String]): Htmltopdf.this.type

添加一个监听转换过程中的失败消息的函数

添加一个监听转换过程中的失败消息的函数

Attributes

def failure(failureRunnable: Runnable): Htmltopdf.this.type

添加一个失败的回调函数

添加一个失败的回调函数

Attributes

def finished(finishConsumer: Consumer[Boolean]): Htmltopdf.this.type

添加一个转换结束的可运行函数,成功与否都会调用

添加一个转换结束的可运行函数,成功与否都会调用

Attributes

def getSetting(name: String): Option[String]
def imageDpi(imageDpi: Int): Htmltopdf.this.type

图片的最大DPI

图片的最大DPI

Attributes

def imageQuality(quality: Int): Htmltopdf.this.type

图片的压缩比(1-100)

图片的压缩比(1-100)

Attributes

def margin(m: PageMargin): Htmltopdf.this.type

边距(使用css单位,例如5in,15px),顺序按照 顶、右、底、左

边距(使用css单位,例如5in,15px),顺序按照 顶、右、底、左

Attributes

def orientation(orientation: Orientation): Htmltopdf.this.type

横向纵向(Landscape)

横向纵向(Landscape)

Attributes

def outline(outline: Boolean): Htmltopdf.this.type

是否生成文档大纲

是否生成文档大纲

Attributes

def outlineDepth(outlineDepth: Int): Htmltopdf.this.type

文档大纲的最大深度

文档大纲的最大深度

Attributes

def page(page: WKPage): Htmltopdf.this.type

添加一个页面

添加一个页面

Attributes

def pageSize(pageSize: PageSize): Htmltopdf.this.type

纸张大小(A3,A4,A5..)

纸张大小(A3,A4,A5..)

Attributes

def progress(progressChangeConsumer: Consumer[ProgressPhase]): Htmltopdf.this.type

添加转换过程的监听器

添加转换过程的监听器

Attributes

def saveAs(path: File): Boolean

执行转换,并将结果保存到指定路径

执行转换,并将结果保存到指定路径

Attributes

Returns

true 如果转换成功否则,false

def saveAs(): InputStream

执行转换

执行转换

Attributes

Returns

转换后的输入流

def set(name: String, value: Any): Htmltopdf.this.type
def success(successRunnable: Runnable): Htmltopdf.this.type

添加一个成功转换后的可运行函数

添加一个成功转换后的可运行函数

Attributes

def warning(warningConsumer: Consumer[String]): Htmltopdf.this.type

Adds a consumer for warning messages produced during the conversion process.

Adds a consumer for warning messages produced during the conversion process.

Attributes