1 BlockProperties

Class Ax.fop.BlockProperties


Creates a JSFOPBlockProperties object to use FOPBlockProperties class. FOPBlockProperties is used o configure the block properties.

Constructor Summary

MethodDescription
JSFOPBlockProperties()Creates a new JSFOPBlockProperties instance.

Method Summary

Modifier and TypeMethodDescription
String encodeXML(String input)
String encodeXMLAttribute(String input)In XML attributes you must escape " to
String formatStringUS(String format, Object[] args)Use String.
String getIndent(int deep)
Map getProperties()
FOPProperty getProperty(String name)
Set getPropertyNames()
Object getPropertyOrDefault(String name, Object defval)
String getPropertyOrDefault(String name, String defval)
double getPropertyOrDefaultAsCentimeters(String name, double defval)
int getPropertyOrDefaultAsInteger(String name, int defval)
boolean hasProperty(String name)
boolean hasPropertyStarting(String name)
setProperties(FOPPropertiesContainer source)
setProperty(String name, Object value)
setProperty(String name, double value, String units)

Method Detail

JSFOPBlockProperties

 JSFOPBlockProperties()
Info:
Creates a new JSFOPBlockProperties instance.

encodeXML

                        String encodeXML(String input)
Parameters:
input - 
Returns:

encodeXMLAttribute

                        String encodeXMLAttribute(String input)
Info:
In XML attributes you must escape " to
Parameters:
input - 
Returns:

formatStringUS

                        String formatStringUS(String format, Object[] args)
Info:
Use String.format with US locale to force numnbers to be formatted with "." as number separator. This method should be called when formatting font-size, extent, paddings, margins... etc
Parameters:
format - 
args - 
Returns:

getIndent

                        String getIndent(int deep)
Parameters:
deep - 
Returns:

getProperties

                        Map getProperties()
Returns:

getProperty

                        FOPProperty getProperty(String name)
Parameters:
name - 
Returns:

getPropertyNames

                        Set getPropertyNames()
Returns:

