Automating OCR Execution with Text Selection in PDF-XChange Pro (JavaScript Solution?)

Discussion for the End User use of OCR in PDF-XChange Editor and Viewer

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

TristanS
User
Posts: 1
Joined: Thu Feb 27, 2025 10:49 am

Automating OCR Execution with Text Selection in PDF-XChange Pro (JavaScript Solution?)

Post by TristanS »

I'm looking for a way in PDF-XChange Pro that ensures the 'OCR' function is automatically executed when clicking the 'Text Selection' button, in case the content is an image.

Or is there a way to achieve this using a custom button (JavaScript)?
Step 1: Execute OCR with default settings.
Step 2: Activate the "Text Selection" button.

Thank you for your help!

Tristan
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Re: Automating OCR Execution with Text Selection in PDF-XChange Pro (JavaScript Solution?)

Post by Stefan - PDF-XChange »

Hello TristanS,

Welcome to our forums!
I am afraid that we do not have such a feature that when unable to select a text in your selected region will automatically start the OCR process, and as far as I am aware there are no current plans for such to be developed, given that OCR (of even small regions) can be quite computationally heavy, and we prefer it is started manually when needed rather than we trying to automate that step.
JS is unable to run the OCR region eithr.

Kind regards,
Stefan