CN110399105B - Method and system for printing map page - Google Patents
Method and system for printing map page Download PDFInfo
- Publication number
- CN110399105B CN110399105B CN201910649251.5A CN201910649251A CN110399105B CN 110399105 B CN110399105 B CN 110399105B CN 201910649251 A CN201910649251 A CN 201910649251A CN 110399105 B CN110399105 B CN 110399105B
- Authority
- CN
- China
- Prior art keywords
- page
- map
- printing
- information
- map 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1206—Improving or facilitating administration, e.g. print management resulting in increased flexibility in input data format or job format or job type
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1242—Image or content composition onto a page
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1223—Dedicated interfaces to print systems specifically adapted to use a particular technique
- G06F3/1237—Print job management
- G06F3/1253—Configuration of print job parameters, e.g. using UI at the client
- G06F3/1257—Configuration of print job parameters, e.g. using UI at the client by using pre-stored settings, e.g. job templates, presets, print styles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1278—Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
- G06F3/1285—Remote printer device, e.g. being remote from client or server
Abstract
The invention belongs to the technical field of copying or marking methods, and discloses a printing method and a printing system for a map page, wherein an html page for displaying the map page and loading map information of a corresponding area according to point location information is compiled; acquiring a map page needing to be printed; preloading a map page in a server through a PhantomJS tool to generate a page screenshot; inserting the page screenshot into a preset printing template; and generating a printing file based on the server, and printing the generated word document containing the screenshot of the map page information. The printing method and the printing system for the map page, provided by the invention, can solve the problems of poor printing compatibility, poor user experience and low efficiency of the map page, and have the characteristics of high efficiency, universality, practicability and reusability.
Description
Technical Field
The invention belongs to the technical field of copying or marking methods, and particularly relates to a method and a system for printing a map page.
Background
The current state of the art, which is common in the industry, is the following:
printing is generally performed by using a print function provided in a computer browser, and the environment depending on the browser of the user causes the following problems.
The existing map page printing is based on the page printing function of a browser, and no special map page printing method, tool or system exists.
When the browser is used for printing the map page, the browser is poor in compatibility, the printed page cannot be adjusted and modified, and batch printing cannot be achieved. The map page printed by the existing method has poor user experience and low processing efficiency.
The problems existing in the prior art are as follows:
the prior art has no special map page printing method, tool or system. The browser has poor compatibility, and the printed pages cannot be adjusted and modified and cannot be printed in batches. The user experience is poor, and the processing efficiency is low.
The difficulty of solving the technical problems is as follows:
the difficulty mainly lies in solving the problem of dependence of a client browser, and the function of printing realized by the client is changed into printing from the server.
The significance of solving the technical problems is as follows:
the problem of map printing compatibility can be solved to solve above-mentioned technical problem, the function of printing in batches can be realized, user experience nature can be promoted greatly.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for printing a map page. The invention adopts the function based on the server side printing, thus solving the problems in the background technology.
The invention is realized in such a way that the printing method of the map page specifically comprises the following steps:
step one, compiling an html page for displaying a map page and loading map information of a corresponding region according to point location information.
And step two, acquiring a map page needing to be printed.
And thirdly, preloading a map page in the server through a PhantomJS tool to generate a page screenshot.
And step four, inserting the page screenshot into a preset printing template.
And fifthly, generating a printing file based on the server, and printing the generated word document containing the map page information screenshot.
Further, the first step specifically includes:
setting map page information to be printed, loading a designated map area by adopting map controls such as a land map, a hypergraph, a Baidu map, a Google map and the like and related API (application program interface) and rendering the map information.
Further, in step four, the printing template is made by using word from microsoft.
Further, the fifth step specifically includes:
and returning the generated word file containing the map information to the user, and printing by the user through a word printing function carried by the computer.
Another object of the present invention is to provide a map page printing system, which specifically includes:
the system comprises an HTML page compiling module, a map page obtaining module, a page screenshot generating module, a template generating module and a printing executing module.
HTML page writing module: and the html page is used for setting the map page information to be printed, loading the map information of the corresponding area according to the point information and displaying the map information.
A map page acquisition module: for obtaining a map page to be printed.
A page screenshot generating module: and preloading a map page in a server through a PhantomJS tool to generate a page screenshot.
A template generation module: for making a print template using microsoft word and inserting the page screenshot into the print template.
A print execution module: and generating a print file based on the server and printing the generated word document containing the map page information screenshot.
Further, the map page printing system is deployed on a window system server.
Another object of the present invention is to provide a map page printing program that implements the method of printing a map page.
Another object of the present invention is to provide an information data processing terminal implementing the method of printing the map page.
Another object of the present invention is to provide a computer-readable storage medium including instructions which, when run on a computer, cause the computer to execute the method of printing a map page.
In summary, the advantages and positive effects of the invention are as follows:
the printing method and the printing system for the map page, provided by the invention, can solve the problems of poor printing compatibility, poor user experience and low efficiency of the map page, and have the characteristics of high efficiency, universality, practicability and reusability.
Drawings
Fig. 1 is a flowchart of a map page printing method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a map page printing method according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a map page printing system provided by an embodiment of the invention.
In the figure: 1. an HTML page compiling module; 2. a map page acquisition module; 3. a page screenshot generating module; 4. a template generation module; 5. and a print execution module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The existing map page printing is based on the page printing function of a browser, and no special map page printing method, tool or system is provided. When the browser is used for printing the map page, the browser is poor in compatibility, the printed page cannot be adjusted and modified, and batch printing cannot be achieved. The map page printed by the existing method has poor user experience and low processing efficiency.
To solve the above problems, the following describes the technical solution of the present invention in detail with reference to the accompanying drawings.
As shown in fig. 1-2, a method for printing a map page provided by an embodiment of the present invention specifically includes:
s101, setting map page information to be printed, loading a designated map area by adopting map controls such as a homeland map, a hypergraph, a Baidu map and a Google map and related APIs (application program interfaces), and rendering the map information. And writing an html page for displaying the map page and loading the map information of the corresponding area according to the point information.
S102, obtaining a map page needing to be printed.
S103, preloading a map page in the server through a PhantomJS tool to generate a page screenshot.
And S104, inserting the screenshot into a printing template made by Microsoft word in advance.
And S105, generating a printing file based on the server, returning the generated word file containing the map page information screenshot to the user, and printing through a word printing function of the computer.
As shown in fig. 3, the map page printing system according to the embodiment of the present invention specifically includes:
the system comprises an HTML page writing module 1, a map page obtaining module 2, a page screenshot generating module 3, a template generating module 4 and a printing executing module 5.
HTML page writing module 1: and the html page is used for setting the map page information to be printed, loading the map information of the corresponding area according to the point information and displaying the map information.
The map page acquisition module 2: for obtaining a map page to be printed.
The page screenshot generating module 3: and preloading a map page in a server through a PhantomJS tool to generate a page screenshot.
The template generation module 4: for making a print template using microsoft word and inserting the page screenshot into the print template.
The print execution module 5: and generating a print file based on the server and printing the generated word document containing the map page information screenshot.
The map page printing system provided by the embodiment of the invention is deployed on a window system server.
The technical effects of the present invention will be further described with reference to the following specific embodiments.
Example 1:
the map page printing method provided by the embodiment of the invention specifically comprises the following steps:
and S1, writing an html page for displaying a map page.
Wherein, API such as a territorial map, a Baidu map, a Google map and the like are adopted to load the designated map area. The Baidu map API is a set of application program interfaces based on Baidu maps and provided for developers, comprises multiple versions of JavaScript, iOS, andriod, static maps, web services and the like, and provides rich functions of basic maps, position search, peripheral search, bus driving navigation, positioning service, geocoding, reverse geocoding and the like.
And S2, acquiring the map information needing to be printed.
And S3, generating a map page screenshot through PhantomJS. PhantomJS-is a JavaScript API based on a server side, which fully supports the web without a browser, can be used for page automation, network monitoring, webpage screen capturing, no interface operation and the like, and can be regarded as a server side browser.
And S4, inserting the page screenshot into a word template to generate word document information.
And S5, printing the generated word document containing the screenshot of the map page.
The present invention will be further described with reference to effects.
The following table is comparison data of the conventional map printing function and the printing function of the present invention.
Client-based printing | Printing based on server | |
Compatibility | Bad, supporting part of browser | High, support all browsers |
Batch printing | Do not support | Support for |
Page modification | Do not support | Support for |
Conversion to word | Do not support | Support for |
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, is implemented in a computer program product that includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the procedures or functions according to the embodiments of the present invention are wholly or partially generated. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (6)
1. A method for printing a map page, the method comprising the steps of:
writing a page for displaying a map and loading an html page of map information of a corresponding area according to point location information;
step two, acquiring a printed map page;
thirdly, preloading a map page in the server through a PhantomJS tool and generating a page screenshot;
step four, inserting the page screenshot into a preset printing template by using a word to manufacture the printing template;
generating a word document printing file containing the map page information screenshot based on the server;
the first step specifically comprises:
setting printed map page information, loading a designated map area by adopting a territorial map, a hypergraph, a Baidu map, a Google map control and a related API (application program interface) and rendering and displaying the map information.
2. The method for printing the map page as recited in claim 1, wherein said step five further comprises:
and returning the generated word file containing the map information to the user and printing the word file.
3. A map page printing system implementing the method of printing the map page of claim 1, the map page printing system comprising:
the HTML page compiling module is used for setting the printed map page information and compiling the map information of the corresponding region loaded according to the point location information and the HTML page for displaying the map information;
the map page acquisition module is used for acquiring a printed map page;
the page screenshot generating module is used for preloading a map page in the server through a PhantomJS tool to generate a page screenshot;
the template generation module is used for manufacturing a printing template by using word and inserting the page screenshot into the printing template;
and the printing execution module is used for generating a printing file based on the server and printing the generated word document containing the map page information screenshot.
4. The map page printing system of claim 3, wherein the map page printing system is deployed on a window system server.
5. An information data processing terminal characterized in that the information data processing terminal implements the printing method of the map page of any one of claims 1 to 2.
6. A computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform a method of printing a map page as claimed in any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910649251.5A CN110399105B (en) | 2019-07-18 | 2019-07-18 | Method and system for printing map page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910649251.5A CN110399105B (en) | 2019-07-18 | 2019-07-18 | Method and system for printing map page |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110399105A CN110399105A (en) | 2019-11-01 |
CN110399105B true CN110399105B (en) | 2022-11-22 |
Family
ID=68324527
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910649251.5A Active CN110399105B (en) | 2019-07-18 | 2019-07-18 | Method and system for printing map page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110399105B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8786875B1 (en) * | 2010-03-26 | 2014-07-22 | Open Invention Network, Llc | Systems and methods for printing a document from a mobile communication device |
CN104461412A (en) * | 2014-12-30 | 2015-03-25 | 广州视源电子科技股份有限公司 | Web page designated area printing method and system |
CN108572805A (en) * | 2018-03-20 | 2018-09-25 | 北京明朝万达科技股份有限公司 | Document printing method and system |
CN109960478A (en) * | 2019-04-02 | 2019-07-02 | 武大吉奥信息技术有限公司 | A kind of Web map printing method for previewing and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020138564A1 (en) * | 2001-03-21 | 2002-09-26 | Treptow Jay A. | Universal printing and document imaging system and method |
-
2019
- 2019-07-18 CN CN201910649251.5A patent/CN110399105B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8786875B1 (en) * | 2010-03-26 | 2014-07-22 | Open Invention Network, Llc | Systems and methods for printing a document from a mobile communication device |
CN104461412A (en) * | 2014-12-30 | 2015-03-25 | 广州视源电子科技股份有限公司 | Web page designated area printing method and system |
CN108572805A (en) * | 2018-03-20 | 2018-09-25 | 北京明朝万达科技股份有限公司 | Document printing method and system |
CN109960478A (en) * | 2019-04-02 | 2019-07-02 | 武大吉奥信息技术有限公司 | A kind of Web map printing method for previewing and device |
Also Published As
Publication number | Publication date |
---|---|
CN110399105A (en) | 2019-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108156022B (en) | Service calling method and device and electronic equipment | |
JP5075920B2 (en) | Web data usage platform | |
US20200412644A1 (en) | Content based routing method and apparatus | |
US10447764B2 (en) | Mapping selections between a browser and the original fetched file from a web server | |
US9967370B2 (en) | OData enabled mobile software applications | |
CN102567516A (en) | Script loading method and device | |
CN103530160A (en) | Page loading method and device | |
JP2015508190A (en) | Managing script file dependencies and load times | |
JP2014502384A (en) | Style sheet identifier | |
US20190087397A1 (en) | Human-computer interaction method and apparatus thereof | |
EP3821344B1 (en) | Use of cache for content validation and error remediation | |
CN104113567A (en) | Content distribution network data processing method, device and system | |
CN104267921A (en) | Page display control method and server | |
CN114239479A (en) | Circuit module multiplexing design method and device, computer equipment and storage medium | |
CN110399105B (en) | Method and system for printing map page | |
US20140331117A1 (en) | Application-based dependency graph | |
CN106156291A (en) | The caching method of static resource and system thereof based on Localstroage | |
CN102004633B (en) | Method and device for processing control property | |
CN113553335A (en) | Data updating method and device for columnar storage file | |
CN117390326A (en) | Page management method, device, equipment and storage medium | |
CN113204401A (en) | Browser rendering method, terminal and storage medium | |
CN104915404A (en) | Method and device for accessing invalid website | |
US9207829B2 (en) | Smartly navigating hierarchical structure strings | |
EP3092609A1 (en) | Document and object manipulation | |
US9330173B2 (en) | Situational application creation based on observed user behavior |
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 |