Posts

Create filename with current time stamp (c++) without c++20

Code log.cpp #include <fstream> #include <iostream> #include <iomanip> #include <ctime> #include <sstream> int main() { auto t = std::time(nullptr); auto tm = *std::localtime(&t); std::stringstream transTime; transTime << std::put_time(&tm, "%Y%m%d-%H%M%S"); std::string fileName = "example-" + transTime.str() ; fileName.append(".txt"); std::cout << fileName << std::endl; std::ofstream file(fileName, std::ios::app); file << "Writing this to a file.\n"; file.close() } Build and run > clang log.cpp -o log.exe Or > "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" x64 > cl log.cpp /Fe /EHsc

Flask: Drag & Drop + Click & Select example | single page app

Image
Flask: Drag & Drop + Click & Select | example single page app I needed to create a simple web page that takes the MS Excel file as input, reads it, and shows the result.

OCR pdf file in python on the fly

With   PyMuPDF and tesserocr you can OCR image pdf easily

Behind The Proxy On Windows

In a corporate environment is quite common that users are behind proxy servers that need authorization. How/What to setup so your program can connect to the internet?

Cross Compile Tesseract For Android On Windows 10

Do you want to test tesseract on Android? Here is a short description of how to build it on Windows (without Visual Studio ;-) ).

Create searchable pdf with c++ and tesseract

Image
Many office machines creates pdf as result of scan instead of  image. Unfortunately not always they includes also text layer for copy&paste or they include text layer based on default language of scanner and not document language. In such cases you can use  tesseract to crete "searchable pdf".

Fix page orientation and skew with leptonica

Image
 First part of processing scanned images si fix page orientation and possible image skew.