Check the size of a pdf in QTP
Question ID: 104831
0
0

I need to get the size of a pdf file in QTP, but don’t have any property to work with.

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on January 31, 2013 10:49 pm
55 views
Answers (1)
3
Private answer

You could use the VBScript's FileSystemObject to retrieve the size of the pdf file or any other file for that matter. Here some sample code:

FileName =''C:DocumentsSampleFile.pdf''
Set FSO = CreateObject(''Scripting.FileSystemObject'')
Set FileInfo = FSO.GetFile(FileName)

fileSize = FileInfo.size

MsgBox ''The size of the file is: '' & fileSize

Set FileInfo = Nothing
Set FSO = Nothing

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on January 31, 2013 10:51 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top