Skip to main content

PDF-Get-Page-as-Image

Command Description

Get the image of the specified page in PDF file and save it with the naming convention of "PDF"

Command Prototype

PDF.GetPagePic(filePath,password,savePath,pageStart,pageEnd)

Parameter Description

ParameterRequiredTypeDefaultDescription
filePathTruepath'''C:\Users'''Path of the PDF file
passwordTruestring""PDF file password. No need to fill in if no password
savePathTruepath'''C:\Users'''Directory to save the extracted images. Defaults to the location of the PDF file
pageStartTruenumber1Get the starting page number of the picture, starting from 1
pageEndTruenumber2Get the end page number of the picture

Demo

/************************************Get the specified page picture************ ********************* 
Command prototype:
PDF.GetPagePic('''C:\Users''',"",'''C:\Users''',1,2)
Input parameters:
filePath--PDF file path
password--PDF file password, no password need to fill in
savePath--the path where the picture is saved, the default is the directory where the PDF file is located
pageStart--Get the starting page number of the picture, starting from 1
pageEnd--Get the end page number of the picture
Outgoing parameters:
None
********************************************************************************/
Dim filePath='''C:\Users\Chance\Desktop\testPDF\Laiye Technology RPA Product Introduction.pdf'''
Dim savePath='''C:\Users\Chance\Desktop\testPDF'''
Dim password=""
Dim pageStart=1
Dim pageEnd=2
PDF.GetPagePic(filePath,password,savePath, pageStart, pageEnd)