CN112036123B - PDF generation method, device, equipment and storage medium based on webpage - Google Patents

PDF generation method, device, equipment and storage medium based on webpage Download PDF

Info

Publication number
CN112036123B
CN112036123B CN202010900698.8A CN202010900698A CN112036123B CN 112036123 B CN112036123 B CN 112036123B CN 202010900698 A CN202010900698 A CN 202010900698A CN 112036123 B CN112036123 B CN 112036123B
Authority
CN
China
Prior art keywords
page
height
elements
processed
compared
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
CN202010900698.8A
Other languages
Chinese (zh)
Other versions
CN112036123A (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.)
360 Digital Security Technology Group Co Ltd
Original Assignee
360 Digital Security Technology Group Co Ltd
Filing date
Publication date
Application filed by 360 Digital Security Technology Group Co Ltd filed Critical 360 Digital Security Technology Group Co Ltd
Priority to CN202010900698.8A priority Critical patent/CN112036123B/en
Publication of CN112036123A publication Critical patent/CN112036123A/en
Application granted granted Critical
Publication of CN112036123B publication Critical patent/CN112036123B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of computers, and discloses a PDF (portable document format) generation method, device and equipment based on web pages and a storage medium, wherein the method comprises the following steps: the method comprises the steps of determining the heights of a webpage to be processed and a PDF file according to a PDF generation instruction, determining page elements in the webpage to be processed and the heights of corresponding elements, further determining a screenshot area to obtain a picture to be processed, and generating a PDF file according to the picture to be processed, so that the document specification of the PDF file required by a user can be determined according to the PDF generation instruction, reasonable paging is carried out according to the screenshot area, and the quality of the PDF file generated according to the webpage is improved.

Description

