Form document paging printing method and device based on webpage and application of form document paging printing method and device

A form and document technology, applied in the field of computer program products, can solve problems such as lack of content, increased user operation complexity, and browser compatibility limitations

Active Publication Date: 2022-04-08
CITY CLOUD TECH HANGZHOU CO LTD
View PDF11 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

A common printing method is to rely on the specified plug-in in the browser to print, which has great restrictions on the compatibility of the browser, and increases the cumbersomeness of the user's operation, which is not convenient for use and rapid promotion
The other is to use the native printing function of the browser, such as using window.print() to print the entire web page content, which does not have pagination function itself, and only prints the web page content from top to bottom according to the size of the paper or preview area Pagination, that is, to directly truncate the content that cannot be accommodated by the current paper or the current preview area to the next paper or the next preview area by means of rough truncation, which often causes the text in the table to be truncated, so that the printed display of the web page content is not standardized or missing truncated content

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Form document paging printing method and device based on webpage and application of form document paging printing method and device
  • Form document paging printing method and device based on webpage and application of form document paging printing method and device
  • Form document paging printing method and device based on webpage and application of form document paging printing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] This embodiment provides a method for page-by-page printing of form documents based on web pages. The method is implemented inside the browser and is decoupled from hardware terminals such as printers and multi-function transactions without considering external factors such as various printer models and environments. In this embodiment, the method divides the whole document into fine-grained modules for assembly, and performs free combination control according to the printing content when paging, so as to realize flexible printing of documents and avoid the problem of text being truncated during pagination.

[0037] refer to figure 1 , the method includes the following steps S1-S5:

[0038] Step S1: Obtain the form documents to be printed on the webpage, create at least one preview area according to the form documents to be printed, split the form documents to be printed into multiple form modules in turn, and render them in each preview area;

[0039] Step S2: When pr...

Embodiment 2

[0066] Based on the same idea, this embodiment also provides a page-by-page printing device for form documents based on web pages, which is used to realize the method for page-by-page printing of form documents based on web pages described in Embodiment 1. For details, refer to Figure 6 , the device consists of the following modules:

[0067] The rendering module is configured to acquire the form documents to be printed on the webpage, create at least one preview area according to the form documents to be printed, split the form documents to be printed into multiple form modules in turn and render them on each preview area;

[0068] An acquisition module, configured to acquire the current preview area, the first pixel height of the current preview area, and all modules in the current preview area when printing each preview area sequentially, wherein the current preview area is the currently to-be-printed said preview area;

[0069] The positioning module is used to obtain t...

Embodiment 3

[0073] This embodiment also provides an electronic device, refer to Figure 7 , including a memory 404 and a processor 402, the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps of any method for page-by-page printing of a webpage-based form document in the above embodiments.

[0074] Specifically, the processor 402 may include a central processing unit (CPU), or an Application Specific Integrated Circuit (ASIC for short), or may be configured to implement one or more integrated circuits in the embodiments of the present application.

[0075]Wherein, the memory 404 may include a mass memory 404 for data or instructions. By way of example and not limitation, the memory 404 may include a hard disk drive (Hard Disk Drive, referred to as HDD), a floppy disk drive, a solid state drive (Solid State Drive, referred to as SSD), flash memory, optical disk, magneto-optical disk, magnetic tape or general serial A b...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a webpage-based table document paging printing method which comprises the following steps: when each preview area is printed in sequence, acquiring a current preview area, a first pixel height of the current preview area and all modules in the current preview area; obtaining a pixel height of each module in the current preview area and a second pixel height from the top of each module to the top of the current preview area, and determining a target module in the current preview area and a third pixel height of the target module; obtaining the character row height of characters in the target module, calculating a fourth pixel height according to the third pixel height and the character row height, and moving the characters in the target module down by the fourth pixel height; and printing the current preview area, and taking the preview area next to the current preview area as a new current preview area to continue printing. According to the method, the table document is modularized, terminal decoupling is realized in the browser, and the problem that the table content is cut off during printing is avoided.

Description

technical field [0001] The present application relates to the field of front-end technology, in particular to a method, device and computer program product for page-by-page printing of form documents based on web pages. Background technique [0002] Digital government affairs office is an important way to realize the government's digital transformation that is currently being implemented nationwide. Directly operating government affairs documents in the browser is already a key project to speed up the efficiency of government affairs and services. Taking digital city management as an example, the whole link from the filing to the closing and archiving of urban management cases has been completed online in the background management system, and the preview and printing functions of online government documents are particularly important. [0003] At present, the web page printing function is relatively common, and its realization method is to use a browser's own printing functi...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F3/12G06F40/106G06F40/114G06F40/18
Inventor 刘仿洪凯
Owner CITY CLOUD TECH HANGZHOU CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products