TextContainer.PageCount Method

Adds the total number of pages to the current paragraph.

Namespace:  BitMiracle.Docotic.Pdf.Layout
Assembly:  BitMiracle.Docotic.Pdf.Layout (in BitMiracle.Docotic.Pdf.Layout.dll)

Syntax

C#
public TextPageNumber PageCount(
	string? sectionName = null
)
VB
Public Function PageCount ( 
	Optional sectionName As String = Nothing
) As TextPageNumber

Parameters

sectionName (Optional)
Type: System.String
The optional section name.

Return Value

Type: TextPageNumber
The added number of pages.

Remarks

When sectionName is null then this method returns the total number of document pages.

When sectionName is not null then this method returns the total number of section pages.

The section sectionName may not exist when this method is called. However, the section must exist when the document is rendered. Otherwise, the LayoutException will be thrown during the rendering. Use the Section(String) method to add a section.

This method does not complete the current paragraph. I.e., a next text chunk will be placed in the same paragraph.

See Also