cancel
Showing results for 
Search instead for 
Did you mean: 

PDF Problem

NiklasFranke
Level 5

Hello together,

currently i am more than confused. I managed to open a PDF and to Spy certain elements in that File because i cant just copy and read the clipboard in this case. After i run the process a second time, suddenly the element is not found anymore:

NiklasFranke_0-1732016213489.png

NiklasFranke_3-1732016822602.png

I just have one Process running so i dont think that is the reason

NiklasFranke_4-1732016936894.png

Also suddenly the Applicationmanager cant find the certain Fields in the File, it just can spy the whole file.

After i click manually in certain fields in the file, the Applicationmanager is able again to find the fields. Focus, Attach and Activate doesnt solve the Problem.

I Really dont want to Global Mouseclick and try to find the Fields in the PDF with X Y coordinates, so the spying process is working again. is there a better soloution?


 

10 REPLIES 10

NiklasFranke
Level 5

I found some kind of soloution. I Tab to the Element and try it 5 times with 5 sec delay. That works but feels very odd 

NiklasFranke_0-1732019386699.png

 

david.l.morris
Level 15

@NiklasFranke I know this isn't what you're asking about, but I feel I must suggest it. Have you attempted to look into non-UI ways to interact with PDF files? It certainly depends on what you're trying to do with it, but there are several libraries that can be used to manipulate PDF files or to extract text from them and stuff like that.


Dave Morris, 3Ci at Southern Company

I agree with Dave. This won’t be a stable solution in the long term.

Here are some suggestions for your issue:

1) Use the Activate application after attaching and before the read stage.

2) Focus on or highlight the element before performing the read action. Since you're running in debug mode, the element may not be in focus.

3) A better option might be to read the entire screen after opening the PDF and perform text operations downstream. This has worked well for me in some use cases.

4) Run it in step-out mode instead of stepping through each stage to avoid focus and highlight issues

Just to add in my 2 pence worth, have you looked at opening the pdf in word? it should work for most pdfs and should give you more flexibility in extracting the data.

I believe this only works if the PDF is digital and the text is selectable. Since the PDF clipboard solution isn't working, i think that MS Word will capture it as an image rather than as text.

@NiklasFranke can you try and let us know how it goes for you using MS word

 
 
 

NiklasFranke
Level 5

Hello together and sorry for the late reply. I got it working with the spymode and gave the Elements an ID f.e. Forename is ID 76. The Problem that now occurs is that theese IDs can randomly variate. I deactivatet Java Script and set "only read visible Page" but still the same problem. 

The PDF Utility on the Exchange costs 500 euro p.a. and SabanciDx - Daily PDF Actions isnt downloadable.

Tried to convert it into Excel but then the Text in Missing.

Do you have any other Objects or methodes that may help?

@david.l.morris tried get all Text but that just works with text Files.
@Tejaskumar_Darji word gave me the template without the text and when i opend it with Editor the text didnt even contained the Name of the employee

NiklasFranke_1-1748438950880.png

 





Hi @NiklasFranke 

I agree with Dave—it’s preferable to explore non-UI methods to interact with PDF files.

To provide more tailored solution, could you attach a sample PDF file for reference?

Best Regards,
Sayeed Bin Abdullah

Senior Consultant
Wonderbotz

NiklasFranke
Level 5

@SayeedBinAbdullah when i try to insert the file, i get the message: The file type (.pdf) is not supportet.
Also .zip doesnt work.

This should work: https://drive.google.com/file/d/1mHSL4VWizacHqFRUNG2znOqV1FPG39md/view?usp=sharing

Btw. even a java script could not get all the text, the only way that worked sometimes were OCR Decipher, but that is a little but much for a PDF.

@NiklasFrankeThe document you shared is in German.

Will all the documents be in the German language?

Additionally, will the field positions remain consistent across documents, or will they vary?

Best Regards,
Sayeed Bin Abdullah

Senior Consultant
Wonderbotz