OCR program connected to XTRF via API

Monika 5 years ago in API updated by Bartosz Budzyński 5 years ago 9

Hello, I wanted to ask if anyone was already thinking about connecting any OCR tool to XTRF via API? So it could work as an automatic action, and import for example a PDF and export editable format, like Word or HTML, etc?

I would be very grateful for any tips.



Hi Monika,

If you're using Smart Projects you might want to check out Scripted Steps and add one to your Process.

Let us know if you would like to talk about it in details.



Hi Bartosz, I will check it anyway. Thanks a lot.

Unfortunately, because of the connection with XTM my company is still using Classic Projects. Any solution there?



Hey Monika,

Sure, there's planty of ways this can be achieved in Classic Projects. For example, you can develop (or have someone do it for you) middleware connecting both services - XTRF and OCR service of your choice - and a Groovy macro that can take parameters and be run via the API.

It should work by subscribing to a job status changed event, get the file from XTRF, send it back to the macro which should put it in the workflow where you expect it to be. 

It can be probably done even with the macro itself running periodically - whenever job with type "Send to OCR" is "Started" and has files assigned, send those to the OCR and put processed files as an output of that job, then close it. That job can use fake vendor which can be fixed in place in Workflow Definition.



Thank you so much Bartosz! It is very helpful :)


Hello again, this time I have a question to end users of XTRF: did anyone is actually using the Scripted Steps in Smart Projects? Are you sending your files to an external OCR? If so, which one would you recommend. Are you happy with the editable files? Is it saving your project management time?

Very curious to hear back :)

We are not, but we'd love to learn about what others are doing.


I have used them for a short time.
The pro's are that it is easy to inject some code per Step.
The con is that there is minimal documentation on this, and you can hardly extend it to your own use.

The con was way bigger than the pro for us.

I would advise you to use the Subscription part in the API. There is the amazing 'job_status_changed' event. If you hook your own system to this event, you can do whatever you like without the Scripted Steps.


Thank you Dennis! It is very helpful!

Hi Monika,

We can schedule a quick call about what can be done and what's the best way to achieve this. Please contact your Customer Success Manager (Dorota) so we can schedule it if you'd like. :)