Table of Contents

Method GetSectionPageCount

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

GetSectionPageCount(string)

Gets the total number of pages in the specified section.

public int? GetSectionPageCount(string sectionName)

Parameters

sectionName string

The section name.

Returns

int?

The number of pages.

Remarks

The library performs 2 passes when generating the document. First time, the library calculates the total number of pages in the document and finalizes content. Second time, the library renders the content of the document. You can detect the current pass using the LayoutCompleted property.

The section sectionName may not exist when this method is called on during the first pass. This method returns null in such cases. During the first pass, the section page count may also be incorrect when some section content is not processed yet.

The related section must always exist and have the correct page count during the second pass. This method throws LayoutException when the section is not found during the rendering phase.

Exceptions

LayoutException

The section does not exist during the document rendering.

See Also