CN116301678A - PDF document generation device and method, electronic equipment and storage medium - Google Patents

PDF document generation device and method, electronic equipment and storage medium Download PDF

Info

Publication number
CN116301678A
CN116301678A CN202310281455.4A CN202310281455A CN116301678A CN 116301678 A CN116301678 A CN 116301678A CN 202310281455 A CN202310281455 A CN 202310281455A CN 116301678 A CN116301678 A CN 116301678A
Authority
CN
China
Prior art keywords
page
pdf
client
printing
pdf document
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.)
Pending
Application number
CN202310281455.4A
Other languages
Chinese (zh)
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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202310281455.4A priority Critical patent/CN116301678A/en
Publication of CN116301678A publication Critical patent/CN116301678A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1202Dedicated interfaces to print systems specifically adapted to achieve a particular effect
    • G06F3/1203Improving or facilitating administration, e.g. print management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1236Connection management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1223Dedicated interfaces to print systems specifically adapted to use a particular technique
    • G06F3/1237Print job management
    • G06F3/1244Job translation or job parsing, e.g. page banding
    • G06F3/1248Job translation or job parsing, e.g. page banding by printer language recognition, e.g. PDL, PCL, PDF
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/12Digital output to print unit, e.g. line printer, chain printer
    • G06F3/1201Dedicated interfaces to print systems
    • G06F3/1278Dedicated interfaces to print systems specifically adapted to adopt a particular infrastructure
    • G06F3/1285Remote printer device, e.g. being remote from client or server
    • G06F3/1286Remote printer device, e.g. being remote from client or server via local network

Abstract

The embodiment of the specification provides a generating device, a generating method, electronic equipment and a storage medium of a PDF document, wherein the generating device of the PDF document realizes orderly printing of contents sent for multiple times into one PDF document through a first page and a second page which are established with two-way communication connection, and achieves the aim of supporting the requirement of users for orderly printing more contents in one PDF document. The PDF document can be generated locally without installing a third party client or communicating with a server, and the PDF document generation device has the characteristics of simplicity and easiness in operation.

Description

