IP Library Patent Application 15369103
Patent Application
App. No. 15/369,103

TEXT OUTPUT COMMANDS SEQUENCING FOR PDF DOCUMENTS

Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US None
App. No.
15/369,103
Abstract

A document is received with a plurality of text output commands in a text layer, where each text output command is to render one or more glyphs on a display device. A set of text output commands are identified in the text layer for a page of a plurality of pages of the document. The logical structure of the page of the document is determined, and ordered sequence of a set of text output commands for the page is determined, where the ordered sequence reflects the reading order within each of a plurality of blocks of content for the page. A modified text layer is generated for the document with the set of output commands in the ordered sequence. The modified text layer is then provided to cause a display device to render a plurality of glyphs corresponding to the set of text output commands in the ordered sequence.

Claims (158)

1 . A method comprising:

receiving, by a processing device, a document comprising a plurality of text output commands in a text layer, wherein each text output command is to render one or more glyphs on a display device;

identifying, using the plurality of text output commands in the text layer, a set of text output commands for a page of a plurality of pages of the document;

determining a logical structure of the page of the document, wherein the logical structure of the page comprises a plurality of blocks of content that cause an order of the set of text output commands in the text layer to differ from a reading order of the page;

determining an orientation of text in the plurality of blocks of content;

determining, by the processing device, an ordered sequence of the set of text output commands for the page based on the orientation of text, wherein the ordered sequence reflects the reading order within each of the plurality of blocks of content;

generating, by the processing device, a modified text layer for the document, wherein the modified text layer comprises the set of text output commands in the ordered sequence; and

providing, by the processing device, the modified text layer to cause the display device to render a plurality of glyphs corresponding to the set of text output commands in the ordered sequence.

2 . The method of claim 1 , further comprising:

storing a modified document with the modified text layer.

3 . The method of claim 1 , wherein determining the logical structure of the page of the document comprises:

receiving an image of the page of the document;

identifying the plurality of blocks of content in the image of the page of the document; and

determining location coordinates of each of the plurality of blocks of content in the image of the page.

4 . The method of claim 3 , wherein determining the ordered sequence comprises:

selecting a first block of the plurality of blocks of content, wherein the first block comprises text content;

determining a boundary area of the first block based on the location coordinates of the first block;

identifying a first subset of text output commands located within the boundary area of the first block;

sorting the first subset of text output commands into a first reading order of the text commands within the boundary area of the first block; and

generating an ordered sequence number for each text output command of the first subset of text output commands, wherein each ordered sequence number reflects a position of a corresponding text output command in the first reading order.

5 . The method of claim 4 , wherein sorting the first subset of output commands comprises:

ordering the first subset of text output commands into a plurality of lines of text output commands based on coordinate values of the first subset of output commands; and

ordering the text output commands for each of the plurality of lines of text output commands in the reading order for the respective line based on the coordinate values.

6 . The method of claim 5 , wherein the orientation of text in the first block is horizontal, and wherein ordering the first subset of text output commands into lines comprises:

sorting the first subset of text output commands by vertical axis coordinate value;

identifying a first text output command of the first subset of text output commands with a first vertical axis coordinate value;

identifying a second text output command of the first subset of text output commands with a second vertical axis coordinate value; and

responsive to determining that a difference between the first vertical axis coordinate value and the second vertical axis coordinate value is less than or equal to a predetermined threshold, assigning the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first vertical axis coordinate and the second vertical axis coordinate is greater than a predetermined threshold, assigning the first text output command to the first line of text and the second text output command to a second line of text.

7 . The method of claim 6 , wherein ordering the text output commands for each line of text output commands in the reading order comprises:

sorting the text output commands for each line of text output commands in reading order.

8 . The method of claim 7 , further comprising:

sorting the text output commands for each line of text output commands in ascending order according to a corresponding horizontal coordinate value

9 . The method of claim 5 , wherein the orientation of text in the first block is vertical, and wherein ordering the first subset of text output commands into lines comprises:

sorting the first subset of text output commands in by horizontal axis coordinate value;

identifying a first text output command of the first subset of text output commands with a first horizontal axis coordinate value;

identifying a second text output command of the first subset of text output commands with a second horizontal axis coordinate value; and

