cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to read values from PDF consistently using surface automation

vinoth_kumaryuv
Level 3
Hi Team, Issue1: I have captured the region in PDF using surface automation in one screen resolution (1366*768) and able to read values from PDF Then I changed the screen resolution (1024*768) to check a scenario and after coming back to original resolution (1366*768) we found that region position is getting changed and unable to read values properly from PDF Do I need to recapture the region again from PDF since region has got changed. Issue2: Adding one more observation, I also used dynamic region to locate the elements at runtime using Image Recognition. It was able to read values from PDF when the PDF is in same size but when the PDF size is maximized (with Zoom also automatically getting increased) then image recognition is unable to identify the sub image and consequently again the values are not read from the PDF. Kindly help us in resolving this issue with any other work around. Thanks
2 REPLIES 2

John__Carter
Staff
Staff
Vinoth I think you are over estimating what Surface Automation/Image Recognition can do. Fundamentally it is about pattern matching, and any change (resolution, window size, zoom) that changes the screen image will change the pattern of pixels.Regarding regions, it is important to remember that a region is a child of a Win32 element, and the coordinate system of the region is based on the top left corner of the parent. So if the parent has moved, the region will have moved too. For this reason it's often better to use the main window as the parent element.

remko.bouwens
Level 5
Can you copy paste all the text from the PDF to the clipboard? If yes, you can read from there. It is a bit more trustworthy.