How to work with file prefix?

Hi,

I tried to work with ‘Recognition template’ feature and tried to figure out how to work with file prefix.

1

My output path for imageFolder is: “C:\Users\p\Desktop\Project\image”
and I set my prefix as “a” (calculate a value), so it generated 2 image files as “a1” and “a2” (since my pdf has 2 pages)

Next activity should be MS OCR, and what is the format for inserting and looping the dynamic image path to OCR? I’m not good at working with RegEx and prefixes…

Please advise,

Hello, @zoe!

In OCR it is possible to send one file at a time, so you need to create a loop to process multiple files.

After converting the files, you can get the list and names of the received files using the ‘List directory files’ activity, then insert the names of the following files in the loop format from the resulting array.

To do this, we can make this kind of algorithm:

Thank you!

What type you document did you use as a sample template? I tried to insert a 2-paged pdf for sample template to add areas, but the pdf did not display at all…Should I use an image format as an sample?

How do I work with the outputPath with file prefix in your 2nd and 3rd activities (Calculate a value)?

@zoe, yes, only images can be used as a template, so you can convert pdf to image once and mark the template by it.

In the screenshot, the comments on each block indicate what I used as a value in Calculate a value.

Also, outputPath is the path to a directory, like C:\\Users\\Professional\\Desktop\\Project\\image, and inputPath is the path to the pdf file.

If you have any questions, please feel free to ask.