PDF generation method, device, equipment and storage medium based on webpage
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a PDF based on a web page.
Background
At present, a webpage is exported as a PDF document, the most common method is to print directly on a browser and save the webpage as a PDF file, but for many small white users, the method is not known, and the situation that the exported webpage is deformed and distorted sometimes occurs by the method, the document specification of the generated PDF file is fixed, and reasonable paging cannot be performed when paging is needed, so that the quality of the generated PDF file is poor.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a PDF generation method, device, equipment and storage medium based on web pages, and aims to solve the technical problem that PDF files generated based on web pages in the prior art are poor in quality.
In order to achieve the above object, the present invention provides a web page-based PDF generation method, which includes the following steps:
When a PDF generation instruction is received, determining the heights of a webpage to be processed and a PDF file page according to the PDF generation instruction;
Acquiring page information of the webpage to be processed;
Determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information;
Determining a screenshot area according to the page height of the PDF file, the page element and the element height;
and obtaining a picture to be processed according to the screenshot area, and generating a PDF file according to the picture to be processed.
Optionally, the determining a screenshot area according to the PDF file page height, the page element and the element height includes:
traversing the page elements, and taking the traversed page elements as page elements to be processed;
Taking the element height corresponding to the page element to be processed as the element height to be processed;
and determining a screenshot area according to the page height of the PDF file, the page element to be processed and the element height to be processed.
Optionally, the determining the screenshot area according to the PDF file page height, the to-be-processed page element and the to-be-processed element height includes:
Sorting the page elements to be processed to obtain element sorting results;
Progressively adding the heights of the elements to be processed according to the element sequencing result to obtain the total heights of the elements;
comparing the total height of the elements with the page height of the PDF file to determine critical elements;
and determining a screenshot area according to the critical element.
Optionally, the comparing the total height of the element with the page height of the PDF file to determine a critical element includes:
Comparing the total height of the elements with the page height of the PDF file;
And when the total height of the elements is larger than the page height of the PDF file, selecting critical elements from the elements to be processed.
Optionally, the determining a screenshot area according to the critical element includes:
Selecting elements to be compared which are arranged before the critical elements from the elements to be processed according to the element sorting result;
Searching the height of the element to be compared corresponding to the element to be compared, and calculating the height to be compared according to the height of the element to be compared;
and determining a screenshot area according to the height to be compared, the critical element and the element to be compared.
Optionally, the determining a screenshot area according to the height to be compared, the critical element and the element to be compared includes:
calculating a height difference value according to the page height of the PDF file and the height to be compared, and judging whether the critical element has a subelement or not;
When the critical element has sub-elements, acquiring the heights of the sub-elements corresponding to the sub-elements;
And determining a screenshot area according to the sub-element, the height of the sub-element, the height difference value and the element to be compared.
Optionally, after the determining whether the critical element has a child element, the method further includes:
when the critical element does not have sub-elements, acquiring an element region to be compared corresponding to the element to be compared;
And determining a screenshot area according to the element area to be compared.
Optionally, the determining a screenshot area according to the sub-element, the sub-element height, the height difference value and the element to be compared includes:
Sequencing the sub-elements to obtain a sub-element sequencing result;
determining a critical subelement according to the subelement sequencing result, the subelement height and the height difference value;
and determining a screenshot area according to the critical subelement and the element to be compared.
Optionally, the determining a screenshot area according to the critical subelement and the element to be compared includes:
judging whether Sun Yuansu exists in the critical subelement or not;
acquiring a Sun Yuansu height corresponding to the Sun Yuansu when the critical subelement exists Sun Yuansu;
selecting the subelements to be compared which are arranged before the critical subelements from the subelements according to the subelements sequencing result;
and determining a screenshot area according to the Sun Yuansu, the Sun Yuansu height and the subelements to be compared.
Optionally, after the determining whether the critical subelement exists Sun Yuansu, the method further includes:
Acquiring a sub-element region to be compared corresponding to the sub-element to be compared when Sun Yuansu is not present in the critical sub-element;
and determining a screenshot area according to the element area to be compared and the sub-element area to be compared.
Optionally, before traversing the page element and taking the traversed page element as the page element to be processed, the method further includes:
determining an element selection strategy according to the PDF generation instruction;
correspondingly, the traversing the page element, taking the traversed page element as the page element to be processed, includes:
determining a target page element according to the element selection strategy and the page element;
traversing the target page element, and taking the traversed target page element as a page element to be processed.
Optionally, the determining the target page element according to the element selection policy and the page element includes:
determining target element information according to the element selection strategy;
And selecting a target page element from the page elements according to the target element information.
Optionally, the obtaining the to-be-processed picture according to the screenshot area, and generating the PDF file according to the to-be-processed picture, includes:
Performing screenshot processing on the webpage to be processed according to the screenshot area to obtain a picture to be processed;
Sequencing the pictures to be processed to obtain a picture sequencing result;
and carrying out format conversion on the pictures to be processed according to the picture sorting result so as to generate a PDF file.
In addition, in order to achieve the above object, the present invention also provides a PDF generating device based on a web page, where the PDF generating device based on a web page includes:
the instruction receiving module is used for determining the heights of the webpage to be processed and the PDF file page according to the PDF generation instruction when the PDF generation instruction is received;
The information acquisition module is used for acquiring page information of the webpage to be processed;
The element determining module is used for determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information;
the screenshot area module is used for determining a screenshot area according to the page height of the PDF file, the page elements and the element heights;
and the file generation module is used for obtaining a picture to be processed according to the screenshot area and generating a PDF file according to the picture to be processed.
Optionally, the screenshot area module is further configured to traverse the page element, and take the traversed page element as a page element to be processed; taking the element height corresponding to the page element to be processed as the element height to be processed; and determining a screenshot area according to the page height of the PDF file, the page element to be processed and the element height to be processed.
Optionally, the screenshot area module is further configured to sort the page elements to be processed to obtain an element sorting result; progressively adding the heights of the elements to be processed according to the element sequencing result to obtain the total heights of the elements; comparing the total height of the elements with the page height of the PDF file to determine critical elements; and determining a screenshot area according to the critical element.
Optionally, the screenshot area module is further configured to compare the total height of the element with the height of the PDF file page; and when the total height of the elements is larger than the page height of the PDF file, selecting critical elements from the elements to be processed.
Optionally, the screenshot area module is further configured to select an element to be compared, which is ranked before the critical element, from the elements to be processed according to the element ranking result; searching the height of the element to be compared corresponding to the element to be compared, and calculating the height to be compared according to the height of the element to be compared; and determining a screenshot area according to the height to be compared, the critical element and the element to be compared.
In addition, in order to achieve the above object, the present invention also proposes a web page-based PDF generating apparatus, including: the system comprises a memory, a processor and a web page-based PDF generation program which is stored in the memory and can run on the processor, wherein the web page-based PDF generation program is configured with steps for realizing the web page-based PDF generation method.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon a web page-based PDF generation program which, when executed by a processor, implements the steps of the web page-based PDF generation method described above.
According to the PDF generation method based on the webpage, when a PDF generation instruction is received, the heights of the webpage to be processed and the PDF file page are determined according to the PDF generation instruction; acquiring page information of the webpage to be processed; determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information; determining a screenshot area according to the page height of the PDF file, the page element and the element height; and obtaining a picture to be processed according to the screenshot area, and generating a PDF file according to the picture to be processed. The method comprises the steps of determining the heights of a webpage to be processed and a PDF file according to a PDF generation instruction, determining page elements in the webpage to be processed and the heights of corresponding elements, further determining a screenshot area to obtain a picture to be processed, and generating a PDF file according to the picture to be processed, so that the document specification of the PDF file required by a user can be determined according to the PDF generation instruction, reasonable paging is carried out according to the screenshot area, and the quality of the PDF file generated according to the webpage is improved.
Drawings
FIG. 1 is a schematic diagram of a PDF generating device based on web pages in a hardware running environment according to an embodiment of the present invention;
fig. 2 is a flowchart of a first embodiment of a PDF generating method based on a web page according to the present invention;
FIG. 3 is a flowchart of a second embodiment of a PDF generation method based on web pages according to the present invention;
FIG. 4 is a first interface diagram of an embodiment of a method for generating PDF based on a web page according to the present invention;
FIG. 5 is a second interface diagram of an embodiment of a PDF generation method based on a web page according to the present invention;
FIG. 6 is a diagram illustrating a third interface according to an embodiment of the method for generating PDF based on a web page of the present invention;
FIG. 7 is a diagram illustrating a fourth interface according to an embodiment of the method for generating PDF based on a web page of the present invention;
FIG. 8 is a diagram illustrating a fifth interface according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a sixth interface according to an embodiment of the present invention;
fig. 10 is a flowchart of a third embodiment of a PDF generating method based on a web page according to the present invention;
Fig. 11 is a schematic functional block diagram of a PDF generating device based on a web page according to a first embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a PDF generating device based on web pages in a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the web page-based PDF generation apparatus may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as keys, and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 does not constitute a limitation of the web page based PDF generation device, and may include more or fewer components than illustrated, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a PDF generation program based on web pages may be included in the memory 1005 as one type of storage medium.
In the PDF generating device based on the web page shown in fig. 1, the network interface 1004 is mainly used for connecting to an external network and performing data communication with other network devices; the user interface 1003 is mainly used for connecting user equipment and communicating data with the user equipment; the apparatus of the present invention calls the PDF generation program based on the web page stored in the memory 1005 through the processor 1001, and executes the PDF generation method based on the web page provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the PDF generation method based on the webpage is provided.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of a PDF generating method based on web pages according to the present invention.
In a first embodiment, the web page-based PDF generation method includes the steps of:
and step S10, when a PDF generation instruction is received, determining the heights of the webpage to be processed and the PDF file page according to the PDF generation instruction.
It should be noted that, the execution body of the embodiment may be a PDF generating device based on a web page, or may be other devices capable of implementing the same or similar functions, which is not limited in this embodiment, and in this embodiment, the PDF generating device based on a web page is described by taking the PDF generating device based on a web page as an example, where the PDF generating device based on a web page may be a computer device, and this embodiment is not limited in this embodiment.
It should be understood that the web page to be processed is a page to be processed, a PDF file is generated according to the web page to be processed, and the page height of the PDF file is the page height of the generated PDF file. Documents of different specifications have different page heights, for example, a document of A4 specification corresponds to a page height of A4, a document of A5 specification corresponds to a page height of A5, and the page heights corresponding to the horizontal A4 and the vertical A4 are also different. Therefore, the height of the PDF file page may be determined according to the PDF generation instruction to determine the document specification of the PDF file, where the document specification may be a document specification (width×height) defined by the user in addition to the predetermined specifications of A4, A5, and the like, which is not limited in this embodiment.
It should be understood that the user may open a plurality of web pages at the same time, and one of the web pages may be selected as the web page to be processed through the PDF generation instruction, for example, the currently displayed web page may be taken as the web page to be processed. The uniform resource locator system (URL, uniform resource locator) of the web page may also be determined by the PDF generation instruction, and the specified web page is used as the web page to be processed according to the URL, which is not limited in this embodiment.
In the embodiment, the designated web page can be exported to be a PDF document, and the page height of the PDF file is determined according to the PDF generation instruction input by the user, so that the generated PDF file is more diversified, and the customization requirement of the user is met.
Step S20, obtaining page information of the webpage to be processed.
It should be understood that each page has its corresponding page information, which may include information such as a page element and an element height corresponding to the page element, and may also include other information, which is not limited in this embodiment. After the webpage to be processed is determined, the webpage information of the webpage to be processed can be further acquired.
And step S30, determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information.
It should be understood that the page elements in this embodiment may be text, pictures, etc. elements in the web page, and may also be other elements, which is not limited in this implementation. The element height corresponding to the page element refers to the height value of the page element, for example, when the page element is a picture, the height of the picture is the element height corresponding to the page element.
It should be understood that another expression manner of the page element in this embodiment may be a DOM node, where the page element in this embodiment may be equivalent to the page DOM node, and according to the HTML DOM standard, all contents in the HTML document are nodes, and the HTML DOM regards the HTML document as a tree structure, where this structure is called a node tree, so each node may have its corresponding child node, and each child node may also have its corresponding grandchild node, and in this embodiment, the expression is performed with child elements, sun Yuansu, where the child elements correspond to child nodes, and Sun Yuansu correspond to grandchild nodes.
And S40, determining a screenshot area according to the page height of the PDF file, the page element and the element height.
It can be understood that the screenshot area can be determined according to the page height, the page element and the element height of the PDF file, and the screenshot is performed according to the screenshot area to obtain the picture to be processed. According to the scheme in the implementation, whether paging is needed or not can be judged according to the page height, the page elements and the element height of the PDF file, and the screenshot area is determined according to the actual situation.
And S50, obtaining a picture to be processed according to the screenshot area, and generating a PDF file according to the picture to be processed.
It should be appreciated that after the screenshot area is determined, the html2canvas plug-in may be used to perform the screenshot and then jsPDF may be used to generate the PDF file.
In the embodiment, the page heights of the webpage to be processed and the PDF file are determined according to the PDF generation instruction, page elements in the webpage to be processed and corresponding element heights are determined, a screenshot area is further determined to obtain a picture to be processed, and a PDF file is generated according to the picture to be processed, so that the document specification of the PDF file required by a user can be determined according to the PDF generation instruction, reasonable paging is performed according to the screenshot area, and the quality of the PDF file generated according to the webpage is improved.
In an embodiment, as shown in fig. 3, a second embodiment of the web page-based PDF generating method according to the present invention is provided based on the first embodiment, and the step S40 includes:
step S401, traversing the page element, and taking the traversed page element as a page element to be processed.
In a specific implementation, for example, when there are 5 page elements in the web page to be processed, namely page elements 1,2, 3, 4 and 5, the page elements may be traversed, and the traversed 5 page elements are used as the page elements to be processed, and at this time, all the page elements in the web page to be processed are converted into the PDF file by default.
Further, in a specific use, the user may not want to export all page elements in the web page, only want to export only part of the page elements, and in order to export only the selected specified page elements to be combined into the PDF file, before step S401, the method further includes:
determining an element selection strategy according to the PDF generation instruction;
It should be understood that when the user inputs the PDF generation instruction, an element selection policy may be further added to the PDF generation instruction, and the page element that the user wants to export may be determined according to the element selection policy. For example, when the element selection policy is to export page elements 1-3, then generating a PDF file according to page elements 1-3; when the element selection policy is to export page elements 1,3, 5, then a PDF file is generated from page elements 1,3, 5. In this embodiment, the to-be-processed picture is obtained in a screenshot manner, and then the PDF file is generated according to the to-be-processed picture, so that the page elements can be flexibly selected according to the user requirements.
Accordingly, the step S401 includes:
determining target element information according to the element selection strategy; selecting a target page element from the page elements according to the target element information; traversing the target page element, and taking the traversed target page element as a page element to be processed.
It should be appreciated that the target element information may be determined according to an element selection policy, and the target page element may be selected from the page elements according to the target element information, for example, when the element selection policy is to derive the page elements 1, 3, 5, the target page element may be determined to be the page elements 1, 3, 5. After determining the target page element, traversing the target page element, and taking the traversed target page element as the page element to be processed.
Step S402, taking the element height corresponding to the page element to be processed as the element height to be processed.
It is understood that, after determining the page element to be processed, the element height corresponding to the page element to be processed may be used as the element height to be processed.
Step S403, determining a screenshot area according to the PDF file page height, the page element to be processed, and the element height to be processed.
It should be understood that, whether paging is required or not may be determined according to the page height of the PDF file, the page element to be processed, and the element height to be processed, so as to determine the screenshot area.
Further, in order to accurately determine whether paging is required, and perform reasonable paging when paging is required, the step S403 includes:
sorting the page elements to be processed to obtain element sorting results; progressively adding the heights of the elements to be processed according to the element sequencing result to obtain the total heights of the elements; comparing the total height of the elements with the page height of the PDF file to determine critical elements; and determining a screenshot area according to the critical element.
It should be understood that the page elements to be processed may be ordered to obtain element ordering results, and in this embodiment, the ordering is illustrated in the order from top to bottom. Then, the element height to be processed is added according to the element sequencing result to obtain the total element height, the total element height is compared with the page height of the PDF file, whether paging is needed or not is judged according to the comparison result, and when paging is not needed, a screenshot area is determined according to the element of the page to be processed; when paging is needed, selecting a critical element from elements to be processed, and determining a screenshot area according to the critical element.
In a specific implementation, for example, as shown in fig. 4, fig. 4 is a first page schematic diagram, the page height of the PDF file may be represented by PAGEHEIGHT, and the element heights of the page elements are represented by h1, h2, h3, h4, and h5, where htotal=h1+h2+h3+h4+h5, and the total element height is known by comparing the element height with the PDF file page height, where htotal is less than PAGEHEIGHT, so that paging is not required, and only one page is required, so that the page elements 1-5 may be used as a screenshot area to perform screenshot, obtain a picture to be processed, and then generate the PDF file.
In a specific implementation, for example, as shown in fig. 5, fig. 5 is a second page schematic diagram, where halways > PAGEHEIGHT, so paging is required, and it is known that the critical element is page element 5, and the processing needs to be performed on page element 5 to determine the screenshot area.
Further, in order to make paging more reasonable and finer when paging is required, the determining the screenshot area according to the critical element includes:
selecting elements to be compared which are arranged before the critical elements from the elements to be processed according to the element sorting result; searching the height of the element to be compared corresponding to the element to be compared, and calculating the height to be compared according to the height of the element to be compared; calculating a height difference value according to the page height of the PDF file and the height to be compared, and judging whether the critical element has a subelement or not; when the critical element has sub-elements, acquiring the heights of the sub-elements corresponding to the sub-elements; and determining a screenshot area according to the sub-element, the height of the sub-element, the height difference value and the element to be compared.
It should be understood that the element to be compared arranged before the critical element can be selected from the elements to be processed according to the element sorting result, then the height to be compared is calculated according to the height of the element to be compared corresponding to the element to be compared, and the height difference is calculated according to the page height of the PDF file and the height to be compared.
In a specific implementation, for example, the critical element is page element 5, and page elements 1-4 are arranged before page element 5, so that page elements 1-4 are used as elements to be compared, h1, h2, h3 and h4 are used as heights of elements to be compared, the heights to be compared can be obtained by adding h1, h2, h3 and h4, and then a height difference= PAGEHEIGHT- (h1+h2+h3+h4) can be calculated.
It can be understood that the page element may further include a sub-element, and the sub-element may further include Sun Yuansu, so that it may be determined whether the critical element has a sub-element, and when the critical element has a sub-element, the sub-element height corresponding to the sub-element is obtained, and then the screenshot area is determined according to the sub-element, the sub-element height, the height difference value, and the element to be compared.
After the judging whether the critical element has the sub-element, the method further comprises:
when the critical element does not have sub-elements, acquiring an element region to be compared corresponding to the element to be compared; and determining a screenshot area according to the element area to be compared.
It should be understood that when the critical element does not have the sub-element, the element region to be compared corresponding to the element to be compared is obtained, the element region to be compared is subjected to screenshot, the screenshot is placed on the first page of the file, and other page elements are placed on the back page from the critical element.
In a specific implementation, as shown in fig. 6, fig. 6 is a third page schematic. At this time, the critical element is page element 5, and no sub-elements exist in page element 5, so page elements 1-4 are placed on the first page, and page element 5 is placed on the second page.
Further, the determining a screenshot area according to the sub-element, the sub-element height, the height difference value and the element to be compared includes:
Sequencing the sub-elements to obtain a sub-element sequencing result; determining a critical subelement according to the subelement sequencing result, the subelement height and the height difference value; and determining a screenshot area according to the critical subelement and the element to be compared.
It should be appreciated that the sub-elements may be ordered to obtain a sub-element ordering result, and the critical sub-elements may be determined based on the sub-element ordering result, the sub-element heights, and the height differences. For example, as shown in fig. 7, fig. 7 is a schematic diagram of a fourth page, in which the page element 5 includes two sub-elements, namely, sub-element 51 and sub-element 52, whose corresponding sub-element heights are h51 and h52, respectively, and h51 is smaller than the height difference, and h51 plus h52 is larger than the height difference, so that the sub-element 52 can be determined to be a critical sub-element.
Further, the determining a screenshot area according to the critical subelement and the element to be compared includes:
Judging whether Sun Yuansu exists in the critical subelement or not; acquiring a sub-element region to be compared corresponding to the sub-element to be compared when Sun Yuansu is not present in the critical sub-element; and determining a screenshot area according to the element area to be compared and the sub-element area to be compared. Acquiring a Sun Yuansu height corresponding to the Sun Yuansu when the critical subelement exists Sun Yuansu; selecting the subelements to be compared which are arranged before the critical subelements from the subelements according to the subelements sequencing result; and determining a screenshot area according to the Sun Yuansu, the Sun Yuansu height and the subelements to be compared.
It should be appreciated that it may be further determined whether Sun Yuansu is present in the critical subelement, and when Sun Yuansu is not present in the critical subelement, fig. 8 is a fifth page schematic, and subelement 52 is a critical subelement and Sun Yuansu is not present, so page elements 1-4 and subelements may be placed on a first page, subelement 52 may be placed on a second page, and the corresponding screenshot region may be determined.
It will be appreciated that when the critical subelements exist Sun Yuansu, the Sun Yuansu height corresponding to Sun Yuansu may be obtained, and subelements to be compared arranged between the critical subelements are selected from the subelements according to the subelements sorting result, so as to determine the critical Sun Yuansu.
In a specific implementation, as shown in fig. 9, fig. 9 is a schematic diagram of a sixth page, it is known that the sub-element to be compared is the sub-element 51, the sub-element 52 includes two Sun Yuansu, sun Yuansu 521 and Sun Yuansu 522 respectively, their corresponding Sun Yuansu heights are h521 and h522 respectively, and further, the critical Sun Yuansu is Sun Yuansu 522, so that it can be further determined whether the Sun Yuansu 522 has the element of the next level, when Sun Yuansu 522 does not have the element of the next level, the page element 1-4, the sub-elements 51 and Sun Yuansu 521 can be placed on the first page, and Sun Yuansu 522 is placed on the second page. When Sun Yuansu has the next level element, the above steps are repeated until there is no next level element.
In this embodiment, through the above scheme, when paging is required, a critical element is automatically determined from page elements to be processed, and the critical element is further detected to identify its child element and Sun Yuansu, so that a screenshot area is determined according to the conditions of its child element and grandchild element, and further, it is determined which elements are to be placed on the first page and which are to be placed on the back page, which not only avoids distortion caused by too many page elements of the same page, but also can ensure that the situation that the elements are not fully displayed due to cutting elements during paging does not occur.
In an embodiment, as shown in fig. 9, a third embodiment of the web page-based PDF generating method according to the present invention is provided based on the first embodiment or the second embodiment, and in this embodiment, the description is given based on the first embodiment, and the step S50 includes:
step S501, performing screenshot processing on the web page to be processed according to the screenshot area to obtain a picture to be processed.
It should be understood that in this embodiment, the html2canvas plug-in may be used to perform screenshot processing to obtain a to-be-processed picture.
Step S502, sorting the pictures to be processed to obtain a picture sorting result.
It should be understood that since the screenshot is performed according to the screenshot area, when there are a plurality of screenshot areas, a plurality of pictures to be processed can be obtained. The pictures to be processed can be ordered to obtain a picture ordering result.
Step S503, performing format conversion on the to-be-processed picture according to the picture sorting result, so as to generate a PDF file.
It should be appreciated that the picture to be processed may be format converted using jsPDF plug-ins to generate a PDF file based on the picture ordering result. In the prior art, html-to-PDF programs, such as wkhtmltopdf, iText, need to be matched by a server, which consumes time and resources, and cannot be used offline. The PDF file generating manner in this embodiment may be used offline, so as to solve the offline requirement of converting the web page into PDF.
In a specific implementation, as shown in fig. 4, in this case of fig. 4, the page elements 1-5 may be used as screenshot areas to obtain a to-be-processed picture, and the to-be-processed picture is placed on the first page of the PDF file.
As shown in fig. 6, in this case of fig. 6, the page elements 1 to 4 may be used as the first screenshot area, the page element 5 may be used as the second screenshot area to obtain a first to-be-processed picture and a second to-be-processed picture, the first to-be-processed picture may be placed on the first page of the PDF file, and the second to-be-processed picture may be placed on the second page of the PDF file.
As shown in fig. 8, in this case of fig. 8, the page elements 1 to 4, the sub-element 51, and the sub-element 52 may be used as a first screenshot area and a second screenshot area, so as to obtain a first to-be-processed picture and a second to-be-processed picture, where the first to-be-processed picture is placed on a first page of the PDF file, and the second to-be-processed picture is placed on a second page of the PDF file.
As shown in fig. 9, in this case of fig. 9, the page elements 1 to 4, the sub-elements 51, sun Yuansu, 521 may be used as a first screenshot area, sun Yuansu 522 may be used as a second screenshot area to obtain a first to-be-processed picture and a second to-be-processed picture, the first to-be-processed picture may be placed on a first page of a PDF file, and the second to-be-processed picture may be placed on a second page of the PDF file.
According to the scheme, the to-be-processed pictures can be obtained according to the screenshot area, and the PDF file is generated according to the arrangement sequence of the to-be-processed pictures, so that the generated PDF file cannot generate deformation torque, and the document quality of the PDF file is improved.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores a PDF generating program based on the webpage, and the PDF generating program based on the webpage realizes the steps of the PDF generating method based on the webpage when being executed by a processor.
Because the storage medium adopts all the technical schemes of all the embodiments, the storage medium has at least all the beneficial effects brought by the technical schemes of the embodiments, and the description is omitted here.
In addition, referring to fig. 10, an embodiment of the present invention further provides a PDF generating device based on a web page, where the PDF generating device based on a web page includes:
The instruction receiving module 10 is configured to determine, when receiving a PDF generation instruction, a height of a web page to be processed and a height of a PDF file page according to the PDF generation instruction.
It should be understood that the web page to be processed is a page to be processed, a PDF file is generated according to the web page to be processed, and the page height of the PDF file is the page height of the generated PDF file. Documents of different specifications have different page heights, for example, a document of A4 specification corresponds to a page height of A4, a document of A5 specification corresponds to a page height of A5, and the page heights corresponding to the horizontal A4 and the vertical A4 are also different. Therefore, the height of the PDF file page may be determined according to the PDF generation instruction to determine the document specification of the PDF file, where the document specification may be a document specification (width×height) defined by the user in addition to the predetermined specifications of A4, A5, and the like, which is not limited in this embodiment.
It should be understood that the user may open a plurality of web pages at the same time, and one of the web pages may be selected as the web page to be processed through the PDF generation instruction, for example, the currently displayed web page may be taken as the web page to be processed. The uniform resource locator system (URL, uniform resource locator) of the web page may also be determined by the PDF generation instruction, and the specified web page is used as the web page to be processed according to the URL, which is not limited in this embodiment.
In the embodiment, the designated web page can be exported to be a PDF document, and the page height of the PDF file is determined according to the PDF generation instruction input by the user, so that the generated PDF file is more diversified, and the customization requirement of the user is met.
And the information acquisition module 20 is used for acquiring the page information of the webpage to be processed.
It should be understood that each page has its corresponding page information, which may include information such as a page element and an element height corresponding to the page element, and may also include other information, which is not limited in this embodiment. After the webpage to be processed is determined, the webpage information of the webpage to be processed can be further acquired.
And the element determining module 30 is configured to determine a page element in the web page to be processed and an element height corresponding to the page element according to the page information.
It should be understood that the page elements in this embodiment may be text, pictures, etc. elements in the web page, and may also be other elements, which is not limited in this implementation. The element height corresponding to the page element refers to the height value of the page element, for example, when the page element is a picture, the height of the picture is the element height corresponding to the page element.
It should be understood that another expression manner of the page element in this embodiment may be a DOM node, where the page element in this embodiment may be equivalent to the page DOM node, and according to the HTML DOM standard, all contents in the HTML document are nodes, and the HTML DOM regards the HTML document as a tree structure, where this structure is called a node tree, so each node may have its corresponding child node, and each child node may also have its corresponding grandchild node, and in this embodiment, the expression is performed with child elements, sun Yuansu, where the child elements correspond to child nodes, and Sun Yuansu correspond to grandchild nodes.
And the screenshot area module 40 is configured to determine a screenshot area according to the page height of the PDF file, the page element and the element height.
It can be understood that the screenshot area can be determined according to the page height, the page element and the element height of the PDF file, and the screenshot is performed according to the screenshot area to obtain the picture to be processed. According to the scheme in the implementation, whether paging is needed or not can be judged according to the page height, the page elements and the element height of the PDF file, and the screenshot area is determined according to the actual situation.
The file generating module 50 is configured to obtain a to-be-processed picture according to the screenshot area, and generate a PDF file according to the to-be-processed picture.
It should be appreciated that after the screenshot area is determined, the html2canvas plug-in may be used to perform the screenshot and then jsPDF may be used to generate the PDF file.
In the embodiment, the page heights of the webpage to be processed and the PDF file are determined according to the PDF generation instruction, page elements in the webpage to be processed and corresponding element heights are determined, a screenshot area is further determined to obtain a picture to be processed, and a PDF file is generated according to the picture to be processed, so that the document specification of the PDF file required by a user can be determined according to the PDF generation instruction, reasonable paging is performed according to the screenshot area, and the quality of the PDF file generated according to the webpage is improved.
In an embodiment, the screenshot area module 40 is further configured to calculate a height difference value according to the page height of the PDF file and the height to be compared, and determine whether the critical element has a subelement; when the critical element has sub-elements, acquiring the heights of the sub-elements corresponding to the sub-elements; and determining a screenshot area according to the sub-element, the height of the sub-element, the height difference value and the element to be compared.
In an embodiment, the screenshot area module 40 is further configured to obtain an element area to be compared corresponding to the element to be compared when the critical element does not have a subelement; and determining a screenshot area according to the element area to be compared.
In an embodiment, the screenshot area module 40 is further configured to sort the subelements to obtain a subelement sorting result; determining a critical subelement according to the subelement sequencing result, the subelement height and the height difference value; and determining a screenshot area according to the critical subelement and the element to be compared.
In an embodiment, the screenshot area module 40 is further configured to determine whether the critical subelement exists Sun Yuansu; acquiring a Sun Yuansu height corresponding to the Sun Yuansu when the critical subelement exists Sun Yuansu; selecting the subelements to be compared which are arranged before the critical subelements from the subelements according to the subelements sequencing result; and determining a screenshot area according to the Sun Yuansu, the Sun Yuansu height and the subelements to be compared.
In an embodiment, the screenshot area module 40 is further configured to obtain a sub-element area to be compared corresponding to the sub-element to be compared when Sun Yuansu does not exist in the critical sub-element; and determining a screenshot area according to the element area to be compared and the sub-element area to be compared.
In an embodiment, the screenshot-area module 40 is further configured to determine an element selection policy according to the PDF generation instruction; determining a target page element according to the element selection strategy and the page element; traversing the target page element, and taking the traversed target page element as a page element to be processed.
In an embodiment, the screenshot-area module 40 is further configured to determine target element information according to the element selection policy; and selecting a target page element from the page elements according to the target element information.
In an embodiment, the file generating module 50 is further configured to perform screenshot processing on the web page to be processed according to the screenshot area, so as to obtain a picture to be processed; sequencing the pictures to be processed to obtain a picture sequencing result; and carrying out format conversion on the pictures to be processed according to the picture sorting result so as to generate a PDF file.
Other embodiments or specific implementation methods of the PDF generating device based on web pages in the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in an estimator readable storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a smart device (which may be a mobile phone, estimator, web page based PDF generating device, air conditioner, or network web page based PDF generating device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (16)

1. The PDF generation method based on the webpage is characterized by comprising the following steps of:
When a PDF generation instruction is received, determining the heights of a webpage to be processed and a PDF file page according to the PDF generation instruction;
Acquiring page information of the webpage to be processed;
Determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information;
Determining a screenshot area according to the page height of the PDF file, the page element and the element height;
obtaining a picture to be processed according to the screenshot area, and generating a PDF file according to the picture to be processed;
The determining a screenshot area according to the page height of the PDF file, the page element and the element height comprises the following steps:
traversing the page elements, and taking the traversed page elements as page elements to be processed;
Taking the element height corresponding to the page element to be processed as the element height to be processed;
Sorting the page elements to be processed to obtain element sorting results;
Progressively adding the heights of the elements to be processed according to the element sequencing result to obtain the total heights of the elements;
comparing the total height of the elements with the page height of the PDF file to determine critical elements;
and determining a screenshot area according to the critical element.
2. The web page based PDF generation method of claim 1 wherein said comparing said element total height to said PDF file page height to determine critical elements comprises:
Comparing the total height of the elements with the page height of the PDF file;
And when the total height of the elements is larger than the page height of the PDF file, selecting critical elements from the elements to be processed.
3. The web page-based PDF generation method of claim 1, wherein said determining a screenshot area according to the critical element includes:
Selecting elements to be compared which are arranged before the critical elements from the elements to be processed according to the element sorting result;
Searching the height of the element to be compared corresponding to the element to be compared, and calculating the height to be compared according to the height of the element to be compared;
and determining a screenshot area according to the height to be compared, the critical element and the element to be compared.
4. The web page-based PDF generation method of claim 3, wherein said determining a screenshot area according to the height to be compared, the critical element, and the element to be compared includes:
calculating a height difference value according to the page height of the PDF file and the height to be compared, and judging whether the critical element has a subelement or not;
When the critical element has sub-elements, acquiring the heights of the sub-elements corresponding to the sub-elements;
And determining a screenshot area according to the sub-element, the height of the sub-element, the height difference value and the element to be compared.
5. The web page based PDF generation method of claim 4, wherein after said determining whether the critical element has a sub-element, further comprises:
when the critical element does not have sub-elements, acquiring an element region to be compared corresponding to the element to be compared;
And determining a screenshot area according to the element area to be compared.
6. The web page based PDF generation method of claim 4, wherein said determining a screenshot area according to the sub-element, the sub-element height, the height difference value, and the element to be compared comprises:
Sequencing the sub-elements to obtain a sub-element sequencing result;
determining a critical subelement according to the subelement sequencing result, the subelement height and the height difference value;
and determining a screenshot area according to the critical subelement and the element to be compared.
7. The web page based PDF generation method of claim 6, wherein said determining a screenshot area according to the critical subelement and the element to be compared comprises:
judging whether Sun Yuansu exists in the critical subelement or not;
acquiring a Sun Yuansu height corresponding to the Sun Yuansu when the critical subelement exists Sun Yuansu;
selecting the subelements to be compared which are arranged before the critical subelements from the subelements according to the subelements sequencing result;
and determining a screenshot area according to the Sun Yuansu, the Sun Yuansu height and the subelements to be compared.
8. The web page based PDF generation method of claim 7, wherein after said determining whether said critical subelement exists Sun Yuansu, further comprising:
Acquiring a sub-element region to be compared corresponding to the sub-element to be compared when Sun Yuansu is not present in the critical sub-element;
and determining a screenshot area according to the element area to be compared and the sub-element area to be compared.
9. The web page-based PDF generation method of claim 1, wherein the traversing the page elements, before taking the traversed page elements as the page elements to be processed, further comprises:
determining an element selection strategy according to the PDF generation instruction;
correspondingly, the traversing the page element, taking the traversed page element as the page element to be processed, includes:
determining a target page element according to the element selection strategy and the page element;
traversing the target page element, and taking the traversed target page element as a page element to be processed.
10. The web page based PDF generation method of claim 9, wherein said determining a target page element according to said element selection policy and said page element comprises:
determining target element information according to the element selection strategy;
And selecting a target page element from the page elements according to the target element information.
11. The web page-based PDF generation method of any one of claims 1 to 10, wherein the obtaining a to-be-processed picture according to the screenshot area and generating a PDF file according to the to-be-processed picture include:
Performing screenshot processing on the webpage to be processed according to the screenshot area to obtain a picture to be processed;
Sequencing the pictures to be processed to obtain a picture sequencing result;
and carrying out format conversion on the pictures to be processed according to the picture sorting result so as to generate a PDF file.
12. A web page based PDF generation apparatus, comprising:
the instruction receiving module is used for determining the heights of the webpage to be processed and the PDF file page according to the PDF generation instruction when the PDF generation instruction is received;
The information acquisition module is used for acquiring page information of the webpage to be processed;
The element determining module is used for determining page elements in the webpage to be processed and element heights corresponding to the page elements according to the page information;
the screenshot area module is used for determining a screenshot area according to the page height of the PDF file, the page elements and the element heights;
The file generation module is used for obtaining a picture to be processed according to the screenshot area and generating a PDF file according to the picture to be processed;
The screenshot area module is further used for traversing the page elements, and the traversed page elements are used as page elements to be processed; taking the element height corresponding to the page element to be processed as the element height to be processed; sorting the page elements to be processed to obtain element sorting results; progressively adding the heights of the elements to be processed according to the element sequencing result to obtain the total heights of the elements; comparing the total height of the elements with the page height of the PDF file to determine critical elements; and determining a screenshot area according to the critical element.
13. The web page based PDF generation apparatus of claim 12 wherein said screenshot area module is further to compare said element total height to said PDF file page height; and when the total height of the elements is larger than the page height of the PDF file, selecting critical elements from the elements to be processed.
14. The web page-based PDF generation apparatus of claim 12, wherein the screenshot area module is further configured to select an element to be compared that is ranked before the critical element from the elements to be processed according to the element ranking result; searching the height of the element to be compared corresponding to the element to be compared, and calculating the height to be compared according to the height of the element to be compared; and determining a screenshot area according to the height to be compared, the critical element and the element to be compared.
15. A web page based PDF generation device, characterized in that the web page based PDF generation device comprises: a memory, a processor and a web page based PDF generation program stored on the memory and executable on the processor, the web page based PDF generation program being configured with steps to implement the web page based PDF generation method of any one of claims 1 to 11.
16. A storage medium having stored thereon a web page based PDF generation program which, when executed by a processor, implements the steps of the web page based PDF generation method of any one of claims 1 to 11.
CN202010900698.8A 2020-08-31 PDF generation method, device, equipment and storage medium based on webpage Active CN112036123B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010900698.8A CN112036123B (en) 2020-08-31 PDF generation method, device, equipment and storage medium based on webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010900698.8A CN112036123B (en) 2020-08-31 PDF generation method, device, equipment and storage medium based on webpage

Publications (2)

Publication Number Publication Date
CN112036123A CN112036123A (en) 2020-12-04
CN112036123B true CN112036123B (en) 2024-05-10

Family

ID=

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441713A (en) * 2007-11-19 2009-05-27 汉王科技股份有限公司 Optical character recognition method and apparatus of PDF document
CN101971171A (en) * 2008-02-19 2011-02-09 布克里克斯有限两合公司 Method and apparatus for the page-by-page provision of an electronic document as a computer graphic
US8209600B1 (en) * 2009-05-26 2012-06-26 Adobe Systems Incorporated Method and apparatus for generating layout-preserved text
CN104462125A (en) * 2013-09-18 2015-03-25 腾讯科技(深圳)有限公司 Method and device for generating webpage screenshot
CN104965881A (en) * 2015-06-12 2015-10-07 北京奇虎科技有限公司 Method and device for extracting selected area from page
CN105302550A (en) * 2015-10-12 2016-02-03 江苏中威科技软件系统有限公司 Method and system for converting page into layout data stream file
CN105677267A (en) * 2014-11-19 2016-06-15 珠海金山办公软件有限公司 Page display method and device
CN109597980A (en) * 2018-12-07 2019-04-09 万兴科技股份有限公司 PDF document dividing method, device and electronic equipment
CN110019037A (en) * 2018-03-29 2019-07-16 中国平安财产保险股份有限公司 A kind of pdf document methods of exhibiting, device, equipment and storage medium
CN110248035A (en) * 2018-03-09 2019-09-17 株式会社理光 Information processing unit, image forming apparatus, image processing system, image processing method and program
CN110244896A (en) * 2019-06-24 2019-09-17 北京向上一心科技有限公司 Screenshot method, device, controller and storage medium in webpage
CN110532523A (en) * 2019-08-30 2019-12-03 深圳点猫科技有限公司 Webpage data is converted into the method and apparatus of pdf document
CN110737855A (en) * 2019-09-03 2020-01-31 赵廷江 Method for extracting words in non-replicable word web page
CN110751143A (en) * 2019-09-26 2020-02-04 中电万维信息技术有限责任公司 Electronic invoice information extraction method and electronic equipment
CN110795914A (en) * 2018-07-16 2020-02-14 珠海金山办公软件有限公司 Method and device for converting PDF document into picture and electronic equipment
CN110889072A (en) * 2019-11-21 2020-03-17 深圳前海环融联易信息科技服务有限公司 Screenshot method and device for removing webpage advertisements, computer equipment and storage medium
CN111159594A (en) * 2019-12-24 2020-05-15 深圳市优必选科技股份有限公司 Information processing method, information processing device and terminal equipment
CN111191079A (en) * 2019-12-25 2020-05-22 中国平安财产保险股份有限公司 Document content acquisition method, device, equipment and storage medium
CN111309671A (en) * 2019-12-04 2020-06-19 珠海派诺科技股份有限公司 Method, device and storage medium for exporting PDF (Portable document Format) of web report

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101441713A (en) * 2007-11-19 2009-05-27 汉王科技股份有限公司 Optical character recognition method and apparatus of PDF document
CN101971171A (en) * 2008-02-19 2011-02-09 布克里克斯有限两合公司 Method and apparatus for the page-by-page provision of an electronic document as a computer graphic
US8209600B1 (en) * 2009-05-26 2012-06-26 Adobe Systems Incorporated Method and apparatus for generating layout-preserved text
CN104462125A (en) * 2013-09-18 2015-03-25 腾讯科技(深圳)有限公司 Method and device for generating webpage screenshot
CN105677267A (en) * 2014-11-19 2016-06-15 珠海金山办公软件有限公司 Page display method and device
CN104965881A (en) * 2015-06-12 2015-10-07 北京奇虎科技有限公司 Method and device for extracting selected area from page
CN105302550A (en) * 2015-10-12 2016-02-03 江苏中威科技软件系统有限公司 Method and system for converting page into layout data stream file
CN110248035A (en) * 2018-03-09 2019-09-17 株式会社理光 Information processing unit, image forming apparatus, image processing system, image processing method and program
CN110019037A (en) * 2018-03-29 2019-07-16 中国平安财产保险股份有限公司 A kind of pdf document methods of exhibiting, device, equipment and storage medium
CN110795914A (en) * 2018-07-16 2020-02-14 珠海金山办公软件有限公司 Method and device for converting PDF document into picture and electronic equipment
CN109597980A (en) * 2018-12-07 2019-04-09 万兴科技股份有限公司 PDF document dividing method, device and electronic equipment
CN110244896A (en) * 2019-06-24 2019-09-17 北京向上一心科技有限公司 Screenshot method, device, controller and storage medium in webpage
CN110532523A (en) * 2019-08-30 2019-12-03 深圳点猫科技有限公司 Webpage data is converted into the method and apparatus of pdf document
CN110737855A (en) * 2019-09-03 2020-01-31 赵廷江 Method for extracting words in non-replicable word web page
CN110751143A (en) * 2019-09-26 2020-02-04 中电万维信息技术有限责任公司 Electronic invoice information extraction method and electronic equipment
CN110889072A (en) * 2019-11-21 2020-03-17 深圳前海环融联易信息科技服务有限公司 Screenshot method and device for removing webpage advertisements, computer equipment and storage medium
CN111309671A (en) * 2019-12-04 2020-06-19 珠海派诺科技股份有限公司 Method, device and storage medium for exporting PDF (Portable document Format) of web report
CN111159594A (en) * 2019-12-24 2020-05-15 深圳市优必选科技股份有限公司 Information processing method, information processing device and terminal equipment
CN111191079A (en) * 2019-12-25 2020-05-22 中国平安财产保险股份有限公司 Document content acquisition method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Layout definition of online magazines with splitter components》;Albert I 等;《International Journal of Engineering Research and Development》;20121130;第4卷(第7期);61-69 *
《ScienceWord软件中PDF文档的生成及其内容提取研究》;刘平;《中国优秀硕士学位论文全文数据库信息科技辑》;20090615(第6期);I138-96 *

Similar Documents

Publication Publication Date Title
EP3518124A1 (en) Webpage rendering method and related device
JP2012059248A (en) System, method, and program for detecting and creating form field
US8599287B2 (en) Image providing device, image processing method, image processing program, and recording medium for forming a mosaic image
US8387008B2 (en) Method for sharing a function between web contents
CN101937428B (en) Method and system for rearranging pictures with literal contents for mobile terminal equipment
Nebeling et al. CrowdAdapt: enabling crowdsourced web page adaptation for individual viewing conditions and preferences
CN103605502B (en) Form page display method and server
EP2610812A1 (en) Image providing device, image processing method, image processing program, and recording medium
CN106874271A (en) A kind of method and system that PC webpages are converted to mobile terminal webpage
CN111414727A (en) Method and device for editing header and footer of PDF (Portable document Format) document and electronic equipment
CN110705243A (en) Web page table setting method, device, equipment and computer storage medium
US7865818B2 (en) Form output control apparatus, form output control method, and computer readable program
US9886426B1 (en) Methods and apparatus for generating an efficient SVG file
CN108984070B (en) Method, apparatus, electronic device and readable medium for thermodynamic diagram imaging
CN114969611A (en) Webpage printing method, device, equipment and medium
CN112036123B (en) PDF generation method, device, equipment and storage medium based on webpage
CN113887442A (en) OCR training data generation method, device, equipment and medium
CN110990732A (en) Loading method, device and equipment based on webpage and storage medium
JP2022128202A (en) Information processing device, information processing system, and information processing program
WO2015079527A1 (en) Information processing device, information processing method, and information processing program
CN105824951A (en) Retrieval method and retrieval device
US20200150855A1 (en) Information processing apparatus and non-transitory computer readable medium storing program
CN113407878B (en) Page adaptation method, display terminal and readable storage medium
CN112036123A (en) PDF (Portable document Format) generation method, device and equipment based on webpage and storage medium
CN108363525B (en) Method and device for responding to user gesture operation in webpage and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100020 304, floor 3, No. 103, floor 1-4, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing

Applicant after: Sanliu0 Digital Security Technology Group Co.,Ltd.

Address before: 100020 304, floor 3, No. 103, floor 1-4, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing

Applicant before: Beijing Hongteng Intelligent Technology Co.,Ltd.

Address after: 100020 304, floor 3, No. 103, floor 1-4, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing

Applicant after: Beijing Hongteng Intelligent Technology Co.,Ltd.

Address before: 100020 304, floor 3, No. 103, floor 1-4, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing

Applicant before: Beijing Qihu Hongteng Technology Co.,Ltd.

GR01 Patent grant