Forum Discussion
a) It might help if you let us know where the mentioned error occurs;
b) The following threads might help:
Getting exception while trying to read PDF file using pdfbox dll
http://community.smartbear.com/t5/Functional-Web-Testing/Getting-exception-while-trying-to-read-PDF-file-using-pdfbox-dll/td-p/85511
http://smartbear.com/forums/f81/t88540/getting-exception-while-trying-to-read-pdf-file/
how to get the content of a pdf file on window (PDFBox)
https://community.smartbear.com/t5/TestComplete-Desktop-Testing/Compare-pdf-files/m-p/122339
http://community.smartbear.com/t5/Functional-Web-Testing/how-to-get-the-content-of-a-pdf-file-on-window/td-p/60183
http://smartbear.com/forums/f75/t61368/how-to-get-the-content-of-a-pdf-file-on-window/
Unable to read pdf : “dotNET.org_apache_pdfbox_pdmodel.PDDocument” is null or not an object
http://community.smartbear.com/t5/Functional-Web-Testing/Unable-to-read-pdf-dotNET-org-apache-pdfbox-pdmodel-PDDocument/td-p/94722
> var curImage = arrofImages.items(p);
Wondering in what format the image is stored to the curImage variable? Is it Base64 encoded byte array or something else? Have you tried (and, hopefully succeeded in) to convert it to something compatible with TestComplete's Picture object?
Below is the sample how i did image comparison with expected image and PDF image
curImagePath = "c:\pdfimages/pdfimage1.png";
var curImage = arrofImages.items(p);
curImage.write2file_2(curImagePath );
var actualImage = Utils.Picture;
actualImage.LoadFromFile(curImagePath);
//Load the expected image
var expectedImage = Utils.Picture;
expectedImage.LoadFromFile(imagePath);
if(Regions.Compare(expectedImage,actualImage))
{ Log.Checkpoint("Passed");}else{
Log.Error("Failed");}