CN110083812B - Picture layout method and device of electronic document and electronic equipment - Google Patents

Picture layout method and device of electronic document and electronic equipment Download PDF

Info

Publication number
CN110083812B
CN110083812B CN201810078101.9A CN201810078101A CN110083812B CN 110083812 B CN110083812 B CN 110083812B CN 201810078101 A CN201810078101 A CN 201810078101A CN 110083812 B CN110083812 B CN 110083812B
Authority
CN
China
Prior art keywords
picture
list item
list
operation instruction
pdf page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810078101.9A
Other languages
Chinese (zh)
Other versions
CN110083812A (en
Inventor
邓斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Guangzhou Kingsoft Mobile Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd, Guangzhou Kingsoft Mobile Technology Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Priority to CN201810078101.9A priority Critical patent/CN110083812B/en
Publication of CN110083812A publication Critical patent/CN110083812A/en
Application granted granted Critical
Publication of CN110083812B publication Critical patent/CN110083812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a picture layout method and device of an electronic document and electronic equipment, wherein the method comprises the following steps: acquiring information of at least one picture in a current PDF page according to a picture operation instruction of the picture; according to the information of the picture, a first list item representing the display order of the picture and a second list item representing the display order of the overlapped text lines of the picture are searched in a drawing list of the PDF page, and the ordering of the first list item and the second list item in the drawing list is adjusted based on the picture operation instruction; when the PDF page is drawn, the picture and the overlapped text line thereof are drawn according to the ordering of the first list item and the second list item in the drawing list, so that the picture and the overlapped text line thereof are displayed according to the hierarchical relation indicated by the picture operation instruction. The method and the device can meet various requirements of users on picture layout modes in the electronic document, and improve user experience.

Description

Picture layout method and device of electronic document and electronic equipment
Technical Field
The present invention relates to the field of information display, and in particular, to a method and an apparatus for displaying a picture of an electronic document, and an electronic device.
Background
Portable file format (PDF, portable Document Format) is a common electronic document format.
After the PDF document is added with the picture, if the display area of the picture and the display area of the text are overlapped, the picture can cover the text in the display area or the picture can be covered by the text in the display area. However, there are often various requirements on the layout of a picture when a user edits a PDF document, for example, after a new picture is added to the PDF document, the user wants the picture to cover only one or a few lines of text or to cover one or a few lines of text. Currently, the related art has not proposed an effective solution for the above-mentioned various demands of users for PDF document picture layout.
Disclosure of Invention
The invention provides a picture layout method and device of an electronic document and electronic equipment, which can meet various requirements of users on picture layout modes in the electronic document and improve user experience.
The application provides the following technical scheme.
A picture layout method of an electronic document, comprising:
acquiring information of at least one picture in a current PDF page according to a picture operation instruction of the picture;
according to the information of the picture, a first list item representing the display order of the picture and a second list item representing the display order of the overlapped text lines of the picture are searched in a drawing list of the PDF page, and the ordering of the first list item and the second list item in the drawing list is adjusted based on the picture operation instruction;
when the PDF page is drawn, the picture and the overlapped text line thereof are drawn according to the ordering of the first list item and the second list item in the drawing list, so that the picture and the overlapped text line thereof are displayed according to the hierarchical relation indicated by the picture operation instruction.
Wherein the information of the picture includes one of: attribute information of the picture; coordinate information of the picture.
One list item of the drawing list corresponds to one picture or one text line of a PDF page, the list item comprises an index and a drawing number, the index is used for associating the list item with information of the corresponding picture or text line, and the drawing number represents the display order of the corresponding picture or text line; the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction includes: and modifying drawing numbers in the first list item and the second list item based on the picture operation instruction, and resetting positions of the first list item and the second list item in the drawing list according to the drawing numbers.
Wherein the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction includes: when the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1.
Wherein the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction includes: and when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1.
When the PDF page is drawn, drawing the picture and the overlapped text line thereof according to the ordering of the first list item and the second list item in the drawing list, wherein the drawing comprises the following steps: traversing the drawing list of the PDF page, and drawing objects of the PDF page one by one according to the ordering of list items in the drawing list, wherein the objects at least comprise the pictures and the overlapped text lines thereof.
A picture layout apparatus of an electronic document, comprising:
the acquisition module is used for acquiring information of at least one picture according to a picture operation instruction aiming at the current PDF page;
the searching module is used for searching a first list item representing the display order of the picture and a second list item representing the display order of the overlapped text lines of the picture in a drawing list of the PDF page according to the information of the picture;
the adjusting module is used for adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction;
and the drawing module is used for drawing the pictures and the overlapped text lines according to the ordering of the first list item and the second list item in the drawing list when the PDF page is drawn, so that the pictures and the overlapped text lines are displayed according to the hierarchical relation indicated by the picture operation instruction.
One list item of the drawing list corresponds to one picture or one text line of a PDF page, the list item comprises an index and a drawing number, the index is used for associating the list item with information of the corresponding picture or text line, and the drawing number represents the display order of the corresponding picture or text line; the adjustment module is specifically configured to modify drawing numbers in the first list item and the second list item based on the picture operation instruction, and reset positions of the first list item and the second list item in the drawing list according to the drawing numbers.
The adjusting module is configured to adjust the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction, and includes one of the following:
when the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1;
and when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1.
The drawing module is specifically configured to traverse a drawing list of the PDF page, and draw objects of the PDF page one by one according to a ranking of list items in the drawing list, where the objects include at least the picture and an overlapping text line thereof.
An electronic device, comprising:
a display;
a memory storing a computer program;
and a processor configured to read the computer program to perform a picture layout method of the electronic document as described above.
A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the picture layout method of an electronic document described above.
The advantages of the present application include at least:
according to the embodiment of the invention, the hierarchical relation between the designated picture and the overlapped text line in the PDF document can be changed according to the instruction input by the user, so that the layout relation between the picture and the overlapped text line meets the user requirement, thereby meeting various requirements of the user on the layout of the picture of the PDF document, not only perfecting the editing function of the PDF document, but also greatly simplifying the user operation and greatly improving the user experience.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate and do not limit the invention.
FIG. 1 is a flowchart of a picture layout method of an electronic document according to an embodiment;
FIG. 2 is a flowchart illustrating an exemplary implementation of a picture layout method according to an embodiment;
fig. 3A, 3B, 3C, and 3D are exemplary diagrams of interfaces when the layout of the pictures on the PDF page is changed;
FIG. 4 is a flowchart illustrating another exemplary implementation of a picture layout method according to an embodiment;
fig. 5 is a schematic diagram of a picture layout device of an electronic document according to the second embodiment;
fig. 6 is a schematic diagram of an exemplary structure of an electronic device of the third embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail hereinafter with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be arbitrarily combined with each other.
The steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
The electronic device described herein may be any device that supports document processing. The electronic device may have a variety of implementations. For example, the electronic device may be a mobile terminal device such as a cell phone, tablet computer, notebook computer, palm top computer, personal digital assistant (Personal Digital Assistant, PDA), portable media player (Portable Media Player, PMP), navigation device, wearable device, smart bracelet, pedometer, and a stationary terminal device such as a desktop computer.
The implementation manner of the technical scheme of the application is described in detail below.
Example 1
As shown in fig. 1, a picture layout method of an electronic document may include:
step 101, obtaining information of at least one picture in a current PDF page according to a picture operation instruction of the picture;
step 102, according to the information of the picture, searching a first list item representing the display order of the picture and a second list item representing the display order of the overlapped text lines of the picture in a drawing list of the PDF page, and adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction;
and step 103, when the PDF page is drawn, drawing the picture and the overlapped text line thereof according to the sequence of the first list item and the second list item in the drawing list so that the picture and the overlapped text line thereof are displayed according to the hierarchical relation indicated by the picture operation instruction.
In this embodiment, the information of the picture may include one of the following: attribute information of the picture; coordinate information of the picture. Here, the attribute information of the picture includes information such as width and height when the picture is displayed in the PDF page, and the coordinate information of the picture refers to coordinate information of an area where the picture is displayed in the PDF page. Here, the information of the picture may include other information such as a name, a data length, an actual size, etc. of the picture.
In this embodiment, the drawing list is used for drawing the PDF page in the PDF page display process. One PDF page corresponds to one drawing list, and one drawing list may include a plurality of list items corresponding to all objects in the PDF page, where all objects may include pictures, text lines, and the like in the PDF page, and may include tables, graphics, and the like in the PDF page. One picture may correspond to one list item, one text line may correspond to one list item, the list item of the corresponding picture and the list item of the corresponding text line may represent different types, that is, the list item of the corresponding picture is one type, the list item of the corresponding text line is another type, and each type of list item may adopt its unique representation mode. It will be appreciated that in other implementations, different categories of listings may be represented in the same manner.
In one implementation, one list item in one drawing list may correspond to one picture or one text line of a PDF page, and each list item may include an index for associating the list item with information of the corresponding picture or text line and a drawing number indicating a display order of the corresponding picture or text line. The drawing number may represent the ordering of the list item in the drawing list.
Table 1 below is an example of a drawing list. The drawing list comprises 5 list items, each list item comprises an index and a drawing number, and the drawing number is the ordering of the list items in the drawing list.
List item name Index Drawing numbers
List item a First line of characters 1
List item B Picture a 2
List item C Second line of text 3
List item D Third line of text 4
List item E Fourth line of text 5
TABLE 1
In this embodiment, the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction may include: and modifying drawing numbers in the first list item and the second list item based on the picture operation instruction, and resetting positions of the first list item and the second list item in the drawing list according to the drawing numbers. Therefore, the positions of the list items can be changed by modifying the drawing numbers, and the ordering of each list item in the drawing list is updated, so that the processing efficiency is high, and errors are not easy to occur.
In one implementation, the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction may include: when the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1. Therefore, the picture can cover the front N lines of characters floating on the picture by moving the list item, so that the similar layout requirements of a user on the picture in the PDF document are met.
In another implementation manner, the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction may include: and when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1. Therefore, by moving the list item, M rows of characters in the back of the character rows originally covered by the picture (namely, the overlapped character rows of the picture) can be displayed, so that the similar layout requirements of users on the picture in the PDF document are met.
In this embodiment, when the PDF page is drawn, drawing the picture and the overlapped text line thereof according to the ordering of the first list item and the second list item in the drawing list may include: traversing the drawing list of the PDF page, and drawing objects of the PDF page one by one according to the ordering of list items in the drawing list, wherein the objects at least comprise the pictures and the overlapped text lines thereof. In this way, corresponding objects are sequentially drawn according to the ordering of list items in the drawing list of the PDF page, so that the display effect of the PDF page meets the requirements of users, and the processing efficiency is higher.
Specific implementations of the present embodiment are described below with reference to examples.
When a user needs to float a certain picture in a PDF page, the processing flow may include:
step 201, when the electronic equipment displays a PDF document interface, a user operates on the PDF document interface and inputs a picture operation instruction, wherein the picture operation instruction represents floating a selected picture by one layer;
in practical application, the user may input the picture operation instruction in various manners, for example, select a picture and click a corresponding menu item preset in a menu bar of the PDF document to input the picture operation instruction, or select a picture, trigger a right-key menu through a right-click mouse, and click a menu item "floating up one layer" in the right-key menu. In addition, the input of the picture operation instruction, such as a preset shortcut key, can be realized in other manners.
Step 202, the electronic device receives the above-mentioned picture operation instruction input by the user, detects the coordinate information of the position selected by the user and finds the picture to be processed based on the coordinate information, obtains the coordinate information of the picture, and the attribute information of the picture, wherein the attribute information includes but is not limited to the coordinate of the picture in the PDF page display area, the display width and height information;
step 203, finding a first list item corresponding to the picture in a drawing list of the current PDF page according to the information of the picture (for example, the coordinate information of the picture), and finding a second list item corresponding to the overlapping text line of the picture from the position of the first list item;
here, there may be one or more overlapping text lines of a picture, and there may be one or more corresponding second list items.
Here, the process of finding the first list item corresponding to the picture in the drawing list of the current PDF page according to the information of the picture (for example, the coordinate information of the picture) may be: from the first list item to the last list item in the drawing list, traversing in sequence, firstly judging the type of the list item, if the list item is not a picture, searching the next list item, if the list item is a picture, judging whether the coordinate point input by the user is in the range of the picture according to the coordinate of the picture in the document and the width and height of the picture, if the coordinate point input by the user is in the range of the picture, searching successfully, and if the coordinate point input by the user is not in the range, continuing searching the next list item.
Step 204, judging whether the picture is currently located on the top layer, if so, ending the current flow, otherwise, continuing step 205;
specifically, whether the first list item is behind the second list item in the position of the drawing list is judged, if yes, the picture is indicated to be currently located on the top layer, and if not, the picture is indicated to be not currently located on the top layer.
Step 205, removing the first list item from the drawing list;
step 206, inserting the first list item at a position behind the second list item in the drawing list, so that the ordering of the first list item and the second list item in the current PDF page drawing list is updated by changing the relative positions of the first list item and the second list item;
here, if the picture overlaps a plurality of lines of text, that is, there are a plurality of second list items, the search may be sequentially performed according to the order of the list items in the drawing list, and the first list item may be inserted at a position subsequent to the first found second list item. In addition, a second list item may optionally be inserted into the first list item after the second list item, which is not limited herein. Step 207, updating the drawing list of the PDF page to the page data of the current PDF page, and loading the PDF page data into a memory for storage;
here, PDF page data may include, but is not limited to, text, pictures, forms, and the like.
Here, the drawing list of the PDF page may be updated, and each item in the drawing list may be sequentially generated into a corresponding PDF standard format for saving.
And step 208, drawing and displaying the PDF page by traversing the drawing list, and sequentially drawing and displaying the pictures and the overlapped characters according to the ordering of the first list item and the second list item in the drawing list when the PDF page is drawn.
As shown in fig. 3A, 3B, 3C, and 3D, an exemplary diagram of an interface for PDF picture layout change is shown. Fig. 3A is a schematic diagram of an interface before the floating operation, in which the picture in fig. 3A is located at the bottom layer and overlaps with the bottom layer, and the display effect of the interface after the floating one layer is set is shown in fig. 3B, and at this time, the picture covers the first line of characters. The display effect of the interface after the "floating one layer" is set on the basis of fig. 3B or the "floating two layers" is set on the basis of fig. 3A is shown in fig. 3C, and at this time, the first line of characters and the second line of characters are covered by the picture. And so on until the picture is positioned on the top layer, the display effect at the moment is as shown in fig. 3D, and the picture covers all four lines of characters overlapped with the picture. It can be seen that after the user sets the picture to float one layer, the picture will cover the front line of characters floating on the picture. It will be appreciated that if the user sets the picture to float up N layers (N is an integer not less than 1), the picture will obscure the top N lines of text that float on the picture.
As shown in fig. 4, when a user needs to move down a certain picture in a PDF page by one layer, the process flow may include:
step 401, when the electronic equipment displays a PDF document interface, a user operates on the PDF document interface and inputs a picture operation instruction, wherein the picture operation instruction represents that a selected picture is moved down by one layer;
in practical applications, the user may input the picture operation instruction in various manners, for example, select a picture and click a corresponding menu item preset in a menu bar of the PDF document to input the picture operation instruction, or select a picture, trigger a right-key menu through a right-click mouse, and click a menu item "move down one layer" in the right-key menu. In addition, the input of the picture operation instruction, such as a preset shortcut key, can be realized in other manners.
Step 402, the electronic device receives the above-mentioned picture operation instruction input by the user, detects the coordinate information of the position selected by the user and finds the picture to be processed based on the coordinate information, and obtains the coordinate information of the picture, and the attribute information of the picture, where the attribute information includes but is not limited to the coordinate of the picture in the PDF page display area, the width and height of the display, and other information;
step 403, finding a first list item corresponding to the picture in a drawing list of the current PDF page according to the information of the picture (for example, the coordinate information of the picture), and finding a second list item corresponding to the overlapping text line of the picture from the position of the first list item;
here, there may be one or more overlapping text lines of a picture, and there may be one or more corresponding second list items.
Step 404, judging whether the picture is currently positioned at the bottom layer, if so, ending the current flow, otherwise, continuing step 405;
specifically, whether the first list item is behind the previous list item of the second list item in the position of the drawing list is judged, if so, the picture is indicated to be currently positioned at the bottom layer, and if not, the picture is indicated to be not currently positioned at the bottom layer.
Step 405, removing a first list item from the drawing list of the current PDF page;
step 406, inserting the first list item at a position after a previous list item of the second list item in the drawing list of the current PDF page, so that the ordering of the first list item and the second list item in the drawing list of the current PDF page is updated by changing the relative positions of the first list item and the second list item;
step 407, updating the drawing list of the PDF page to the page data of the current PDF page, and loading the PDF page data into a memory to store the PDF page data;
and 408, drawing and displaying the PDF page by traversing the drawing list, and sequentially drawing and displaying the pictures and the overlapped characters according to the ordering of the first list item and the second list item in the drawing list when the PDF page is drawn.
After the user sets the picture down one layer, after the processing shown in fig. 4, the text of the text line that is originally covered by the picture (i.e., the overlapped text line of the picture) is displayed in the next line. It will be appreciated that if the user sets the picture down by M layers (M is an integer not less than 1), the M rows of text that were later in the text rows originally obscured by the picture (i.e., the overlapping text rows of the picture) will be displayed. The display effect of the move-down operation changes in reverse to the above-described processes of fig. 3A to 3D. Specifically, on the basis of fig. 3D, the fourth line of text is displayed on the picture (not shown) after one layer of the downward movement, on the basis of fig. 3D, the third line of text and the fourth line of text are displayed on the picture (shown in fig. 3C) after two layers of the downward movement, and on the basis of fig. 3D, the second line of text, the third line of text and the fourth line of text are displayed on the picture (shown in fig. 3B) after three layers of the downward movement. And so on, when the last picture is positioned at the bottommost layer, as shown in fig. 3A, all text lines overlapped with the picture are displayed on the picture.
It should be noted that fig. 2 to fig. 4 are all examples, and in practical applications, the present embodiment may be implemented in other manners.
In this embodiment, the hierarchical relationship between the designated picture and the overlapped text line in the PDF document can be changed according to the instruction input by the user, so that the layout relationship between the picture and the overlapped text line meets the user's requirements, thereby meeting the various requirements of the user on the layout of the picture in the PDF document. In the related art, only the top-or bottom-laying operation is supported for the picture, that is, either the picture completely hides the overlapped text lines, or all the overlapped text lines are displayed on the picture (i.e. hide the picture), which often cannot achieve the effect of floating up or down for a single line or several lines of text. In the related art, if a user has similar requirements (for example, floating up or moving down for a single line or several lines of text), the picture needs to be deleted and then added to the corresponding position, and when the position is not in accordance with the requirement when the picture is added, the operation of deleting and then adding for many times may be required, so that the operation is complex and complicated, and the misoperation probability is high. Therefore, the method of the embodiment not only perfects the editing function of the PDF document, but also can greatly simplify the user operation and greatly improve the user experience.
Example two
A picture layout apparatus of an electronic document, as shown in fig. 5, may include:
the obtaining module 51 is configured to obtain information of at least one picture according to a picture operation instruction for the picture in a current PDF page;
the searching module 52 is configured to search, according to the information of the picture, a first list item indicating the display order of the picture and a second list item indicating the display order of the overlapping text lines of the picture in a drawing list of the PDF page;
an adjustment module 53, configured to adjust the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction;
and the drawing module 54 is configured to draw the picture and the overlapped text line thereof according to the ordering of the first list item and the second list item in the drawing list when the PDF page is drawn, so that the picture and the overlapped text line thereof are displayed according to the hierarchical relationship indicated by the picture operation instruction.
In this embodiment, one list item of the drawing list corresponds to one picture or one text line of the PDF page, and the list item includes an index and a drawing number, where the index is used to associate the list item with information of a corresponding picture or text line, and the drawing number indicates a display order of the corresponding picture or text line. In this embodiment, the adjustment module 53 may be specifically configured to modify drawing numbers in the first list item and the second list item based on the picture operation instruction, and reset positions of the first list item and the second list item in the drawing list according to the drawing numbers.
In one implementation manner of this embodiment, the adjusting module 53 is configured to adjust the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction, and may include one or two of the following: 1) When the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1. 2) And when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1. Other embodiments may be included, and are not limited in this regard.
In practical applications, the picture layout device of the electronic document of the embodiment may be disposed in an electronic device or may be implemented as an electronic device. Each module in the picture layout device of the electronic document can be software, hardware or a combination of the two. Specifically, the obtaining module 51, the searching module 52, the adjusting module 53, and the drawing module 54 may be software, hardware, or a combination of both, respectively.
For further technical details of this embodiment, reference may be made to embodiment one.
Example III
An electronic device, as shown in fig. 6, comprising:
a display 61;
a memory 62 storing a computer program;
the processor 63 is configured to read the computer program to execute the picture layout method of the electronic document according to the first embodiment.
In practical application, fig. 6 is an infrastructure of the electronic device of the present embodiment. It will be appreciated that the electronic device may also include other components on top of this infrastructure. For example, the electronic device may further include: input and output components such as a mouse, a keyboard, a microphone, and the like. On this basis, other components can also be included, for example, the electronic device can also include: communication circuitry, and the like.
For further technical details of this embodiment, reference may be made to embodiment one.
Example IV
A computer storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the picture layout method of the electronic document of embodiment one.
In practical application, the computer storage medium of the present embodiment may be configured in the above electronic device, so as to implement the steps of the picture layout method of the electronic document in the first embodiment.
For further technical details of this embodiment, reference may be made to embodiment one.
Note that the computer storage media of the present embodiment can include both permanent and non-permanent, removable and non-removable storage media, and can be implemented in any method or technology for storage of information. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, read only optical disk read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
Although the embodiments of the present invention are described above, the embodiments are only used for facilitating understanding of the present invention, and are not intended to limit the present invention. Any person skilled in the art can make any modification and variation in form and detail without departing from the spirit and scope of the present disclosure, but the scope of the present disclosure is to be determined by the appended claims.

