Ukrainian PDF copies as wrong characters: OCR as a workaround

Home › Forums › PDF24 Creator › Ukrainian PDF copies as wrong characters: OCR as a workaround

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60445
    guil13888
    Participant

    Hi! I gotta say, I love your web and program. It's super helpful! But I wanted to try the offline program for some OCR and I can't seem to make it work. I'm having the following issues:

    I'm trying to use the OCR segment of the app to retrieve a searchable pdf of an Ukrainian pdf. The original pdf lacks encoding or something and there's no way I found to get something to recognize the text in it.  (I'll explain more on this later). The workaround I thought of was using the OCR to basically copy the text and translate that result. But when using the app it won't save the file! I've tried different folders, different file names, different compressions, nothing works! The file just doesn't appear after the job is done and when trying to manually save it nothing happens either.. I really don't know how to go about it and I would appreciate the help!

    Also, when using the online version, I can make it work but afterward, when using it for the translation part, the software says that's not text but a scanned document (?). That's why I wanted to try the app instead in the first place

     

     

    Here's a little more explanation on the issue that brought me to use the OCR, perhaps someone has a better solution for it:

    The document is a list of files from a Ukrainian Archive in which I have to do some research. I can't contact the creators of the pdf and get them to send me a differently encoded document so it can be translatable by translation software. I don't mind if it's an automatic translation, but since the PDF either lacks encoding I can't get any software to actually be able to interpret the characters as readable text. When using cyrilic decoders it works, but those are really old and meant for small fragments of text. Nothing as the 600 pages long I have to translate. Just to clarify: I can copy the text, and paste it but when I do it it comes out like completely different Latin base characters.  I've tried everything, from notepad++ to multiple programs to try to re-encode it or make it work. That's how I got to OCR, I thought if I could get the text copied from one document to another by OCR. Perhaps not the most efficient way to go about it, but its the one I've found.

     

    I look forward to your advice!

    #60446
    guil13888
    Participant

    Ok, now it works, altho I didn't know what was the thing that changed that made it to work. I would like to edit the original post but I'm not able to. If anyone know's a better way to workaround the encoding issue, please let me know tho!

    Again, thanks!!

    #65983
    PDF24 Support
    Moderator

    Hello,

    glad saving works now. About the text: the PDF uses fonts without a correct character mapping, so copying gives other characters than the ones you see. OCR adds a new text layer, but the broken visible text stays in the file, and viewers and translation software still pick it up first.

    A workaround is to turn the pages into images first and then run OCR:

    1. Convert the PDF to images inside a PDF with Rasterize PDF, e.g. with 300 DPI: https://tools.pdf24.org/en/rasterize-pdf
    2. Run OCR on the result and choose "Ukrainian" as the language: https://tools.pdf24.org/en/ocr-pdf

    The result then only contains the recognised text, which you can copy and translate. OCR text is not always perfect, so please check important parts against the original.

    #66660
    PDF24 Support
    Moderator

    Hello,

    a short update: the online OCR now handles this case. Tick "Force OCR": pages whose visible text cannot be copied correctly are then turned into an image under the new text layer, so copying returns the recognized words. The page looks the same as before: https://tools.pdf24.org/en/ocr-pdf

    The OCR in PDF24 Creator does not do this yet; there, the way with Rasterize PDF described above still applies.

    Detailed guide: Pages that already contain text

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.