getPropertyOrDefault

                        Object getPropertyOrDefault(String name, Object defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefault

                        String getPropertyOrDefault(String name, String defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsCentimeters

double getPropertyOrDefaultAsCentimeters(String name, double defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsInteger

int getPropertyOrDefaultAsInteger(String name, int defval)
Parameters:
name - 
defval - 
Returns:

hasProperty

boolean hasProperty(String name)
Parameters:
name - 
Returns:

hasPropertyStarting

boolean hasPropertyStarting(String name)
Parameters:
name - 
Returns:

setProperties

T setProperties(FOPPropertiesContainer source)
Parameters:
source - 
Returns:

setProperty

T setProperty(String name, Object value)
Parameters:
name - 
value - 
Returns:

setProperty

T setProperty(String name, double value, String units)
Parameters:
name - 
value - 
units - 
Returns:

2 DocumentBuilder

Class Ax.fop.DocumentBuilder


Creates a JSFOPDocumentBuilder object to use FOPDocumentBuilder class. FOPDocumentBuilder is used as a document basis from which the document will be created.

Constructor Summary

MethodDescription
JSFOPDocumentBuilder()Creates a new JSFOPDocumentBuilder instance.

Method Summary

Modifier and TypeMethodDescription
FOPDocumentBuilder addPageSequence(String name)
FOPDocumentBuilder addSimplePageMaster(String name)Add a default simple page master A4 with no margins
FOPDocumentBuilder addSimplePageMaster(String name, double marginLeft, double marginRight, double marginTop, double marginBottom)
FOPDocumentBuilder addSimplePageMaster(String name, DIN din, double marginLeft, double marginRight, double marginTop, double marginBottom)
FOPDocumentBuilder addSimplePageMaster(String name, PageSize size, double marginLeft, double marginRight, double marginTop, double marginBottom)
FOPRoot build()
FOPRoot createA4Document()
FOPRoot createDocument(String pageSize)
FOPRoot createDocument(DIN din)
FOPRoot createDocument(double width, double height, double left, double right, double top, double bottom)
FOPDocumentBuilder setDebug(String[] tags)
FOPDocumentBuilder setDoubleSided(String name, String evenPageName, String oddPageName)

Method Detail

JSFOPDocumentBuilder

 JSFOPDocumentBuilder()
Info:
Creates a new JSFOPDocumentBuilder instance.

addPageSequence

                        FOPDocumentBuilder addPageSequence(String name)
Parameters:
name - 
Returns:

addSimplePageMaster

                        FOPDocumentBuilder addSimplePageMaster(String name)
Info:
Add a default simple page master A4 with no margins
Parameters:
name - 
Returns:

addSimplePageMaster

                        FOPDocumentBuilder addSimplePageMaster(String name, double marginLeft, double marginRight, double marginTop, double marginBottom)
Parameters:
name - 
marginLeft - 
marginRight - 
marginTop - 
marginBottom - 
Returns:

addSimplePageMaster

                        FOPDocumentBuilder addSimplePageMaster(String name, DIN din, double marginLeft, double marginRight, double marginTop, double marginBottom)
Parameters:
name - 
din - 
marginLeft - 
marginRight - 
marginTop - 
marginBottom - 
Returns:

addSimplePageMaster

                        FOPDocumentBuilder addSimplePageMaster(String name, PageSize size, double marginLeft, double marginRight, double marginTop, double marginBottom)
Parameters:
name - 
size - 
marginLeft - 
marginRight - 
marginTop - 
marginBottom - 
Returns:

build

                        FOPRoot build()
Returns:

createA4Document

                        FOPRoot createA4Document()
Returns:
A Root document with a simple page master DIN A4 with 1.0 cm margins

createDocument

                        FOPRoot createDocument(String pageSize)
Parameters:
pageSize - 
Returns:
A Root document with a simple page master with specified DIN with 1.0 cm margins

createDocument

                        FOPRoot createDocument(DIN din)
Parameters:
din - 
Returns:
A Root document with a simple page master with specified DIN with 0.5 cm margins

createDocument

                        FOPRoot createDocument(double width, double height, double left, double right, double top, double bottom)
Parameters:
width - of page in cm
height - of page in cm
left - size of region start
right - size of region end
top - size of region before
bottom - size of region after
Returns:

setDebug

                        FOPDocumentBuilder setDebug(String[] tags)
Parameters:
tags - 
Returns:

setDoubleSided

                        FOPDocumentBuilder setDoubleSided(String name, String evenPageName, String oddPageName)
Parameters:
name - 
evenPageName - 
oddPageName - 
Returns:

3 PageSize

Class Ax.fop.PageSize


Creates a JSFOPPageSize object to use PageSize class. PageSize is used to set the page sizing.

Constructor Summary

MethodDescription
JSFOPPageSize(String din)Creates a JSFOPPageSize instance with the specified format.

Method Summary

Modifier and TypeMethodDescription
double cm2Points(double cm)
double getHeight()
double getWidth()
boolean isLandscape()
boolean isPortrait()
void lockRotation()Prevent a future call to rotate.
double points2CM(double pt)
PageSize rotate()
void setDin(DIN din)
String toString()

Method Detail

JSFOPPageSize

 JSFOPPageSize(String din)
Info:
Creates a JSFOPPageSize instance with the specified format.
Parameters:
din - standard size format: A3, A4, A5, B5, US_LEGAL, US_LETTER

cm2Points

double cm2Points(double cm)
Parameters:
cm - 
Returns:

getHeight

double getHeight()
Returns:

getWidth

double getWidth()
Returns:

isLandscape

boolean isLandscape()
Returns:

isPortrait

boolean isPortrait()
Returns:

lockRotation

void lockRotation()
Info:
Prevent a future call to rotate.

points2CM

double points2CM(double pt)
Parameters:
pt - 
Returns:

rotate

                        PageSize rotate()
Returns:

setDin

void setDin(DIN din)
Parameters:
din - 

toString

                        String toString()
Returns:

4 Processor

Class Ax.fop.Processor


Formatting Objects Processor microservice. MicroserviceExecutorService.getInstance().execute(new FOPExecution()) will automatically select the service for FOP.

Constructor Summary

MethodDescription
JSFOPProcessor()Creates a new instance of the FOP microservice.

Method Summary

Modifier and TypeMethodDescription
List getFonts()Returns a list with the available fonts.
byte[] getFontsSample()Returns pdf file with the system fonts.
byte[] group()SEE: function_fop_form_group TODO TODO TODO TODO
boolean isReady()Checks if the FOP microservice is ready.
boolean isReady(boolean forceOnlineCheck)Checks if the FOP microservice is ready.
boolean isReady(MicroserviceType arg0)
boolean isReady(MicroserviceType arg0, boolean arg1)
byte[] transform(String xml)Transforms a string containing an xml to FO format.
byte[] transform(JSFile file)Transforms the xml contents of a file to FO format.
byte[] transform(JSBlob blob)Transforms the contents of a BLOB to FO format.

Method Detail

JSFOPProcessor

 JSFOPProcessor()
Info:
Creates a new instance of the FOP microservice.

getFonts

                        List getFonts()
Info:
Returns a list with the available fonts.
Returns:
a list with the available fonts

getFontsSample

byte[] getFontsSample()
Info:
Returns pdf file with the system fonts.
Returns:
pdf with sysem fonts

group

byte[] group()
Info:
SEE: function_fop_form_group TODO TODO TODO TODO
Returns:
null

isReady

boolean isReady()
Info:
Checks if the FOP microservice is ready.
Returns:
true if FOP microservice is ready, false otherwise

isReady

boolean isReady(boolean forceOnlineCheck)
Info:
Checks if the FOP microservice is ready.
Parameters:
forceOnlineCheck - to disable or force whether the server is reachable
Returns:
true if FOP microservice is ready, false otherwise

isReady

boolean isReady(MicroserviceType arg0)
Parameters:
arg0 - 
Returns:

isReady

boolean isReady(MicroserviceType arg0, boolean arg1)
Parameters:
arg0 - 
arg1 - 
Returns:

transform

byte[] transform(String xml)
Info:
Transforms a string containing an xml to FO format.
Parameters:
xml - xml to process
Returns:
FO as byte array

transform

byte[] transform(JSFile file)
Info:
Transforms the xml contents of a file to FO format.
Parameters:
file - file that contains the xml to process
Returns:
FO as byte array

transform

byte[] transform(JSBlob blob)
Info:
Transforms the contents of a BLOB to FO format.
Parameters:
blob - BLOB containing the xml to process in binary
Returns:
FO as byte array

5 SinglePageTemplate

Class Ax.fop.SinglePageTemplate


Wrapper for FOP SinglePageTemplate

Constructor Summary

MethodDescription
JSFOPSinglePageTemplate()
JSFOPSinglePageTemplate(String din)Creates a new JSFOPSinglePageTemplate with the specified format.

Method Summary

Modifier and TypeMethodDescription
JSFOPSinglePageTemplate setAfter(Consumer<FOPStaticContent> after)Configures the single page template after region.
JSFOPSinglePageTemplate setBefore(Consumer<FOPStaticContent> before)Configures the single page template before region.
JSFOPSinglePageTemplate setBody(Consumer<FOPFlow> body)Configures the single page template body.
JSFOPSinglePageTemplate setBodyFootNote(Consumer<FOPFootNote> footnote)Configures the single page template footnote.
JSFOPSinglePageTemplate setEnd(Consumer<FOPStaticContent> end)Configures the single page template end region.
JSFOPSinglePageTemplate setRoot(Consumer<FOPRoot> root)Configures the single page template root.
JSFOPSinglePageTemplate setStart(Consumer<FOPStaticContent> start)Configures the single page template start region.
String toFOP()Converts the single page template to an xml in a string.

Method Detail

JSFOPSinglePageTemplate

 JSFOPSinglePageTemplate()

JSFOPSinglePageTemplate

 JSFOPSinglePageTemplate(String din)
Info:
Creates a new JSFOPSinglePageTemplate with the specified format.
Parameters:
din - standard size format: A3, A4, A5, B5, US_LEGAL, US_LETTER

setAfter

                        JSFOPSinglePageTemplate setAfter(Consumer<FOPStaticContent> after)
Info:
Configures the single page template after region.
Parameters:
after - after region configuration function
Returns:
same object with after region configuration updated

setBefore

                        JSFOPSinglePageTemplate setBefore(Consumer<FOPStaticContent> before)
Info:
Configures the single page template before region.
Parameters:
before - before region configuration function
Returns:
same object with before region configuration updated

setBody

                        JSFOPSinglePageTemplate setBody(Consumer<FOPFlow> body)
Info:
Configures the single page template body.
Parameters:
body - body configuration function
Returns:
same object with body configuration updated

setBodyFootNote

                        JSFOPSinglePageTemplate setBodyFootNote(Consumer<FOPFootNote> footnote)
Info:
Configures the single page template footnote.
Parameters:
footnote - footnote configuration function
Returns:
same object with footnote configuration updated

setEnd

                        JSFOPSinglePageTemplate setEnd(Consumer<FOPStaticContent> end)
Info:
Configures the single page template end region.
Parameters:
end - end region configuration function
Returns:
same object with end region configuration updated

setRoot

                        JSFOPSinglePageTemplate setRoot(Consumer<FOPRoot> root)
Info:
Configures the single page template root.
Parameters:
root - root configuration function
Returns:
same object with root configuration updated

setStart

                        JSFOPSinglePageTemplate setStart(Consumer<FOPStaticContent> start)
Info:
Configures the single page template start region.
Parameters:
start - start region configuration function
Returns:
same object with start region configuration updated

toFOP

                        String toFOP()
Info:
Converts the single page template to an xml in a string.
Returns:
FO xml as String

6 Table

Class Ax.fop.Table


Creates a JSFOPTable object to use FOPTable class. FOPTable is used to represent a table in fop documents.

Constructor Summary

MethodDescription
JSFOPTable(String[] columnNames)Creates a new JSFOPTable instance with the specified column names.

Method Summary

Modifier and TypeMethodDescription
FOPTableColumn addColumn()
FOPTableColumn addColumn(String columnName)
FOPTableColumn addColumn(FOPTableColumn column)Add a table-column to table
FOPTable addColumns(String[] columnNames)
FOPTable addResultSet(ResultSet rs)
build(Consumer<N> object)
FOPBlockProperties createBlockProperties()Allow from any object (for example root), create a BlockProperties.
FOPTable createColumns(int ncols)Automatically create N columns to an empty table
String encodeXML(String input)
String encodeXMLAttribute(String input)In XML attributes you must escape " to
FOPTable forEach(Consumer<FOPTableColumn> column)
String formatStringUS(String format, Object[] args)Use String.
FOPTableBody getBody()
FOPTableColumn getColumn(int column)
int getColumnCount()
List getColumns()
List getDebug()
FOPTableFooter getFooter()
FOPTableHeader getHeader()
double getHeight()Try to go back component till we get a height, till SimplePageMaster
String getIndent(int deep)
getParent()
Map getProperties()
FOPProperty getProperty(String name)
Set getPropertyNames()
Object getPropertyOrDefault(String name, Object defval)
String getPropertyOrDefault(String name, String defval)
double getPropertyOrDefaultAsCentimeters(String name, double defval)
int getPropertyOrDefaultAsInteger(String name, int defval)
FOPRoot getRoot()
String getTagName()
int getUID()
double getWidth()Try to go back component till we get a width, till SimplePageMaster, BlockContainer, InlineContainer
boolean hasDebug(String tagName)
boolean hasProperty(String name)
boolean hasPropertyStarting(String name)
boolean isTerminal()
void log(String msg)
void onDebug()
void onDebug()Subclass may decide how to show component in debug mode
FOPTable pack()Given data in table, compute the width in percents
FOPBlock setCaption(String text)
setDebug(String[] tags)
setProperties(FOPPropertiesContainer source)
setProperty(String name, Object value)
setProperty(String name, double value, String units)
void setTerminal()
String toFOP(int deep)
String toFOP()
String toString()

Method Detail

JSFOPTable

 JSFOPTable(String[] columnNames)
Info:
Creates a new JSFOPTable instance with the specified column names.
Parameters:
columnNames - column names, one parameter per name

addColumn

                        FOPTableColumn addColumn()
Returns:

addColumn

                        FOPTableColumn addColumn(String columnName)
Parameters:
columnName - 
Returns:

addColumn

                        FOPTableColumn addColumn(FOPTableColumn column)
Info:
Add a table-column to table
Parameters:
column - 
Returns:

addColumns

                        FOPTable addColumns(String[] columnNames)
Parameters:
columnNames - 
Returns:
the List for columns. It useful to perform a forEach on it's elements during return

addResultSet

                        FOPTable addResultSet(ResultSet rs)
Parameters:
rs - 
Returns:

build

N build(Consumer<N> object)
Parameters:
object - 
Returns:

createBlockProperties

                        FOPBlockProperties createBlockProperties()
Info:
Allow from any object (for example root), create a BlockProperties. It's very useful on Javascript to avoid the need to expose the class to Ax.fop package declaration. TODO: move to documentbuilder!!!
Returns:

createColumns

                        FOPTable createColumns(int ncols)
Info:
Automatically create N columns to an empty table
Parameters:
ncols - 
Returns:

encodeXML

                        String encodeXML(String input)
Parameters:
input - 
Returns:

encodeXMLAttribute

                        String encodeXMLAttribute(String input)
Info:
In XML attributes you must escape " to
Parameters:
input - 
Returns:

forEach

                        FOPTable forEach(Consumer<FOPTableColumn> column)
Parameters:
column - 
Returns:

formatStringUS

                        String formatStringUS(String format, Object[] args)
Info:
Use String.format with US locale to force numnbers to be formatted with "." as number separator. This method should be called when formatting font-size, extent, paddings, margins... etc
Parameters:
format - 
args - 
Returns:

getBody

                        FOPTableBody getBody()
Returns:

getColumn

                        FOPTableColumn getColumn(int column)
Parameters:
column - 
Returns:

getColumnCount

int getColumnCount()
Returns:

getColumns

                        List getColumns()
Returns:

getDebug

                        List getDebug()
Returns:

getFooter

                        FOPTableFooter getFooter()
Returns:

getHeader

                        FOPTableHeader getHeader()
Returns:

getHeight

double getHeight()
Info:
Try to go back component till we get a height, till SimplePageMaster
Returns:

getIndent

                        String getIndent(int deep)
Parameters:
deep - 
Returns:

getParent

P getParent()
Returns:

getProperties

                        Map getProperties()
Returns:

getProperty

                        FOPProperty getProperty(String name)
Parameters:
name - 
Returns:

getPropertyNames

                        Set getPropertyNames()
Returns:

getPropertyOrDefault

                        Object getPropertyOrDefault(String name, Object defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefault

                        String getPropertyOrDefault(String name, String defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsCentimeters

double getPropertyOrDefaultAsCentimeters(String name, double defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsInteger

int getPropertyOrDefaultAsInteger(String name, int defval)
Parameters:
name - 
defval - 
Returns:

getRoot

                        FOPRoot getRoot()
Returns:

getTagName

                        String getTagName()
Returns:

getUID

int getUID()
Returns:

getWidth

double getWidth()
Info:
Try to go back component till we get a width, till SimplePageMaster, BlockContainer, InlineContainer
Returns:

hasDebug

boolean hasDebug(String tagName)
Parameters:
tagName - 
Returns:

hasProperty

boolean hasProperty(String name)
Parameters:
name - 
Returns:

hasPropertyStarting

boolean hasPropertyStarting(String name)
Parameters:
name - 
Returns:

isTerminal

boolean isTerminal()
Returns:

log

void log(String msg)
Parameters:
msg - 

onDebug

void onDebug()

onDebug

void onDebug()
Info:
Subclass may decide how to show component in debug mode

pack

                        FOPTable pack()
Info:
Given data in table, compute the width in percents
Returns:

setCaption

                        FOPBlock setCaption(String text)
Parameters:
text - 
Returns:

setDebug

N setDebug(String[] tags)
Parameters:
tags - 
Returns:

setProperties

T setProperties(FOPPropertiesContainer source)
Parameters:
source - 
Returns:

setProperty

T setProperty(String name, Object value)
Parameters:
name - 
value - 
Returns:

setProperty

T setProperty(String name, double value, String units)
Parameters:
name - 
value - 
units - 
Returns:

setTerminal

void setTerminal()

toFOP

                        String toFOP(int deep)
Parameters:
deep - 
Returns:

toFOP

                        String toFOP()
Returns:

toString

                        String toString()
Returns:

7 Text

Class Ax.fop.Text


Creates a JSFOPText object to use FOPBlock class. FOPBlock is used to represent a text block in fop documents.

Constructor Summary

MethodDescription
JSFOPText(String text)Creates a new JSFOPText instance containing the specified text.

Method Summary

Modifier and TypeMethodDescription
void addItem(AFOPObject item)
build(Consumer<N> object)
FOPBlockProperties createBlockProperties()Allow from any object (for example root), create a BlockProperties.
String encodeXML(String input)
String encodeXMLAttribute(String input)In XML attributes you must escape " to
String formatStringUS(String format, Object[] args)Use String.
List getChildren()
List getDebug()
double getHeight()Try to go back component till we get a height, till SimplePageMaster
String getIndent(int deep)
String getInnerText()Recursively get inner text to try to compute width
List getItems()
getParent()
Map getProperties()
FOPProperty getProperty(String name)
Set getPropertyNames()
Object getPropertyOrDefault(String name, Object defval)
String getPropertyOrDefault(String name, String defval)
double getPropertyOrDefaultAsCentimeters(String name, double defval)
int getPropertyOrDefaultAsInteger(String name, int defval)
FOPRoot getRoot()
String getTagName()
int getUID()
double getWidth()
double getWidth()Try to go back component till we get a width, till SimplePageMaster, BlockContainer, InlineContainer
boolean hasDebug(String tagName)
boolean hasProperty(String name)
boolean hasPropertyStarting(String name)
boolean isTerminal()
void log(String msg)
void onDebug()
void onDebug()Subclass may decide how to show component in debug mode
setDebug(String[] tags)
setProperties(FOPPropertiesContainer source)
setProperty(String name, Object value)
setProperty(String name, double value, String units)
FOPBlock setSpan(String span)
void setTerminal()
String toFOP(int deep)
String toFOP()
String toString()

Method Detail

JSFOPText

 JSFOPText(String text)
Info:
Creates a new JSFOPText instance containing the specified text.
Parameters:
text - block text content

addItem

void addItem(AFOPObject item)
Parameters:
item - 

build

N build(Consumer<N> object)
Parameters:
object - 
Returns:

createBlockProperties

                        FOPBlockProperties createBlockProperties()
Info:
Allow from any object (for example root), create a BlockProperties. It's very useful on Javascript to avoid the need to expose the class to Ax.fop package declaration. TODO: move to documentbuilder!!!
Returns:

encodeXML

                        String encodeXML(String input)
Parameters:
input - 
Returns:

encodeXMLAttribute

                        String encodeXMLAttribute(String input)
Info:
In XML attributes you must escape " to
Parameters:
input - 
Returns:

formatStringUS

                        String formatStringUS(String format, Object[] args)
Info:
Use String.format with US locale to force numnbers to be formatted with "." as number separator. This method should be called when formatting font-size, extent, paddings, margins... etc
Parameters:
format - 
args - 
Returns:

getChildren

                        List getChildren()
Returns:
Recursively get the list of all children

getDebug

                        List getDebug()
Returns:

getHeight

double getHeight()
Info:
Try to go back component till we get a height, till SimplePageMaster
Returns:

getIndent

                        String getIndent(int deep)
Parameters:
deep - 
Returns:

getInnerText

                        String getInnerText()
Info:
Recursively get inner text to try to compute width
Returns:

getItems

                        List getItems()
Returns:

getParent

P getParent()
Returns:

getProperties

                        Map getProperties()
Returns:

getProperty

                        FOPProperty getProperty(String name)
Parameters:
name - 
Returns:

getPropertyNames

                        Set getPropertyNames()
Returns:

getPropertyOrDefault

                        Object getPropertyOrDefault(String name, Object defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefault

                        String getPropertyOrDefault(String name, String defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsCentimeters

double getPropertyOrDefaultAsCentimeters(String name, double defval)
Parameters:
name - 
defval - 
Returns:

getPropertyOrDefaultAsInteger

int getPropertyOrDefaultAsInteger(String name, int defval)
Parameters:
name - 
defval - 
Returns:

getRoot

                        FOPRoot getRoot()
Returns:

getTagName

                        String getTagName()
Returns:

getUID

int getUID()
Returns:

getWidth

double getWidth()
Returns:

getWidth

double getWidth()
Info:
Try to go back component till we get a width, till SimplePageMaster, BlockContainer, InlineContainer
Returns:

hasDebug

boolean hasDebug(String tagName)
Parameters:
tagName - 
Returns:

hasProperty

boolean hasProperty(String name)
Parameters:
name - 
Returns:

hasPropertyStarting

boolean hasPropertyStarting(String name)
Parameters:
name - 
Returns:

isTerminal

boolean isTerminal()
Returns:

log

void log(String msg)
Parameters:
msg - 

onDebug

void onDebug()

onDebug

void onDebug()
Info:
Subclass may decide how to show component in debug mode

setDebug

N setDebug(String[] tags)
Parameters:
tags - 
Returns:

setProperties

T setProperties(FOPPropertiesContainer source)
Parameters:
source - 
Returns:

setProperty

T setProperty(String name, Object value)
Parameters:
name - 
value - 
Returns:

setProperty

T setProperty(String name, double value, String units)
Parameters:
name - 
value - 
units - 
Returns:

setSpan

                        FOPBlock setSpan(String span)
Parameters:
span - 
Returns:

setTerminal

void setTerminal()

toFOP

                        String toFOP(int deep)
Parameters:
deep - 
Returns:

toFOP

                        String toFOP()
Returns:

toString

                        String toString()
Returns:

8 Watermark

Class Ax.fop.Watermark


Creates a JSFOPWatermark object to use PDFWaterWark class. PDFWaterWark is used to represent a watermark.

Constructor Summary

MethodDescription
JSFOPWatermark(Object src, String position)Creates a JSFOPWatermark instance, with the given src watermark at the specified position.

Method Summary

Modifier and TypeMethodDescription
void setOverlay(InputStream in, Pages pages)
void setOverlay(File file, Pages pages)
void setOverlay(String fileName, Pages pages)
byte[] toPDF()

Method Detail

JSFOPWatermark

 JSFOPWatermark(Object src, String position)
Info:
Creates a JSFOPWatermark instance, with the given src watermark at the specified position.
Parameters:
src - watermark source object
position - position to locate the watermark: FOREGROUND, BACKGROUND

setOverlay

void setOverlay(InputStream in, Pages pages)
Parameters:
in - 
pages - 

setOverlay

void setOverlay(File file, Pages pages)
Parameters:
file - 
pages - 

setOverlay

void setOverlay(String fileName, Pages pages)
Parameters:
fileName - 
pages - 

toPDF

byte[] toPDF()
Returns:

9 XHTML2FO

Class Ax.fop.XHTML2FO


This class lets you transform XHTML to FO format 2 ways: 1. XHTML is whole HTML document and will be transformed to a whole FO object 2. XHTML is only part of an HTML document and will be transformed to a part of FO object

Constructor Summary

MethodDescription
JSXHTML2FO()Creates a new XHTML to FO transformer instance.

Method Summary

Modifier and TypeMethodDescription
boolean isReady()Checks if the XHTML2FO microservice is ready.
boolean isReady(boolean forceOnlineCheck)Checks if the XHTML2FO microservice is ready.
boolean isReady(MicroserviceType arg0)
boolean isReady(MicroserviceType arg0, boolean arg1)
String toFOBody(String xhtml)Transforms a well formed XHTML document to be used as an include of another FO document.
String toFORoot(String xhtml)Transforms onvert a well formed XHTML document to complete FO document including root and master pages.
byte[] toPDF(String xhtml)Transforms a well formed XHTML document directly to PDF, converting it first to FO and then from FO to PDF.

Method Detail

JSXHTML2FO

 JSXHTML2FO()
Info:
Creates a new XHTML to FO transformer instance.

isReady

boolean isReady()
Info:
Checks if the XHTML2FO microservice is ready.
Returns:
true if microservice is ready, false otherwise

isReady

boolean isReady(boolean forceOnlineCheck)
Info:
Checks if the XHTML2FO microservice is ready.
Parameters:
forceOnlineCheck - to disable or force whether the server is reachable
Returns:
true if microservice is ready, false otherwise

isReady

boolean isReady(MicroserviceType arg0)
Parameters:
arg0 - 
Returns:

isReady

boolean isReady(MicroserviceType arg0, boolean arg1)
Parameters:
arg0 - 
arg1 - 
Returns:

toFOBody

                        String toFOBody(String xhtml)
Info:
Transforms a well formed XHTML document to be used as an include of another FO document.
Parameters:
xhtml - XHTML fragment to convert
Returns:
FO document fragment to include to another FO document

toFORoot

                        String toFORoot(String xhtml)
Info:
Transforms onvert a well formed XHTML document to complete FO document including root and master pages.
Parameters:
xhtml - XHTML document to convert
Returns:
a complete FO document

toPDF

byte[] toPDF(String xhtml)
Info:
Transforms a well formed XHTML document directly to PDF, converting it first to FO and then from FO to PDF.
Parameters:
xhtml - XHTML to convert
Returns:
pdf file as byte array