PDF document generation device and method, electronic equipment and storage medium
Technical Field
Embodiments in the present specification relate to the field of computer application technologies, and in particular, to a document conversion technology in the field of computer application technologies, and more particularly, to a PDF document generating device, a PDF document generating method, an electronic device, and a storage medium.
Background
PDF (Portable Document Format, portable file format) is a portable document file format for reliably presenting and exchanging documents. The PDF document is irrelevant to software, hardware or an operating system, namely, the PDF document has good compatibility, can be operated in a cross-platform manner, and can obtain reliable content display effects on different platforms.
Due to the advantages of PDF documents, the conversion of contents displayed by various other documents or web pages into PDF documents is a common requirement of users in various application scenes. It is necessary to provide a device that is easy to generate PDF documents.
Disclosure of Invention
Various embodiments in the present specification provide a PDF document generating apparatus, a PDF document generating method, an electronic device, and a storage medium, so as to achieve the purpose of generating a PDF document simply.
In a first aspect, an embodiment of the present specification provides a PDF document generating apparatus applied to a client, where the client is configured to build a browser page, the PDF document generating apparatus includes: the system comprises a first page and a second page, wherein the first page and the second page are in bidirectional communication connection;
the first page is used for sending a plurality of first printing requests with a time sequence relationship to a second page in response to a content printing operation for the first page, and is used for sending a second printing request to the second page in response to a document generating operation for the printing instruction page;
the second page is used for sequentially responding to the first printing request, generating PDF pages corresponding to document contents carried by the first printing request, and generating PDF documents according to the generated PDF pages in the generation sequence in response to the second printing request.
In a second aspect, an embodiment of the present specification provides a PDF document generating method applied to a client, where the client is configured to build a browser page, and the PDF document generating method includes:
responding to a content printing operation aiming at a first page, sending a plurality of first printing requests with a time sequence relation to a second page, and generating PDF pages corresponding to document contents carried by the first printing requests by using the second page to respond to the first printing requests in turn; the first page and the second page are established with two-way communication connection;
and transmitting a second print request to the second page in response to a document generation operation for the print instruction page, so that the second page generates PDF documents in the generated order of the generated PDF pages in response to the second print request.
In a third aspect, an embodiment of the present specification provides an electronic device, including: a processor and a memory;
wherein the memory is connected with the processor and is used for storing a computer program;
the processor is configured to implement the short link transmission method or the short link access method by running a computer program stored in the memory.
In a fourth aspect, an embodiment of the present disclosure provides a storage medium, where a computer program is stored, where the computer program is executed by a processor to implement a short link transmission method as described above or a short link access method as described above.
In a fifth aspect, one embodiment of the present specification provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor implements the steps of the short link transmission method or the short link access method when executing the computer instructions.
The embodiments of the present disclosure provide a generating device, a method, an electronic device, and a storage medium for a PDF document, where the generating device for a PDF document includes a first page and a second page that establish a bidirectional communication connection, so that the first page may send, in response to a content printing operation for the first page, a plurality of first print requests with a time sequence relationship to the second page, so that the second page sequentially responds to the first print requests, and generates a PDF page corresponding to document content carried by the first print requests; in addition, after the document contents to be printed are converted into corresponding PDF pages, a second print request is sent to the second page through the first page in response to the document generation operation for the print instruction page, so that the second page generates PDF documents according to the generated PDF pages in response to the second print request, and the PDF document generation process is completed. The generating device of the PDF document can orderly print the contents which are sent for many times into one PDF document, and the aim of supporting the requirement that users orderly print more contents in one PDF document is fulfilled. The device can be completed locally without depending on a third party client or communicating with a server, and has the characteristics of simplicity and easiness in operation.
Drawings
FIG. 1 is a schematic illustration of a page content provided herein;
FIG. 2 is a schematic view of the effect of converting the page content shown in FIG. 1 into a PDF document provided in the present specification;
FIG. 3 is a schematic view of another effect provided in the present specification of converting the page content shown in FIG. 1 into a PDF document;
fig. 4 is an application scenario example of a PDF document generating apparatus provided in the embodiment of the present specification;
FIG. 5 is a signaling flow chart of a PDF document generating device according to an embodiment of the present disclosure;
FIG. 6 is a signaling flow chart of another PDF document generating device according to the embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a first page and a second page according to an embodiment of the present disclosure;
FIG. 8 is a signaling flow chart of a generating device of a PDF document according to an embodiment of the present disclosure;
FIG. 9 is a flowchart of a method for generating a PDF document according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Unless defined otherwise, technical or scientific terms used in the embodiments of the present specification should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present specification belongs. The terms "first," "second," and the like, as used in the embodiments of the present disclosure, do not denote any order, quantity, or importance, but rather are used to avoid intermixing of the components.
Throughout the specification, unless the context requires otherwise, the word "plurality" means "at least two", and the word "comprising" is to be construed as open, inclusive meaning, i.e. as "comprising, but not limited to. In the description of the present specification, the terms "one embodiment," "some embodiments," "example embodiments," "examples," "particular examples," or "some examples," etc., are intended to indicate that a particular feature, structure, material, or characteristic associated with the embodiment or example is included in at least one embodiment or example of the present specification. The schematic representations of the above terms do not necessarily refer to the same embodiment or example.
The technical solutions of the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
SUMMARY
As described in the background art, there may be a need for converting web page content (or web page content edited by a user) into a PDF document when the user browses the web page or the like. For example, referring to FIG. 1, a user browses a purchase order via a web page for editing and edits the purchase order (e.g., fills out the purchase numbers of the purchase items in the purchase order). For example, the purchase order is a purchase order in company A, and the page can display the information of the purchase order number, the buyer, the purchase date, the commodity number to be purchased, the commodity name, the quantity, the unit price and the like, so that the user is supported to fill in the information. After the user fills in the information of the buyer, namely Zhang three, the purchasing date, namely, 2023-3-2, the commodity number, commodity name, quantity, unit price and the like required to be purchased (specific information can refer to fig. 1), the user needs to convert the edited webpage into a PDF document for being executed by departments such as a purchasing part and the like.
In the related art, in order to implement conversion of web page contents into PDF documents, a user may directly convert web page contents into PDF documents using a browser supporting html2Canvas (Hyper Text Markup Language 2.0.0 Canvas, hypertext markup language 2 Canvas) technology, but this approach requires that the web page has been rendered out of the page, and the printed PDF documents are printed as they are, and cannot fully meet the printing requirements. For example, after the user converts the page shown in fig. 1 into PDF through html2canvas technology, an effect as shown in fig. 2 may occur, because the content of the original web page exceeds a specified length, and then the content of the page is likely to be paged apart, so that the situation of splitting the content of the page (for example, in fig. 2, the remarks originally belonging to a column are split into two different pages) may occur, which may cause display of the PDF document to be unsightly and may cause a certain reading obstacle to the reader.
In addition, when there are embedded advertisement pages on some pages, printing pages directly based on html2canvas technology will print advertisement pages in PDF documents as well, resulting in some content that the user needs not being visible (as shown in fig. 3).
In addition, the PDF document printing method implemented based on the html2canvas technology can only support one printing instruction to generate one PDF document (for example, when the current display part of a page is converted into one PDF document and the remaining undisplayed part is converted into other PDF documents), when a user needs to print a plurality of printing contents on the page on one PDF document, the user needs to manually splice the single document, and the use of the user is unchanged.
In addition to the PDF document printing technology implemented based on the html2canvas technology, there is a technology of transmitting print contents to a server and converting PDF documents by means of the server, which has the main disadvantages that: the server has higher technical complexity for generating PDF documents, and the typesetting and debugging process is complicated. Specifically, the server needs to typeset the printing content to generate a PDF document and store the PDF document in the local, the user needs to open the PDF document in the local to see the typesetting result, if the typesetting is problematic, the printing content needs to be regulated and then sent to the server again, and the whole process is complex.
In order to solve the above problems, the inventors have found through long-term research that, based on a client having a browser page established, a PDF document generating apparatus may be provided, which establishes a first page and a second page that are connected in two-way communication, so that the first page may send a plurality of first print requests having a timing relationship to the second page in response to a content printing operation for the first page, so that the second page sequentially responds to the first print requests, and generates PDF pages corresponding to document contents carried by the first print requests; in addition, after the document contents to be printed are converted into corresponding PDF pages, a second print request is sent to the second page through the first page in response to the document generation operation for the print instruction page, so that the second page generates PDF documents according to the generated PDF pages in response to the second print request, and the PDF document generation process is completed. The generating device of the PDF document can orderly print the contents which are sent for many times into one PDF document, and the aim of supporting the requirement that users orderly print more contents in one PDF document is fulfilled. The device can be completed locally without depending on a third party client or communicating with a server, and has the characteristics of simplicity and easiness in operation.
Based on the above-described concept, the present embodiment provides a PDF document generating apparatus, and a scene and possible embodiments to which the PDF document generating apparatus may be applied will be exemplarily described below with reference to the accompanying drawings.
Scene example
In this specification, an application scenario example of a PDF document generating apparatus is provided, referring to fig. 4, a user accesses a page through a host computer or other devices by using a client, and may edit or select a desired print content on a display page of the client, after the desired print content is determined, the desired print content may be converted into a PDF document by using the PDF document generating apparatus based on the client, so as to achieve the purpose of converting the desired print content into the PDF document, and the user finally obtains a file named picture PDF, where in fig. 4, in addition to the content of the PDF document, editing, viewing, window and help buttons of a program for browsing the PDF document are shown, and related functions of these buttons are not described in detail in this specification.
System architecture
The present description provides a host, which may be an electronic device with network access capabilities. Specifically, for example, the host may be a desktop computer, a tablet computer, a notebook computer, a smart phone, a digital assistant, a shopping guide terminal, a television, or the like.
The host can be operated with a client capable of establishing a Browser page, and the client can be a Browser, can also be an application established based on a Browser kernel (Rendering Engine), and can support operations such as establishing the Browser page. The browser kernel is responsible for interpretation of webpage languages and rendering and displaying of webpages, and the client can also be other applications with the function of establishing browser pages.
Example apparatus
One embodiment of the present specification provides a PDF document generating apparatus, as shown in fig. 5, applied to a client for creating a browser page, the PDF document generating apparatus including: the system comprises a first page and a second page, wherein the first page and the second page are in bidirectional communication connection;
the first page is used for sending a plurality of first printing requests with a time sequence relationship to a second page in response to a content printing operation for the first page, and is used for sending a second printing request to the second page in response to a document generating operation for the printing instruction page;
the second page is used for sequentially responding to the first printing request, generating PDF pages corresponding to document contents carried by the first printing request, and generating PDF documents according to the generated PDF pages in the generation sequence in response to the second printing request.
As described above, the client may be a browser, or may be an application built based on a browser kernel or other application having a browser page building function. The first page and the second page may be browser pages established by the browser. Unlike the traditional browser page, the two-way communication connection is established between the first page and the second page, so that when the first page and the second page need to communicate according to a certain time sequence, the first page and the second page can keep the time sequence of communication contents, specifically, the first page can sequentially send a plurality of first printing requests, the second page can sequentially respond to the first printing requests, and the fact that a plurality of first printing requests with a time sequence relationship can sequentially respond is ensured. Thus, the problem that the time sequence and the two-way communication cannot be performed due to the mode that the messages can only be sent once between pages in the related technology can be avoided.
In a possible implementation manner, referring to fig. 6, the first page sends a plurality of first printing requests with a timing relationship to the second page, and the manner that the second page sequentially responds to the first printing requests may be: the first page sends the first printing request which is not responded and has the front time sequence to the second page according to the time sequence relation of the first printing request; after the second page responds to the first printing request, a response completion instruction is fed back to the first page, the first page sends the next first printing request after receiving the response completion instruction, and the above process is repeated until the last first printing request (for example, the nth first printing request as shown in fig. 6) is sent to the second page. In this way, it can be ensured that the plurality of first print requests are responded according to the time sequence relationship, and the order of the plurality of PDF pages generated by the second page corresponds to the time sequence of the plurality of first print requests.
The content printing operation may be a triggering operation of a "confirm print" button after determining the content to be printed (e.g., content determined after selecting, editing the first page display content).
The document generating operation may be a triggering operation of a "generate document" button after all the content to be printed is delivered to the second page for printing.
For example, referring to fig. 7, fig. 7 shows a schematic diagram of a possible presentation of a first page and a second page. The first page in fig. 7 shows content viewed by the user, and the second page shows a schematic view of the second page. In addition to displaying the content including the content that the user needs to print on the first page for the user to browse and edit, the "confirm print" and "generate document" buttons may be provided on the first page for the user to execute the content printing operation and the document generating operation, respectively. In some implementations, referring to fig. 7, the second page can be invoked by triggering a "page invoke" button in the first page.
On the second page, a Print-related option may be provided, for example, referring to fig. 7, the printer is "Print to PDF", and the Print option may be selected among "Print as color PDF, print as black and white PDF", and so on. In addition, the second page may provide some other options that may include adjustment of page size (e.g., A4, A5, etc.), margin size, etc.
The document content carried by the first printing request can comprise text, data, pictures and other contents and printing patterns, so that on one hand, the document content is not required to be rendered in the first page, and the cost is reduced; on the other hand, when the document content carried by each first print request comes from a plurality of interface data sources and print styles, the first print requests can be respectively generated for the plurality of interface data sources and print styles, and are integrated into PDF pages with time sequences in the second page, and finally integrated into a complete PDF document, so that the whole print technical scheme system is facilitated to be realized.
In this embodiment, the generating device of the PDF document realizes that the content sent for multiple times is printed into one PDF document in order through the first page and the second page which are connected through two-way communication, and the purpose of supporting the requirement that users print more content in one PDF document in order is achieved. The PDF document can be generated locally without installing a third party client or communicating with a server, and the PDF document generation device has the characteristics of simplicity and easiness in operation.
In some embodiments, the first page is further configured to establish the second page in the client in response to a page call operation for the first page, and establish the bidirectional communication connection with the second page.
Still referring to fig. 7, the page call operation may be a trigger operation for a "page call" button in a first page, where the first page establishes a second page within the client and establishes a bi-directional communication connection therewith, ready for printing of a subsequent PDF document. In addition, the page calling operation may be a triggering operation for a "confirm print" button in the first page, that is, after the user determines the content to be printed in the first page, the user may directly trigger the "confirm print" button to implement calling of the second page and sending of the first print request.
The second page is established through the first page and is in bidirectional communication connection with the first page, so that the second page can be hidden when PDF document printing is not needed, the simplicity degree of the page is improved, and the interference to a user, which is possibly caused by displaying the second page when the user does not need printing, is avoided.
One embodiment of the present specification provides a feasible way to establish a second page in a client and establish a bidirectional communication connection with the second page, specifically, the first page establishes a page loaded with a PDF generating tool in the client as the second page;
and establishing the bidirectional communication connection with the second page based on a bidirectional communication protocol.
By creating a page loaded with the PDF generation tool, it is possible to make the user feel less on the basis of making the second page have a function of converting the content into the PDF format. Namely, the user only finds that one more second page is provided, does not need to understand the principle of generating PDF pages by the second page, does not need to actually operate a PDF generating tool by the user, and is beneficial to improving the use convenience of the generating device of the PDF document. The PDF generation tool may be jsPDF (JavaScript PDF), which is an open source library of PDFs generated using JavaScript language.
In another exemplary embodiment of the present disclosure, a feasible manner of establishing a bidirectional communication connection with a second page based on a bidirectional communication protocol is provided, and referring to fig. 8, specifically may include:
the first page sends a connection request message to the second page, wherein the connection request message is used for requesting to establish bidirectional communication connection with the second page;
after receiving a first confirmation message returned by the second page aiming at the connection request message, sending a second confirmation message to the second page; the first confirmation message is used for indicating the second page to receive the connection request message, and the second confirmation message is used for indicating the establishment of the bidirectional communication connection.
In this embodiment, the specific formats of the connection request message, the first acknowledgement message, and the second acknowledgement message may refer to the message format sent in the three-way handshake protocol of the TCP protocol (Transmission Control Protocol ). In this embodiment, referring to the TCP protocol applied to communication between the host and the server, a bidirectional communication connection is established between the first page and the second page, so that after the first page and the second page learn that they have information transceiving capability, a firm and reliable bidirectional communication connection is established.
In some embodiments, referring to fig. 7, the second page is further used to preview the PDF page and/or the PDF document generated.
In this embodiment, the second page provides, in addition to the print related options, a portion of the pages for previewing the generated PDF pages and/or PDF documents, so that after each time of sending the first print instruction, the user may preview the PDF pages corresponding to the print contents carried by the first print instruction, or preview the PDF documents corresponding to the print contents carried by the plurality of first print instructions, so that before the PDF documents are actually produced, the previewing of the contents is achieved, which is favorable for avoiding the wrong contents from being generated into the PDF documents, and also is favorable for timely debugging the wrong contents, and reducing the complexity of the debugging process.
The presentation form of the second page may be adjusted according to the application scenario or the type of the client, for example, in fig. 7, the second page includes a popup page in the client, and this popup page may be suitable for an application built based on a browser kernel. In addition, the second page may be a new tab page in the client or an embedded page in the first page. When the second page is a new tab page in the client, the first page and the second page can be respectively displayed without interference. When the second page is an embedded page within the first page, the selection of the printing effect, printing parameters, etc. of the document content can be seen in the first page. The specific presentation form of the second page is not limited in this specification, and is specific to the actual situation.
Exemplary method
Some embodiments of the present disclosure further provide a method for generating a PDF document, as shown in fig. 9, which is applied to a client, where the client is configured to build a browser page, and the method for generating a PDF document includes:
s901: responding to a content printing operation aiming at a first page, sending a plurality of first printing requests with a time sequence relation to a second page, and generating PDF pages corresponding to document contents carried by the first printing requests by using the second page to respond to the first printing requests in turn; the first page and the second page are established with two-way communication connection;
s902: and transmitting a second print request to the second page in response to a document generation operation for the print instruction page, so that the second page generates PDF documents in the generated order of the generated PDF pages in response to the second print request.
Optionally, before the sending, in response to the content printing operation for the first page, a plurality of first printing requests with a timing relationship to the second page, the method further includes:
and responding to page call operation for the first page, establishing the second page in the client, and establishing the bidirectional communication connection with the second page.
Optionally, the establishing the second page in the client and the bidirectional communication connection with the second page includes:
establishing a page loaded with a PDF generating tool in the client as the second page;
and establishing the bidirectional communication connection with the second page based on a bidirectional communication protocol.
The PDF document generating method provided by the present embodiment belongs to the same application concept as the PDF document generating apparatus provided by the above embodiments of the present specification. Technical details not described in detail in this embodiment may refer to specific processing contents of the PDF document generating apparatus provided in the foregoing embodiments of the present specification, and are not described herein again.
Example electronic devices, storage media, and software
An embodiment of the present disclosure further provides an electronic device, referring to fig. 10, and an exemplary embodiment of the present disclosure further provides an electronic device, including: a memory storing a computer program, and a processor that executes steps in the PDF document generation method according to the various embodiments of the present specification described in the above embodiments of the present specification when executing the computer program.
The internal structure of the electronic device may be as shown in fig. 10, and the electronic device includes a processor, a memory, a network interface, and an input device connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the central control device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, performs the steps in the method for generating a PDF document according to the various embodiments of the present specification described in the above embodiments of the present specification.
The processor may include a host processor, and may also include a baseband chip, modem, and the like.
The memory stores the computer program for executing the technical scheme of the invention, and can also store an operating system and other key programs. In particular, the computer program may comprise program code comprising computer operating instructions. More specifically, the memory may include read-only memory (ROM), other types of static storage devices that may store static information and instructions, random access memory (random access memory, RAM), other types of dynamic storage devices that may store information and instructions, disk storage, flash, and the like.
The processor may be a general-purpose processor, such as a general-purpose processor (CPU), microprocessor, or the like, or may be an application-specific integrated circuit (ASIC), or one or more integrated circuits, that control the execution of programs in accordance with aspects of the present invention. But may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The input device may include means for receiving data and information entered by a user, such as a keyboard, mouse, camera, scanner, light pen, voice input device, touch screen, pedometer or gravity sensor, etc.
The output device may include means, such as a display screen, printer, speakers, etc., that allow information to be output to the user.
The communication interface may include means, such as any transceiver, for communicating with other devices or communication networks, such as ethernet, radio Access Network (RAN), wireless Local Area Network (WLAN), etc.
The processor executes the computer program stored in the memory and invokes other devices, which can be used to implement the steps of any of the PDF document generating methods provided in the embodiments of the present application.
The electronic equipment can also comprise a display component and a voice component, wherein the display component can be a liquid crystal display screen or an electronic ink display screen, an input device of the electronic equipment can be a touch layer covered on the display component, can also be a key, a track ball or a touch pad arranged on a shell of the electronic equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely a block diagram of a portion of the structure associated with the present description and does not constitute a limitation of the electronic device to which the present description is applied, and that a particular electronic device may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
In addition to the methods and apparatus described above, the PDF document generation method provided by the embodiments of the present specification may be a computer program product comprising a computer program which, when executed by a processor, causes the processor to perform the steps in the PDF document generation method according to the various embodiments of the present specification described in the "exemplary method" section of the present specification.
The computer program product may write program code for performing the operations of embodiments of the present description in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device, partly on the remote electronic device, or entirely on the remote electronic device or server.
Further, the present specification embodiment also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to perform the steps in the PDF document generation method according to the various embodiments of the present specification described in the above-described "exemplary method" section of the present specification.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in this specification are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related country and region, and are provided with corresponding operation entries for the user to select authorization or rejection.
It will be appreciated that the specific examples herein are intended only to assist those skilled in the art in better understanding the embodiments of the present description and are not intended to limit the scope of the present description.
It should be understood that, in various embodiments of the present disclosure, the sequence number of each process does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
It will be appreciated that the various embodiments described in this specification may be implemented either alone or in combination, and are not limited in this regard.
Unless defined otherwise, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this specification belongs. The terminology used in the description is for the purpose of describing particular embodiments only and is not intended to limit the scope of the description. The term "and/or" as used in this specification includes any and all combinations of one or more of the associated listed items. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be appreciated that the processor of the embodiments of the present description may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method embodiments may be implemented by integrated logic circuits of hardware in a processor or instructions in software form. The processor may be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
It will be appreciated that the memory in the embodiments of this specification may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable ROM (EEPROM), or a flash memory, among others. The volatile memory may be Random Access Memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present specification.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system, apparatus and unit may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit in each embodiment of the present specification may be integrated into one processing unit, each unit may exist alone physically, or two or more units may be integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present specification may be essentially or portions contributing to the prior art or portions of the technical solutions may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present specification. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
The foregoing is merely specific embodiments of the present disclosure, but the scope of the disclosure is not limited thereto, and any person skilled in the art who is skilled in the art can easily think about variations or substitutions within the scope of the disclosure of the present disclosure, and it is intended to cover the variations or substitutions within the scope of the disclosure. Therefore, the protection scope of the present specification shall be subject to the protection scope of the claims.

