Image PDF Text Layer Reconstruction for Copyable Documents
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Users cannot perform operations such as copying, pasting, and click-and-drag selection on scanned or photocopied PDF documents in image form due to their platform-independent nature, causing inconvenience.
Innovation Solution
Perform Optical Character Recognition (OCR) on PDF documents to obtain recognized target results and first coordinate information, convert these coordinates into PDF coordinates, determine a target font library, and rewrite characters into the PDF document based on these coordinates and the font library, allowing standard character conversion.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If PDF documents are stored in image form to maintain platform independence, then portability and compatibility are improved, but text processing capabilities such as copying, pasting, and selection are lost
Solution Approach 1:
The patent segments the PDF document into two independent layers: an image layer for visual display and a text layer for processing. The text layer is generated through OCR recognition and stored separately as text content with coordinate information, allowing text operations without affecting the image-based platform independence.
Solution Approach 2:
The patent introduces an intermediary text layer that mediates between the image layer and user operations. This text layer contains recognized text content and coordinate mappings, enabling copying, pasting, and selection operations while the original image remains intact for portability.
2Ease of operation
If OCR processing is performed on image-form PDF documents to enable text operations, then text processing capability is improved, but processing time and computational complexity increase
Solution Approach 1:
The patent performs OCR processing in advance to generate text content and coordinate information before the document needs to be processed. This preliminary action creates a text layer that can be quickly accessed and manipulated without repeating the time-consuming OCR process during subsequent operations.
Solution Approach 2:
The patent creates a text copy of the document content through OCR, storing the recognized text and its corresponding coordinates. This text copy can be rapidly processed for copying, pasting, and selection operations without re-processing the original image, significantly reducing operational time.
3Measurement precision
If coordinate conversion from OCR format to PDF format is performed to maintain layout accuracy, then positioning precision is improved, but processing complexity increases
Solution Approach 1:
The patent applies parameter changes by transforming coordinate systems from OCR format to PDF format using defined conversion formulas. The coordinate conversion adjusts for different origin points and coordinate directions, maintaining positioning accuracy through mathematical parameter transformation rather than complex processing.
Solution Approach 2:
The patent replaces complex image processing mechanisms with straightforward coordinate mathematics. Instead of processing pixel data or using complex image algorithms, the system uses simple coordinate conversion formulas to transform positions between OCR and PDF formats, significantly reducing processing complexity.
Applied Scientific Principles
This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.
Function Achieved in This Case
Enables users to conveniently perform operations like copying, pasting, and click-and-drag selection on image-form PDF documents, enhancing usability and accuracy of operation results.
Implementation Method 1
performing Optical Character Recognition (OCR) on a PDF document in image form to obtain recognized target results and first coordinate information for each target result
Implementation Method 2
converting the first coordinate information into corresponding PDF coordinates and using the PDF coordinates as second coordinate information
Data Source
Figure 1
Figure 2~3
Figure 4~5
AI summary
The present disclosure provides Portable Document Format (PDF) document processing method, electronic device, and storage medium, involving fields of natural language processing and computer vision in artificial intelligence. The method includes: performing Optical Character Recognition (OCR) on a PDF document in image form to obtain recognized target results and first coordinate information for each target result, where each target result includes one character or at least two consecutive characters forming a character segment; for each target result, converting the first coordinate information into corresponding PDF coordinates and using the PDF coordinates as second coordinate information; determining a target font library for rewriting based on one or more characters in each target result; rewriting the one or more characters from each target result into the PDF document based on the second coordinate information and the target font library, to obtain a desired target document.