responsive to determining that a difference between the first horizontal axis coordinate value and the second horizontal axis coordinate value is less than or equal to a predetermined threshold, assigning the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first horizontal axis coordinate and the second horizontal axis coordinate is greater than a predetermined threshold, assigning the first text output command to the first line of text and the second text output command to a second line of text.

10 . The method of claim 9 , wherein ordering the text output commands for each line of text output commands in the reading order comprises:

sorting the text output commands for each line of text output commands in reading order.

11 . The method of claim 10 , further comprising:

sorting the text output commands for each line of text output commands in ascending order according to a corresponding vertical coordinate value

12 . The method of claim 4 , further comprising:

selecting a second block of the plurality of blocks of content, wherein the second block comprises text content;

determining a boundary area of the second block based on the location coordinates of the second block;

identifying a second subset of text output commands located within the boundary area of the second block;

sorting the second subset of text output commands into a second reading order of the text commands within the boundary area of the second block; and

generating an additional ordered sequence number for each text output command of the second subset of text output commands, wherein each additional ordered sequence number reflects the position in the second reading order of the corresponding text output command of the second subset of text output commands.

13 . The method of claim 10 , wherein the ordered sequence numbers for the first subset of text output commands precede the additional ordered sequence numbers of the second subset of text output commands in the ordered sequence.

14 . The method of claim 1 , wherein the document comprises a portable document format (PDF) document.

15 . The method of claim 1 , wherein the plurality of blocks of content comprise at least one of a block of text content, a block of image content, or a block of tabular content.

16 . A computing apparatus comprising:

a memory to store instructions; and

a processing device, operatively coupled to the memory, to execute the instructions, wherein the processing device is to:

receive, by the processing device, a document comprising a plurality of text output commands in a text layer, wherein each text output command is to render one or more glyphs on a display device;

identify, using the plurality of text output commands in the text layer, a set of text output commands for a page of a plurality of pages of the document;

determine a logical structure of the page of the document, wherein the logical structure of the page comprises a plurality of blocks of content that cause an order of the set of text output commands in the text layer to differ from a reading order of the page;

determine an orientation of text in the plurality of blocks of content;

determine, by the processing device, an ordered sequence of the set of text output commands for the page based on the orientation of text, wherein the ordered sequence reflects the reading order within each of the plurality of blocks of content;

generate, by the processing device, a modified text layer for the document, wherein the modified text layer comprises the set of text output commands in the ordered sequence; and

provide, by the processing device, the modified text layer to cause the display device to render a plurality of glyphs corresponding to the set of text output commands in the ordered sequence.

17 . The computing apparatus of claim 16 , wherein the processing device is further to:

store a modified document with the modified text layer.

18 . The computing apparatus of claim 16 , wherein to determine the logical structure of the page of the document, the processing device is to:

receive an image of the page of the document;

identify the plurality of blocks of content in the image of the page of the document; and

determine location coordinates of each of the plurality of blocks of content in the image of the page.

19 . The computing apparatus of claim 18 , wherein to determine the ordered sequence the processing device is to:

select a first block of the plurality of blocks of content, wherein the first block comprises text content;

determine a boundary area of the first block based on the location coordinates of the first block;

identify a first subset of text output commands located within the boundary area of the first block;

sort the first subset of text output commands into a first reading order of the text commands within the boundary area of the first block; and

generate an ordered sequence number for each text output command of the first subset of text output commands, wherein each ordered sequence number reflects a position of a corresponding text output command in the first reading order.

20 . The computing apparatus of claim 19 , wherein to sort the first subset of output commands, the processing device is to:

order the first subset of text output commands into a plurality of lines of text output commands based on coordinate values of the first subset of output commands; and

order the text output commands for each of the plurality of lines of text output commands in the reading order for the respective line based on the coordinate values.

21 . The computing apparatus of claim 20 , wherein the orientation of the text in the first block is horizontal, and wherein to order the first subset of output commands into lines, the processing device is to:

sort the first subset of text output commands by vertical axis coordinate value;

identify a first text output command of the first subset of text output commands with a first vertical axis coordinate value;

identify a second text output command of the first subset of text output commands with a second vertical axis coordinate value; and