Claims (11)

1. A PDF document generating device, which is applied to a client, where the client is configured to build a browser page, and the PDF document generating device includes: the system comprises a first page and a second page, wherein the first page and the second page are in bidirectional communication connection;
the first page is used for sending a plurality of first printing requests with a time sequence relationship to a second page in response to a content printing operation for the first page, and is used for sending a second printing request to the second page in response to a document generating operation for the printing instruction page;
the second page is used for sequentially responding to the first printing request, generating PDF pages corresponding to document contents carried by the first printing request, and generating PDF documents according to the generated PDF pages in the generation sequence in response to the second printing request.
2. The apparatus of claim 1, wherein the first page is further configured to establish the second page within the client and establish the bi-directional communication connection with the second page in response to a page call operation for the first page.
3. The apparatus of claim 2, wherein the first page establishes the second page within the client and establishes the bi-directional communication connection with the second page is specifically configured to:
establishing a page loaded with a PDF generating tool in the client as the second page;
and establishing the bidirectional communication connection with the second page based on a bidirectional communication protocol.
4. The apparatus of claim 3, wherein the first page establishes the bi-directional communication connection with the second page based on a bi-directional communication protocol, in particular for:
the first page sends a connection request message to the second page, wherein the connection request message is used for requesting to establish bidirectional communication connection with the second page;
after receiving a first confirmation message returned by the second page aiming at the connection request message, sending a second confirmation message to the second page; the first confirmation message is used for indicating the second page to receive the connection request message, and the second confirmation message is used for indicating the establishment of the bidirectional communication connection.
5. The apparatus of claim 1, wherein the second page is further used to preview the PDF page and/or the PDF document generated.
6. The apparatus of any of claims 1-5, wherein the second page comprises any of a new tabbed page within the client, an embedded page within a first page, and a pop-up page within the client.
7. The PDF document generation method is characterized by being applied to a client, wherein the client is used for establishing a browser page, and the PDF document generation method comprises the following steps:
responding to a content printing operation aiming at a first page, sending a plurality of first printing requests with a time sequence relation to a second page, and generating PDF pages corresponding to document contents carried by the first printing requests by using the second page to respond to the first printing requests in turn; the first page and the second page are established with two-way communication connection;
and transmitting a second print request to the second page in response to a document generation operation for the print instruction page, so that the second page generates PDF documents in the generated order of the generated PDF pages in response to the second print request.
8. The method of claim 7, wherein the sending a plurality of first print requests having a timing relationship to a second page in response to a content print operation for the first page further comprises:
and responding to page call operation for the first page, establishing the second page in the client, and establishing the bidirectional communication connection with the second page.
9. The method of claim 8, wherein the establishing the second page within the client and the bi-directional communication connection with the second page comprises:
establishing a page loaded with a PDF generating tool in the client as the second page;
and establishing the bidirectional communication connection with the second page based on a bidirectional communication protocol.
10. An electronic device, comprising: a processor and a memory;
wherein the memory is connected with the processor and is used for storing a computer program;
the processor is configured to implement the PDF document generating method according to any one of claims 7 to 9 by running a computer program stored in the memory.
11. A storage medium having stored thereon a computer program which, when executed by a processor, implements the method of generating a PDF document according to any one of claims 7 to 9.
CN202310281455.4A 2023-03-20 2023-03-20 PDF document generation device and method, electronic equipment and storage medium Pending CN116301678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310281455.4A CN116301678A (en) 2023-03-20 2023-03-20 PDF document generation device and method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310281455.4A CN116301678A (en) 2023-03-20 2023-03-20 PDF document generation device and method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116301678A true CN116301678A (en) 2023-06-23

