new Float()
A Float is a content container that is positioned outside of the main
document flow, relative to a chosen reference point, with the main document
content wrapped around it.
Extends
Members
-
<static> ObstructionType
-
Properties:
Name Type Description e_behind_textnumber e_in_front_of_textnumber e_squarenumber e_tightnumber e_top_and_bottomnumber -
<static> ReferencePoint
-
Properties:
Name Type Description e_reference_pagenumber e_reference_paragraphnumber e_reference_characternumber
Methods
-
addList()
-
Adds a list to the document.
- Inherited From:
Returns:
A promise that resolves to the list object- Type
- Promise.<Core.PDFNet.List>
-
addParagraph()
-
Adds a paragraph to the document.
- Inherited From:
Returns:
A promise that resolves to the paragraph object- Type
- Promise.<Core.PDFNet.Paragraph>
-
addParagraphWithText(text)
-
Adds a paragraph to the document and sets the text.
Parameters:
Name Type Description textstring - Inherited From:
Returns:
A promise that resolves to the paragraph object- Type
- Promise.<Core.PDFNet.Paragraph>
-
addTable()
-
Adds a table to the document.
- Inherited From:
Returns:
A promise that resolves to the table object- Type
- Promise.<Core.PDFNet.Table>
-
asChart()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Chart"- Type
- Promise.<Core.PDFNet.Chart>
-
asContentNode()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.ContentNode"- Type
- Promise.<Core.PDFNet.ContentNode>
-
asFloat()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Float"- Type
- Promise.<Core.PDFNet.Float>
-
asList()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.List"- Type
- Promise.<Core.PDFNet.List>
-
asListItem()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.ListItem"- Type
- Promise.<Core.PDFNet.ListItem>
-
asPageNumber()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.PageNumber"- Type
- Promise.<Core.PDFNet.PageNumber>
-
asParagraph()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Paragraph"- Type
- Promise.<Core.PDFNet.Paragraph>
-
asShape()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Shape"- Type
- Promise.<Core.PDFNet.Shape>
-
asTable()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Table"- Type
- Promise.<Core.PDFNet.Table>
-
asTableCell()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TableCell"- Type
- Promise.<Core.PDFNet.TableCell>
-
asTableRow()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TableRow"- Type
- Promise.<Core.PDFNet.TableRow>
-
asTextRun()
-
- Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TextRun"- Type
- Promise.<Core.PDFNet.TextRun>
-
getContentNodeIterator()
-
Retrieve a ContentElementIterator object from the content node
The ContentElementIterator object can be used to traverse the children of the content node.
- Inherited From:
Returns:
A promise that resolves to the ContentElementIterator object- Type
- Promise.<Core.PDFNet.Iterator.<Core.PDFNet.ContentElement>>
-
getHorizontalReferencePoint()
-
Get the horizontal reference point of the float.
Returns:
A promise that resolves to the horizontal reference point.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.Float.ReferencePoint = { e_reference_page : 1 e_reference_paragraph : 2 e_reference_character : 3 } </pre> -
getObstructionType()
-
Get the way the content of the float interacts with the main document content.
Returns:
A promise that resolves to the obstruction type.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.Float.ObstructionType = { e_behind_text : 1 e_in_front_of_text : 2 e_square : 3 e_tight : 4 e_top_and_bottom : 5 } </pre> -
getPositionX()
-
Get the horizontal position of the float in points.
Returns:
A promise that resolves to the horizontal position in points.- Type
- Promise.<number>
-
getPositionY()
-
Get the vertical position of the float in points.
Returns:
A promise that resolves to the vertical position in points.- Type
- Promise.<number>
-
getTextStyledElement()
-
Retrieve the TextStyledElement object for manipulating the text style of this content element.
- Inherited From:
Returns:
A promise that resolves to the TextStyledElement object- Type
- Promise.<Core.PDFNet.TextStyledElement>
-
getVerticalReferencePoint()
-
Get the vertical reference point of the float.
Returns:
A promise that resolves to the vertical reference point.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.Float.ReferencePoint = { e_reference_page : 1 e_reference_paragraph : 2 e_reference_character : 3 } </pre> -
setHorizontalReferencePoint(point)
-
Set the horizontal reference point of the float.
Parameters:
Name Type Description pointnumber PDFNet.Float.ReferencePoint = { e_reference_page : 1 e_reference_paragraph : 2 e_reference_character : 3 }The horizontal reference point.Returns:
- Type
- Promise.<void>
-
setObstructionType(type)
-
Set the way the content of the float interacts with the main document content.
Parameters:
Name Type Description typenumber PDFNet.Float.ObstructionType = { e_behind_text : 1 e_in_front_of_text : 2 e_square : 3 e_tight : 4 e_top_and_bottom : 5 }The obstruction type.Returns:
- Type
- Promise.<void>
-
setPositionX(x)
-
Set the horizontal position of the float, in points, relative to the horizontal reference point.
Parameters:
Name Type Description xnumber The horizontal position in points. Returns:
- Type
- Promise.<void>
-
setPositionY(y)
-
Set the vertical position of the float, in points, relative to the vertical reference point.
Parameters:
Name Type Description ynumber The vertical position in points. Returns:
- Type
- Promise.<void>
-
setVerticalReferencePoint(point)
-
Set the vertical reference point of the float.
Parameters:
Name Type Description pointnumber PDFNet.Float.ReferencePoint = { e_reference_page : 1 e_reference_paragraph : 2 e_reference_character : 3 }The vertical reference point.Returns:
- Type
- Promise.<void>