Read PDF Text Activity ( endless loop )

Hi All,

Why when reading a single page pdf, output to both write line and message box gets into an endless loop ? “Range” is set to all which is default.

Where is the loop?

Are you trying to extract the text from pdf and Loop throught content? If so then what’s the element you considered for splitting.

Share the screenshot of workflow and PDF, or the project file with pdf .That will help us to help you

Hi Pal,

No, just a quick output to a message box, when I click ok on the message box it goes into a loop, message box keeps appearing, same with write line, its just looping through the same single page pdf endlessly.
Workflow is just single activity of read pdf text activity, its not in a for each etc.

Mike

Share the workflow if possible along with the file.

if there’s no loop then this behaviour is weird.

Hi,

When I put the pdf to be read within the project folder it works perfectly, reads it once only.
However when its placed elsewhere (not in project folder) it goes into the loop, its the same pdf.
Ive screened both sequences in seperate projects, one has the pdf within the project, the other doesnt.
InkedScreenshot 2021-11-11 112839_LI
Screenshot 2021-11-11 112814

Thanks

Hi @MikeC,

If I interpreted your problem statement correctly,
For 2nd scenario, you are shown message box with correct details(all PDF text in it), but when you click on on in that message box, that process doesn’t stop?

Right?

Regards
Sonali

Hi,

Yes thats correct, message box repeats popping up, write line is just constantly writing the same text in a loop.
As i said earlier it doesnt happen when the pdf is in the project folder, only when outside the project folder.

Thanks

What you describe should not be possible.

The activities are handled one by one, and have no interaction retriggering each other.

  1. You start your process
  2. Read pd is done, value stored in a variable
  3. msgbox displays the variable
  4. process stops

The only way step 2 and 3 repeat eachother if there is some activity (loop, other triggers) that tesl it to do so. Standalone your displayed sequences cannot repeat itself, unless you got the ‘play’ (F5) button stuck on your keyboard…

So, can you describe or show where this piece of code is nested? The caause of this should be there…

Hi,

Initially this happened within a flowchart with just one node connected.
Ive attached the flowchart plus the sequence which contains the pdf activity.
As I said it just goes into a loop constantly popping up the message box or writing line infinite…


I think I see it…
If you look real close to your flowchart, the read pdf text has a tiny triangle / arrow at the bottom.
It looks like it is pointing to itself. That will be your endless loop.

Select that arrow, delete it, and it should be resolved.

Holy Crap Batman !!!
Well done pal, worked instantly, would never in a million years spotted that.

Many thanks :slightly_smiling_face:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.