responsive to determining that a difference between the first vertical axis coordinate value and the second vertical axis coordinate value is less than or equal to a predetermined threshold, assign the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first vertical axis coordinate and the second vertical axis coordinate is greater than a predetermined threshold, assign the first text output command to the first line of text and the second text output command to a second line of text.

22 . The computing apparatus of claim 21 , wherein to order the text output commands for each line of text output commands in the reading order, the processing device is to:

sort the text output commands for each line of text output commands in reading order.

23 . The computing apparatus of claim 22 , further comprising:

sort the text output commands for each line of text output commands in ascending order according to a corresponding horizontal coordinate value

24 . The computing apparatus of claim 20 , wherein the orientation of text in the first block is vertical, and wherein to order the first subset of text output commands into lines, the processing device is to:

sort the first subset of text output commands in by horizontal axis coordinate value;

identify a first text output command of the first subset of text output commands with a first horizontal axis coordinate value;

identify a second text output command of the first subset of text output commands with a second horizontal axis coordinate value; and

responsive to determining that a difference between the first horizontal axis coordinate value and the second horizontal axis coordinate value is less than or equal to a predetermined threshold, assign the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first horizontal axis coordinate and the second horizontal axis coordinate is greater than a predetermined threshold, assign the first text output command to the first line of text and the second text output command to a second line of text.

25 . The computing apparatus of claim 24 , wherein to order the text output commands for each line of text output commands in the reading order, the processing device is to:

sort the text output commands for each line of text output commands in reading order.

26 . The computing apparatus of claim 25 , further comprising:

sort the text output commands for each line of text output commands in ascending order according to a corresponding vertical coordinate value

27 . The computing apparatus of claim 19 , wherein the processing device is further to:

select a second block of the plurality of blocks of content, wherein the second block comprises text content;

determine a boundary area of the second block based on the location coordinates of the second block;

identify a second subset of text output commands located within the boundary area of the second block;

sort the second subset of text output commands into a second reading order of the text commands within the boundary area of the second block; and

generate an additional ordered sequence number for each text output command of the second subset of text output commands, wherein each additional ordered sequence number reflects the position in the second reading order of the corresponding text output command of the second subset of text output commands.

28 . The computing apparatus of claim 27 , wherein the ordered sequence numbers for the first subset of text output commands precede the additional ordered sequence numbers of the second subset of text output commands in the ordered sequence.

29 . The computing apparatus of claim 16 , wherein the document comprises a portable document format (PDF) document.

30 . The computing apparatus of claim 16 , wherein the plurality of blocks of content comprise at least one of a block of text content, a block of image content, or a block of tabular content.

31 . A non-transitory computer readable storage medium, having instructions stored therein, which when executed by a processing device of a computer system, cause the processing device to perform operations comprising:

receiving, by the processing device, a document comprising a plurality of text output commands in a text layer, wherein each text output command is to render one or more glyphs on a display device;

identifying, using the plurality of text output commands in the text layer, a set of text output commands for a page of a plurality of pages of the document;

determining a logical structure of the page of the document, wherein the logical structure of the page comprises a plurality of blocks of content that cause an order of the set of text output commands in the text layer to differ from a reading order of the page;

determining an orientation of text in the plurality of blocks of content;

determining, by the processing device, an ordered sequence of the set of text output commands for the page based on the orientation of text, wherein the ordered sequence reflects the reading order within each of the plurality of blocks of content;

generating, by the processing device, a modified text layer for the document, wherein the modified text layer comprises the set of text output commands in the ordered sequence; and

providing, by the processing device, the modified text layer to cause the display device to render a plurality of glyphs corresponding to the set of text output commands in the ordered sequence.

32 . The non-transitory computer readable storage medium of claim 31 , the operations further comprising:

storing a modified document with the modified text layer.

33 . The non-transitory computer readable storage medium of claim 31 , wherein determining the logical structure of the page of the document comprises:

receiving an image of the page of the document;

identifying the plurality of blocks of content in the image of the page of the document; and

determining location coordinates of each of the plurality of blocks of content in the image of the page.

34 . The non-transitory computer readable storage medium of claim 33 , wherein determining the ordered sequence comprises:

selecting a first block of the plurality of blocks of content, wherein the first block comprises text content;

determining a boundary area of the first block based on the location coordinates of the first block;

