Contributions
How to use external libraries packages in testcomplete
I am using iTextSharp libraries to read font size of pdf. I am using the below code. I have downloaded the itextSharp package and i have integrated it in my project in the following manner( right click on project then selecting add and then exisiting item and selecting those itextSharp files). I have copied these files stored it in smartbear bin folder too. But I am getting error like "ActiveX component can't create object: 'iTextSharp.text.PdfReader' ". Code: Sub font() Dim pdfReader Set pdfReader = CreateObject("iTextSharp.text.pdf.PdfReader") pdfReader.Open "C:\path\to\your\pdf\file.pdf" ' Loop through each page of the PDF file For i = 1 To pdfReader.NumberOfPages ' Get the page object Set page = pdfReader.GetPageN(i) ' Get the content stream for the page Set content = page.GetAsArray(PdfName.CONTENTS) ' Loop through each element in the content stream For Each element In content ' Check if the element is a text object If element.IsArray() And element.GetAsName(0) = PdfName.TEXT Then ' Get the font object for the text object Set font = element.GetAsArray(0).GetAsDict(PdfName.FONT) ' Get the font name and size fontName = font.Get(PdfName.BASEFONT).ToString() fontSize = element.GetAsArray(0).GetAsNumber(1).Value ' Print the font name and size WScript.Echo "Font Name: " & fontName & " Font Size: " & fontSize End If Next Next ' Close the PdfReader object pdfReader.Close End SUb334Views1like1CommentHow to read the Fontcolour of header section of the wordfile using vbscript?
I have a word file which has header and contents. One of the header text font colour is grey.I want to read the font colour of that text or header part . I didnt find any solution to read the header font colour.Can anyonehelp please?Solved344Views0likes1CommentHow can I read the font size and font style of data present in a PDF file using vbscript?
I have a tabular data which is in pdf and I want to readthe font size and font style of data present in the PDF file using vbscript. I am not getting any functionalities in Testcomplete to carry out this operation.Solved436Views0likes1CommentRe: Not able to read nextline in paragraph using vbscript nextline commands (i.e vbnewline,vbclrf etc).
I have a PDF which has a tabular data ,After doing c1= PDF.ConvertToText(path1) , when I am displaying my data then it is coming like this.(This is the Screenshot of data which has been read by Testcomplete) Now I need each word to get stored in array in vbscript. As per your above response then testcomplete is generating wrong format of data its a bug then. Otherwise there has to be some solution.Having said that Testcomplete is not reading vbscript nextline characters like vbcrlf ,vbnewline etc , where as in javascript It is reading "\n" But I want in Vbscript.588Views0likes0CommentsRe: Not able to read nextline in paragraph using vbscript nextline commands (i.e vbnewline,vbclrf etc).
You have inserted vbclrf in your string example. After converting a pdf to text using pdftotext method. the data is getting stored and coming in nextline. String = "TestComplete is a functional automated testing platform developed by SmartBear Software TestComplete gives testers the ability to create automated tests for Microsoft Windows, Web, Android, and iOS applications" Now here This vbclrf or vbnewline is not working at all. Here how can I read nextline character.625Views0likes0CommentsNot able to read nextline in paragraph using vbscript nextline commands (i.e vbnewline,vbclrf etc).
I am using vbscript language and I have converted pdf to text and all the texts are stored in a varieble . Now I Want each words to get stored in a array or list. For that I am spliting them and storing. But Splitting for nextline is not working. when I am using vbscript commands like vbnewline,vbclrf etc to read nextline in text its not reading them. Its able to print two texts in next line, but If I want to read nextline character its not reading at all.Solved654Views0likes6Comments