I'm trying to learn files but for some reason or another, some pdf's that come from exactly the same scanner, and are visually of similar quality don't work.
I don't get an error, everything works but it's just that it isn't abble to actyually ocr anything. the ocr file is just empty. it's like the Tesseract isn't abble to find any words on it.
Related
I'm trying to use the 'ReceivedMessage' sound on macOS using AudioServicesPlaySystemSound() but I can't seem to find the ID anywhere.
What I've tried:
I've looked under /System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds and couldn't find it either - although MessageSent is there.
I've tried AudioServicesPlaySystemSound(1003) as well following this link but that just results in silence. Any help would be greatly appreciated!
I've tried looking in Messages > Show Package Contents which only led to more disappointment.
I found the file here but I was a hoping to just link to it directly rather than including the .caf file in my app bundle.
I am an absolute newbie as far as Powershell goes. I found a script here - https://www.litigationsupporttipofthenight.com/single-post/2020/04/19/powershell-script-to-count-words-lines-and-characters-in-multiple-pdfs - that I thought was exactly what I was looking for but when I run it, it seems that it sees my image based pdfs as just text files and says there are thousands of words/characters in them. I have a feeling that I am missing something.....I see various forum postings on the web regarding itextsharp and searching words in pdfs (no idea if this is it or not)?
Hoping someone can point me in the right direction (a specific example of this on the web somewhere) would be very much appreciated.
Gully
I'm using OCR to develop an Android Application using the Tesseract Libs, with the tess-two project, as I saw here: http://gaut.am/making-an-ocr-android-app-using-tesseract/
The app worked fine, but I'm repairing that string returned with the content of a photo, sometimes, comes with strangers characters. Example: I'm reading this: www.caelum.com.br and receiving something like this: r ' . ,wlñzf . 94' kzl 5. vsmNs/.caelumcombr
Searching, I've configured this: baseApi.setVariable("tessedit_char_whitelist", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
But I think that becomes worst.
I want to read texts in Portuguese and English. So, I downloaded the traineddata for each language and using it as I wish, but these strangers characters have something to do with the encoding project ?
Thanks for help :)
Tesseract recognizes text only for images that contains text and only text. Images that contains only text will be accurately recognized by it and you can get good accuracy too.
However Tesseract gives garbled output for image + text recognition.
I didn't worked on this recognition so can't help further.
So your question should be as to how to crop the image part so that you get only the text part out from image. Like that Tesseract can recognize fine and give desired text in ouput.
Thanks.
I need a tool to programmatically convert epub files to a series of images. The output should look like screenshots taken on a canonical device (for this application, an iPad). I haven't been able to find any tools that do something like this.
So what I'd really like (1) is a tool that does that. But assuming that I'm correct that no such tool exists, is there (2) a library (preferably a Perl module, but I'm not that picky) that will read and render ePub?
Obviously, rolling my own I could combine tools for unzipping, reading html, reading xml, putting everything in the right order, and rendering html within certain constraints. Though I'd rather not do that, and if that's the only option I'll have to go on to look for a tool that will do the last part of that or I'll have to create that too.
Any leads on (1), or failing that (2)?
Apologies if what I'm about to type is just crazy-talk on my part--in fact, I'm pretty sure it is--but perhaps something like this might work and I'm kind of interested in knowing how well it might work for you:
Use Frank (https://github.com/moredip/Frank) to control the iOS Simulator on a Mac. Program it to open up the EPUB docs you need.
All you need then is something to automate the taking of the screen shots. Obviously, these will look like the EPUBs are being rendered in an iPad (or an iPhone if you wish--the iOS Simulator does both, of course).
Automating the screenshots can probably be done with AppleScript, although the hard part might be getting it to talk to Frank. Worst case, you can tell Frank to pause for 5 seconds after it loads each page and tell AppleScript to take a screen shot every five seconds. That sucks, but if you're desperate, it will get it done. It's also possible Frank can somehow make the screenshots happen--I haven't used it enough to know.
Pandoc can convert from EPub to LaTeX (and therefore to PDF) or to any number of other formats. Conceptually this should be a type (1) solution.
depends on your definition of "look like" - do you want the user-chrome or just the epub rendering for a given screen size.
I would check out the various epub readers for your platform of choice, size the window to your preferred dimensions, and then just "print" the epub to a virtual printer that outputs to image files - on windoze I use imageprint.
You could easily make a "frame" from an iPad product shot and place your screenshots within that - only thing missing would be as I said the user chrome.
Is there a way to retrieve text coordinates from PDF file on iPhone?
Thanks,
Nava.
More details: I'm trying to get words from pdf file and highlight them. While it's a pretty simple task in Mac OS X, which has a PDFKit, it's not that trivial on iPhone, which has Quartz set of functions to present and get information from pdf file. So far I tried and succeed in following - get words list from pdf file scanning its content and using Tj and TJ operators (see how to search text in pdf). While Tj gives a string and I can get words from it, TJ is an array of glyphs probably, since most of its members come as a single characters, but connecting them together still gives a string and I can get words from there.
My problem now is to highlight found words, which may be can be done by finding a TD/Td operators and trying to calculate character boxes by myself, but for this I need probably to get a font/style and other characteristics of glyphs to be able to calculate glyph boxes properly. And probably somehow to build a transformation matrix or something like this... Anybody can shed some light?
solved with open source poppler library
I have been trying to do the same but it's too technical to build a parser myself. Then I found FastPDFKit open source sdk recently. There is a free version with sample iOS project that includes search and highlight.
http://mobfarm.eu/fastpdfkit
After reading the other answers I will start exploring Poppler too. If someone has a sample project please let me know :)