Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Swift UI GUI for ocrmypdf

NotificationsYou must be signed in to change notification settings

pddd/GUI4OCRMyPDF

Repository files navigation

This is a side project to learn swiftui.

While on macos there is already a way to ocr pdfs (withhttps://developer.apple.com/documentation/visionkit ?), I am used to ocr my pdf (https://ocrmypdf.readthedocs.io/en/latest/index.html)But ocr my pdf has only a cli interface. So I created a simple Swift GUI to help me ocr my pdfs.

Some findings

  • To execute shell command line commands, start the shell using Process and pass the command to be executed as a parameter. For zsh, the "-ic" options cause the shell to start in interactive mode ('-i') and execute the command ('-c').
  • The GUI assumes that 'ocrmypdf' is installed and can be started via command line. In my case ocrmypdf is under '/opt/homebrew/bin/ocrmypdf'.
  • Currently I was only able to run the ocrmypdf command when the sanbox option for the app was disabled.
  • Passing the shell output to the SwiftUI text control was a challenge, but was implemented well.
  • I'm not quite sure yet if and how to use the existing ButtonStyles

Screenshots

HelpMeOcrMyPDF

About

Swift UI GUI for ocrmypdf

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp