Skip to contents

Get the number of pages in a pdf file

Usage

pdf_length(input, password = "")

Arguments

input

path or url to the input pdf file

password

string with password to open pdf file

Value

an integer value with the number of pages in the pdf file

Examples

pdf_file <- system.file("examples", "sufganiyot.pdf", package = "cpp11qpdf")
pdf_length(pdf_file, "")
#> [1] 2