# US 2024/0202429 A1 · Method, device, computer equipment and storage medium for editing pdf files

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202429 A1
- Document ID: US20240202429A1
- Status: Published application
- Kind: A1
- Application number: 18/373,309
- Filed: 2023-09-27
- Published: 2024-06-20
- Earliest claimed: 2022-12-20
- Assignees: Kdan Mobile Software Ltd.
- Applicants: Kdan Mobile Software Ltd.
- Inventors: SHENG-JUN LU; GUO-LIN JIA; CHAO WANG; YUAN TAO; WEN-WEI LIN
- Web page: https://patentgrep.com/patent/US20240202429A1

## CPC

- G06F 40/166: Editing, e.g. inserting or deleting
- G06F 40/103: Formatting, i.e. changing of presentation of documents (automatic justification G06F40/189; automatic line break hyphenation G06F40/191)
- G06F 40/106: Display of layout of documents; Previewing
- G06F 40/109: Font handling; Temporal or kinetic typography
- G06F 40/205: Parsing
- G06V 30/10: Character recognition
- G06V 30/413: Classification of content, e.g. text, photographs or tables
- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

There is provided a device for editing a PDF file, including a display, a non-volatile storage medium, a memory and a processor. The non-volatile storage medium stores a computer program. The memory provides an environment for operations of the computer program in the non-volatile storage medium. The processor runs the computer program to parse the PDF file to obtain information of characters, generate character sets according to features of the characters, generate line sets according to heights and horizontal positions of the character sets, generate paragraph sets according to a height and a horizontal position of each line of the line sets, generate text region sets according a height and a horizontal position of each paragraph of the paragraph sets, and control the display to show the text region sets in the PDF file as editable text regions.

## Claims

### Claim 1

A method for recognizing a portable document format (PDF) file, comprising:
parsing text objects of the PDF file to obtain information of characters;
identifying features of adjacent characters in a horizontal direction, and merging characters having identical features to obtain character sets;
determining line sets according to first vertical pitches and first horizontal pitches of adjacent character sets;
determining paragraph sets according to second vertical pitches and second horizontal pitches of adjacent lines of the line sets; and
determining text region sets according to third vertical pitches and third horizontal pitches of adjacent paragraphs of the paragraph sets.

### Claim 2 (depends on 1)

The method as claimed in claim 1, further comprising:
parsing graphic objects of the PDF file and taking each picture as a graphic region.

### Claim 3 (depends on 1)

The method as claimed in claim 1, further comprising:
calculating an intersection set of boundaries of all characters in the character sets to obtain first set boundaries of the character sets;
calculating an intersection set of boundaries of all character sets in each line of the line sets to obtain a second set boundary of said each line; and
calculating an intersection set of boundaries of all lines in each paragraph of the paragraph sets to obtain a third set boundary of said each paragraph.

### Claim 4 (depends on 3)

The method as claimed in claim 3, wherein
the first vertical pitches and the first horizontal pitches are calculated according to two corresponding points of two first set boundaries of the adjacent character sets;
the second vertical pitches and the second horizontal pitches are calculated according to two corresponding points of two second set boundaries of the adjacent lines of the line sets; and
the third vertical pitches and the third horizontal pitches are calculated according to two corresponding points of two third set boundaries of the adjacent paragraphs of the paragraph sets.

### Claim 5 (depends on 3)

The method as claimed in claim 3, further comprising:
sequentially arranging all character sets of the PDF file from top to bottom and from left to right according to lower sides of the first set boundaries of every character set;
sequentially arranging all lines of the PDF file from top to bottom and from left to right according to lower sides of the second set boundaries of every line; and
sequentially arranging all paragraphs of the PDF file from top to bottom and from left to right according to lower sides of the third set boundaries of every paragraph.

### Claim 6 (depends on 1)

The method as claimed in claim 1, wherein the features comprise a font, a size and a color of the characters.

### Claim 7

A device configured to provide an editable PDF file, the device comprising:
a display, configured to show a PDF file;
a non-volatile storage medium, configured to record a computer program;
a memory, configured to provide an environment for operations of the computer program in the non-volatile storage medium; and
a processor, configured to
run the computer program to parse the PDF file to obtain information of characters,
generate character sets according to features of the characters,
generate line sets according to heights and horizontal positions of the character sets,
generate paragraph sets according to a height and a horizontal position of each line of the line sets,
generate text region sets according to a height and a horizontal position of each paragraph of the paragraph sets, and
control the display to show the text region sets as editable text regions in the PDF file.