identifying a first subset of text output commands located within the boundary area of the first block;

sorting the first subset of text output commands into a first reading order of the text commands within the boundary area of the first block; and

generating an ordered sequence number for each text output command of the first subset of text output commands, wherein each ordered sequence number reflects a position of a corresponding text output command in the first reading order.

35 . The non-transitory computer readable storage medium of claim 34 , wherein sorting the first subset of output commands comprises:

ordering the first subset of text output commands into a plurality of lines of text output commands based on coordinate values of the first subset of output commands; and

ordering the text output commands for each of the plurality of lines of text output commands in the reading order for the respective line based on the coordinate values.

36 . The non-transitory computer readable storage medium of claim 35 , wherein the orientation of text in the first block is horizontal, and wherein ordering the first subset of text output commands into lines comprises:

sorting the first subset of text output commands by vertical axis coordinate value;

identifying a first text output command of the first subset of text output commands with a first vertical axis coordinate value;

identifying a second text output command of the first subset of text output commands with a second vertical axis coordinate value; and

responsive to determining that a difference between the first vertical axis coordinate value and the second vertical axis coordinate value is less than or equal to a predetermined threshold, assigning the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first vertical axis coordinate and the second vertical axis coordinate is greater than a predetermined threshold, assigning the first text output command to the first line of text and the second text output command to a second line of text.

37 . The non-transitory computer readable storage medium of claim 36 , wherein ordering the text output commands for each line of text output commands in the reading order comprises:

sorting the text output commands for each line of text output commands in reading order.

38 . The non-transitory computer readable storage medium of claim 37 , further comprising:

sorting the text output commands for each line of text output commands in ascending order according to a corresponding horizontal coordinate value

39 . The non-transitory computer readable storage medium of claim 35 , wherein the orientation of text in the first block is vertical, and wherein ordering the first subset of text output commands into lines comprises:

sorting the first subset of text output commands in by horizontal axis coordinate value;

identifying a first text output command of the first subset of text output commands with a first horizontal axis coordinate value;

identifying a second text output command of the first subset of text output commands with a second horizontal axis coordinate value; and

responsive to determining that a difference between the first horizontal axis coordinate value and the second horizontal axis coordinate value is less than or equal to a predetermined threshold, assigning the first text output command and the second text output command to a first line of text; and

responsive to determining that the difference between the first horizontal axis coordinate and the second horizontal axis coordinate is greater than a predetermined threshold, assigning the first text output command to the first line of text and the second text output command to a second line of text.

40 . The non-transitory computer readable storage medium of claim 39 , wherein ordering the text output commands for each line of text output commands in the reading order comprises:

sorting the text output commands for each line of text output commands in reading order.

41 . The non-transitory computer readable storage medium of claim 40 , further comprising:

sorting the text output commands for each line of text output commands in ascending order according to a corresponding vertical coordinate value

42 . The non-transitory computer readable storage medium of claim 34 , the operations further comprising:

selecting a second block of the plurality of blocks of content, wherein the second block comprises text content;

determining a boundary area of the second block based on the location coordinates of the second block;

identifying a second subset of text output commands located within the boundary area of the second block;

sorting the second subset of text output commands into a second reading order of the text commands within the boundary area of the second block; and

generating an additional ordered sequence number for each text output command of the second subset of text output commands, wherein each additional ordered sequence number reflects the position in the second reading order of the corresponding text output command of the second subset of text output commands.

43 . The non-transitory computer readable storage medium of claim 31 , wherein the ordered sequence numbers for the first subset of text output commands precede the additional ordered sequence numbers of the second subset of text output commands in the ordered sequence.

44 . The non-transitory computer readable storage medium of claim 31 , wherein the document comprises a portable document format (PDF) document.

45 . The non-transitory computer readable storage medium of claim 31 , wherein the plurality of blocks of content comprise at least one of a block of text content, a block of image content, or a block of tabular content.

Assignments (2)
MERGER Recorded Dec 31, 2018
From: ABBYY DEVELOPMENT LLC
To: ABBYY PRODUCTION LLC
Reel/Frame 047997/0652 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 14, 2016
From: MASALOVITCH, ANTON ANDREEVICH
To: ABBYY DEVELOPMENT LLC
Reel/Frame 040737/0145 →