# pdf_ocr_test **Repository Path**: chick-lee/pdf_ocr_test ## Basic Information - **Project Name**: pdf_ocr_test - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-05 - **Last Updated**: 2025-03-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PDF OCR识别工具 一个基于React的PDF预览与OCR识别应用,支持文档分页预览、分辨率调整和自定义提示词。 ## 项目功能 - **双栏布局**:左侧PDF预览,右侧参数配置与结果展示 - **PDF预览**:支持分页浏览、缩略图选择 - **参数配置**:自定义分辨率、提示词 - **OCR识别**:支持基于选定页面的识别并展示结构化结果 ## 技术栈 - React 18 - TypeScript - Ant Design 组件库 - PDF.js / React-PDF 用于PDF渲染 - Tailwind CSS 用于样式设计 ## 安装与运行 1. 克隆项目 ```bash git clone [项目地址] cd pdf-ocr-app ``` 2. 安装依赖 ```bash npm install ``` 3. 启动开发服务器 ```bash npm start ``` 4. 构建生产版本 ```bash npm run build ``` ## 使用说明 1. 点击"上传PDF"按钮选择PDF文件 2. 在左侧预览区浏览PDF内容,可点击缩略图切换页面 3. 在右侧配置区调整分辨率、设置提示词 4. 点击"开始识别"按钮执行OCR,识别结果将显示在右下方 ## 项目结构 ``` src/ ├── components/ # 组件目录 │ ├── PDFViewer.tsx # PDF预览组件 │ └── PDFThumbnail.tsx# PDF缩略图组件 ├── App.tsx # 应用主组件 ├── App.css # 应用样式 └── index.tsx # 入口文件 ``` # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `npm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can't go back!** If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/).