### Claim 8 (depends on 7)

The device as claimed in claim 7, wherein the processor is further configured to
parse graphic objects in the PDF file and take each picture parsed from the PDF file as one graphic region, and
control the display to show the one graphic region as an editable graphic region in the PDF file.

### Claim 9 (depends on 1)

A computer equipment, comprising:
a storage device, configured to record a computer program; and
a processor, configured to run the computer program recorded in the storage device to perform the method as claimed in claim 1.

### Claim 10 (depends on 9)

The computer equipment as claimed in claim 9, wherein the method further comprises:
parsing graphic objects of the PDF file and taking each picture as a graphic region.

### Claim 11 (depends on 9)

The computer equipment as claimed in claim 9, wherein the method further comprises:
calculating an intersection set of boundaries of all characters in the character sets to obtain first set boundaries of the character sets;
calculating an intersection set of boundaries of all character sets in each line of the line sets to obtain a second set boundary of said each line; and
calculating an intersection set of boundaries of all lines in each paragraph of the paragraph sets to obtain a third set boundary of said each paragraph.

### Claim 12 (depends on 11)

The computer equipment as claimed in claim 11, wherein
the first vertical pitches and the first horizontal pitches are calculated according to two corresponding points of two first set boundaries of the adjacent character sets;
the second vertical pitches and the second horizontal pitches are calculated according to two corresponding points of two second set boundaries of the adjacent lines of the line sets; and
the third vertical pitches and the third horizontal pitches are calculated according to two corresponding points of two third set boundaries of the adjacent paragraphs of the paragraph sets.

### Claim 13 (depends on 11)

The computer equipment as claimed in claim 11, wherein the method further comprises:
sequentially arranging all character sets of the PDF file from top to bottom and from left to right according to lower sides of the first set boundaries of every character set;
sequentially arranging all lines of the PDF file from top to bottom and from left to right according to lower sides of the second set boundaries of every line; and
sequentially arranging all paragraphs of the PDF file from top to bottom and from left to right according to lower sides of the third set boundaries of every paragraph.

### Claim 14 (depends on 9)

The computer equipment as claimed in claim 9, wherein the features comprise a font, a size and a color of the characters.

### Claim 15 (depends on 1)

A content accessible memory, the content accessible memory being recorded with a computer program, wherein the computer program is run by a processor to perform the method as claimed in claim 1.

### Claim 16 (depends on 15)

The content accessible memory as claimed in claim 15, wherein the method further comprises:
parsing graphic objects of the PDF file and taking each picture as a graphic region.

### Claim 17 (depends on 15)

The content accessible memory as claimed in claim 15, wherein the method further comprises:
calculating an intersection set of boundaries of all characters in the character sets to obtain first set boundaries of the character sets;
calculating an intersection set of boundaries of all character sets in each line of the line sets to obtain a second set boundary of said each line; and
calculating an intersection set of boundaries of all lines in each paragraph of the paragraph sets to obtain a third set boundary of said each paragraph.

### Claim 18 (depends on 17)

The content accessible memory as claimed in claim 17, wherein
the first vertical pitches and the first horizontal pitches are calculated according to two corresponding points of two first set boundaries of the adjacent character sets;
the second vertical pitches and the second horizontal pitches are calculated according to two corresponding points of two second set boundaries of the adjacent lines of the line sets; and
the third vertical pitches and the third horizontal pitches are calculated according to two corresponding points of two third set boundaries of the adjacent paragraphs of the paragraph sets.

### Claim 19 (depends on 17)

The content accessible memory as claimed in claim 17, wherein the method further comprises:
sequentially arranging all character sets of the PDF file from top to bottom and from left to right according to lower sides of the first set boundaries of every character set;
sequentially arranging all lines of the PDF file from top to bottom and from left to right according to lower sides of the second set boundaries of every line; and
sequentially arranging all paragraphs of the PDF file from top to bottom and from left to right according to lower sides of the third set boundaries of every paragraph.

### Claim 20 (depends on 15)

The content accessible memory as claimed in claim 15, wherein the features comprise a font, a size and a color of the characters.
