Skip to content

pdf operations

tinyvdiff.pdf

get_pdf_page_count(pdf_path)

Get the number of pages in a PDF file.

Parameters:

Name Type Description Default
pdf_path str | Path

Path to the PDF file.

required

Returns:

Name Type Description
int int

Number of pages in the PDF file.

Raises:

Type Description
FileNotFoundError

If the PDF file does not exist.

ValueError

If the file is not a valid PDF.