Claims (8)

1. A picture layout method of an electronic document, comprising:
acquiring information of at least one picture in a current PDF page according to a picture operation instruction of the picture;
according to the information of the picture, searching a first list item representing the display order of the picture and a second list item representing the display order of an overlapped text line overlapped with the picture in a drawing list of the PDF page; the ordering of the first list item and the second list item in the drawing list is adjusted based on the picture operation instruction; when the PDF page is drawn, drawing the picture and the overlapped text line thereof according to the sequence of the first list item and the second list item in the drawing list so that the picture and the overlapped text line thereof are displayed according to the hierarchical relation indicated by the picture operation instruction;
a list item of the drawing list corresponds to a picture or a text line of a PDF page, the list item comprises an index and a drawing number, the index is used for associating the list item with information of the corresponding picture or text line, and the drawing number represents the display order of the corresponding picture or text line;
the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction includes: modifying drawing numbers in the first list item and the second list item based on the picture operation instruction, and resetting positions of the first list item and the second list item in the drawing list according to the drawing numbers;
when the PDF page is drawn, drawing the picture and the overlapped text line thereof according to the ordering of the first list item and the second list item in the drawing list, wherein the drawing comprises the following steps:
traversing the drawing list of the PDF page, and drawing objects of the PDF page one by one according to the ordering of list items in the drawing list, wherein the objects at least comprise the pictures and the overlapped text lines thereof.
2. The method of claim 1, wherein the information of the picture comprises one of:
attribute information of the picture;
coordinate information of the picture.
3. The method of claim 1, wherein the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction comprises:
when the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1.
4. The method of claim 1, wherein the adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction comprises:
and when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1.
5. A picture layout apparatus of an electronic document, comprising:
the acquisition module is used for acquiring information of at least one picture according to a picture operation instruction aiming at the current PDF page;
the searching module is used for searching a first list item representing the display order of the picture and a second list item representing the display order of the overlapped text lines overlapped with the picture in a drawing list of the PDF page according to the information of the picture;
the adjusting module is used for adjusting the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction;
the drawing module is used for drawing the pictures and the overlapped text lines according to the ordering of the first list item and the second list item in the drawing list when the PDF page is drawn, so that the pictures and the overlapped text lines are displayed according to the hierarchical relation indicated by the picture operation instruction;
one list item of the drawing list corresponds to one picture or one text line of a PDF page, the list item comprises an index and a drawing number, the index is used for associating the list item with information of the corresponding picture or text line, and the drawing number represents the display order of the corresponding picture or text line;
the adjusting module is specifically configured to modify drawing numbers in the first list item and the second list item based on the picture operation instruction, and reset positions of the first list item and the second list item in the drawing list according to the drawing numbers;
the drawing module is specifically configured to traverse a drawing list of the PDF page, and draw objects of the PDF page one by one according to a ranking of list items in the drawing list, where the objects include at least the picture and overlapping text lines thereof.
6. The picture layout device according to claim 5, wherein,
the adjusting module is configured to adjust the ordering of the first list item and the second list item in the drawing list based on the picture operation instruction, and includes one of the following:
when the picture operation instruction is an upward floating N layer, after the first list item is moved to the last N-1 list items of the second list item, N is an integer not less than 1;
and when the picture operation instruction is to move down M layers, moving the first list item to the first M list items of the second list item, wherein M is an integer not smaller than 1.
7. An electronic device, comprising:
a display;
a memory storing a computer program;
a processor configured to read the computer program to perform the picture layout method of an electronic document as claimed in any one of claims 1 to 4.
8. A computer storage medium, characterized in that the computer storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the picture layout method of an electronic document according to any of claims 1 to 4.
CN201810078101.9A 2018-01-26 2018-01-26 Picture layout method and device of electronic document and electronic equipment Active CN110083812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810078101.9A CN110083812B (en) 2018-01-26 2018-01-26 Picture layout method and device of electronic document and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810078101.9A CN110083812B (en) 2018-01-26 2018-01-26 Picture layout method and device of electronic document and electronic equipment

