Table of Contents

Method GetPageCount

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

GetPageCount(string)

Returns the number of pages in a PDF file.

public static int GetPageCount(string inputPath)

Parameters

inputPath string

Path to the PDF file.

Returns

int

The total number of pages.

Exceptions

ArgumentNullException

Thrown when inputPath is null.

FileNotFoundException

Thrown when inputPath does not exist.

GetPageCount(Attachment)

Returns the number of pages in a PDF attachment.

public static int GetPageCount(Attachment source)

Parameters

source Attachment

The source PDF attachment.

Returns

int

The total number of pages.

Exceptions

ArgumentNullException

Thrown when source is null.

ArgumentException

Thrown when the source attachment is not a PDF.

Share