Skip to main content

PDF-Page-Count

Command Description

Returns the number of pages in a given PDF document

Command Prototype

iRet = PDF.PageCount(pdfName,password)

Parameter Description

ParameterRequiredTypeDefaultDescription
pdfNameTruepath'''C:\Users'''Path of the PDF file
passwordTruestring""PDF file password. No need to fill in if no password

return

iRet,The variable used to save the output of the command.

Demo

/************************************Get the total number of pages*********** ************************ 
Command prototype:
iRet = PDF.PageCount('''C:\Users''',"")
Input parameters:
filePath--PDF file path
password--PDF file password, no password need to fill in
Outgoing parameters:
iRet--The result after the command is run
********************************************************************************/
Dim filePath='''C:\Users\Chance\Desktop\testPDF\Laiye Technology RPA Product Introduction.pdf'''
Dim password=""
iRet = PDF.PageCount(filePath,password)
TracePrint(iRet)