Publications (2)

Publication Number Publication Date
CN110083812A CN110083812A (en) 2019-08-02
CN110083812B true CN110083812B (en) 2023-06-06

Family

ID=67412637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810078101.9A Active CN110083812B (en) 2018-01-26 2018-01-26 Picture layout method and device of electronic document and electronic equipment

Country Status (1)

Country Link
CN (1) CN110083812B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784190B (en) * 2019-11-11 2024-02-06 腾讯科技(深圳)有限公司 Control method, device, storage medium and equipment for showing form in page

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714047A (en) * 2013-11-12 2014-04-09 知识产权出版社 Lateral proofreading and double-layer PDF file outputting method and device
CN105825535A (en) * 2016-03-18 2016-08-03 广东欧珀移动通信有限公司 Layer merging method and layer merging system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103714047A (en) * 2013-11-12 2014-04-09 知识产权出版社 Lateral proofreading and double-layer PDF file outputting method and device
CN105825535A (en) * 2016-03-18 2016-08-03 广东欧珀移动通信有限公司 Layer merging method and layer merging system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Method of Text Segmentation from Scanned Image with Complex Background;Xianglin Huang et al.;《2009 International Conference on Management and Service Science》;20090920;第1-4页 *
巧用word制作贺卡丰富教学内容;黄立新;《读与写(教育教学刊)》;20070131;第4卷(第1期);第123-124页 *

