Class

com.builtamont.play.pdf

PdfGenerator

Related Doc: package pdf

Permalink

class PdfGenerator extends AnyRef

PDF generator service.

Annotations
@Singleton()
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PdfGenerator
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PdfGenerator(env: Environment, xhtml: Boolean = false)

    Permalink

    env

    The current Play app Environment context.

    xhtml

    true to set XHTML strict parsing (i.e. leave disabled for HTML5 templates).

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addLocalFonts(fonts: Seq[String]): Unit

    Permalink

    Add a list of local fonts for PDF generation.

    Add a list of local fonts for PDF generation.

    fonts

    the list of font filenames to load.

  5. def addTemporaryFonts(fonts: Seq[String]): Unit

    Permalink

    Add a list of fonts as temporary fonts (will be deleted when application exits) for PDF generation.

    Add a list of fonts as temporary fonts (will be deleted when application exits) for PDF generation.

    fonts

    the list of font filenames to add.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def loadLocalFonts(fonts: Seq[String]): Unit

    Permalink

    Load a list of local fonts for PDF generation.

    Load a list of local fonts for PDF generation.

    fonts

    the list of font filenames to load.

    Note

    Existing default fonts collection will be cleared / emptied.

  15. def loadTemporaryFonts(fonts: Seq[String]): Unit

    Permalink

    Load a list of fonts as temporary fonts (will be deleted when application exits) for PDF generation.

    Load a list of fonts as temporary fonts (will be deleted when application exits) for PDF generation.

    fonts

    the list of font filenames to load.

    Note

    Existing default fonts collection will be cleared / emptied.

  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def ok(html: Html, documentBaseUrl: String, fonts: Seq[String] = defaultFonts): Result

    Permalink

    Returns PDF result from Twirl HTML.

    Returns PDF result from Twirl HTML.

    html

    the Twirl HTML.

    documentBaseUrl

    the document / page base URL.

    fonts

    the external / additional fonts to load.

    returns

    Generated PDF result (with "application/pdf" MIME type).

  20. def parseString(html: Html): String

    Permalink

    Parse Twirl HTML into HTML string.

    Parse Twirl HTML into HTML string.

    html

    the generated Twirl HTML.

    returns

    HTML as string.

  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toBytes(string: String, documentBaseUrl: String, fonts: Seq[String]): Array[Byte]

    Permalink

    Generate PDF bytearray given HTML string.

    Generate PDF bytearray given HTML string.

    string

    the HTML string.

    documentBaseUrl

    the document / page base URL.

    fonts

    the external / additional fonts to load.

    returns

    Generated PDF as bytearray.

  23. def toBytes(html: Html, documentBaseUrl: String, fonts: Seq[String]): Array[Byte]

    Permalink

    Generate PDF bytearray given Twirl HTML.

    Generate PDF bytearray given Twirl HTML.

    html

    the Twirl HTML.

    documentBaseUrl

    the document / page base URL.

    fonts

    the external / additional fonts to load.

    returns

    Generated PDF as bytearray.

  24. def toStream(output: OutputStream)(string: String, documentBaseUrl: String, fonts: Seq[String] = defaultFonts): Unit

    Permalink

    Generate and write PDF to an existing OutputStream given HTML string.

    Generate and write PDF to an existing OutputStream given HTML string.

    output

    the OutputStream to write the generated PDF to.

    string

    the HTML string.

    documentBaseUrl

    the document / page base URL.

    fonts

    the external / additional fonts to load.

  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. val xhtml: Boolean

    Permalink

    true to set XHTML strict parsing (i.e.

    true to set XHTML strict parsing (i.e. leave disabled for HTML5 templates).

Inherited from AnyRef

Inherited from Any

Ungrouped