Family

ID=86795657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310281455.4A Pending CN116301678A (en) 2023-03-20 2023-03-20 PDF document generation device and method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116301678A (en)

Similar Documents

Publication Publication Date Title
JP5901704B2 (en) Information processing apparatus, information processing method, and program
US10902193B2 (en) Automated generation of web forms using fillable electronic documents
US20030034991A1 (en) Method of constructing a composite image
US8804169B2 (en) Printing method, image forming apparatus, and web server
US20100014103A1 (en) Image forming apparatus, host apparatus, and method for printing out web page therewith
US20170168997A1 (en) System and computer-implemented method for incorporating an image into a page of content for transmission from a web-site
TWI448909B (en) A font file with graphic images
JP2016014920A (en) Information processing apparatus, processing method, and program
TWI409694B (en) Information display device
CN110989897B (en) Screenshot picture acquisition method and device, terminal device and storage medium
US20050198568A1 (en) Table display switching method, text data conversion program, and tag program
CN110674437A (en) Method and device for converting webpage data into PDF (Portable document Format) attachment
JP6360370B2 (en) Information processing apparatus, information processing method, and program
CN113642290A (en) Text typesetting method and device, electronic equipment and storage medium
KR20040088061A (en) Stylesheet uploading to manage terminal diversity
CN116578795A (en) Webpage generation method and device, storage medium and electronic equipment
CN116301678A (en) PDF document generation device and method, electronic equipment and storage medium
CN111428452A (en) Comment data storage method and device
CN114780888A (en) Webpage picture generation method and system, electronic equipment and storage medium
CN113703699B (en) Real-time output method and device for electronic file
JP2003296088A (en) Method for facilitating color adjustment of image data
JP2019016072A (en) Information processing apparatus and program
US20040205652A1 (en) System and method for producing business cards
CN116304425A (en) Electronic document previewing method and related device
TWI554894B (en) Online image editing system and operation method thereof

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