Also Published As

Publication number Publication date
CN110083812A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
RU2583727C2 (en) Dynamic image presentation
EP3074888B1 (en) Contextual information lookup and navigation
US20160092428A1 (en) Dynamic Presentation of Suggested Content
US20140047385A1 (en) 3D Data Environment Disambiguation Tool
US20160092419A1 (en) Structured Sample Authoring Content
US20150268838A1 (en) Methods, systems, electronic devices, and non-transitory computer readable storage medium media for behavior based user interface layout display (build)
US20160092404A1 (en) Intent Based Feedback
US20120144292A1 (en) Providing summary view of documents
US10788980B2 (en) Apparatus and method for displaying application
US9292189B2 (en) Techniques to display location-based information
US10839148B2 (en) Coordination of storyline content composed in multiple productivity applications
US20120221969A1 (en) Scrollable list navigation using persistent headings
US20140071170A1 (en) Non-uniformly scaling a map for emphasizing areas of interest
EP2381347B1 (en) Method for displaying an object having a predetermined information content on a touch screen
EP2874054A1 (en) Application text adjusting method, device, and terminal
CN105740454A (en) Display method and device of picture folder and electronic equipment
US20160062601A1 (en) Electronic device with touch screen and method for moving application functional interface
CN110083812B (en) Picture layout method and device of electronic document and electronic equipment
CN104808995B (en) A kind of method and apparatus for across application collection application content
US20150293686A1 (en) Apparatus and method for controlling home screen
US20150261736A1 (en) Enhanced Indicators for Identifying Affected Data
US20140181712A1 (en) Adaptation of the display of items on a display
JP2016181042A (en) Search apparatus, search method, and program
BG66703B1 (en) Method of visualization, grouping, sorting and management of objects via implementation of movement, graphically representing the stage of compliance of objects according to defined criteria on the display device
CN110058751B (en) Method and device for selecting electronic document content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant