Method for converting PDF file into HTML embedded picture and computer equipment

A file conversion and file technology, applied in the field of PDF web page display, can solve the problems of high traffic consumption and long loading time.

CN112818273APending Publication Date: 2021-05-18SHENZHEN SEKORM COMPONENT NETWORK CO LTD
5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2021-05-18

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to a method for converting a PDF file into an HTML embedded picture and computer equipment. The method comprises the steps: S1, receiving a PDF file, converting the PDF file into a single HTML file and a plurality of font files, wherein the HTML file comprises the screenshot of each page of in the PDF file, and each font file comprises one font in the PDF file; S2, after the HTML file is analyzed, extracting a CSS file, a JavaScript file and a plurality of HTML sub-files, wherein each HTML sub-file comprises the screenshot of a page of a PDF file, and deleting all font files; and S3, storing the CSS file, the JavaScript file and all the HTML sub-files. According to the method, each HTML sub-file comprises picture of one page of the PDF file, page-by-page loading display of the PDF file is realized, the loading speed is ensured, the user traffic is saved, messy codes can be avoided, and the display quality is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present invention relates to the field of displaying PDF web pages, and more specifically relates to a method and computer equipment for converting a PDF file into an HTML embedded image. Background technique

[0002] Some website materials already exist in the form of PDF (Portable Document Format) files, and users use browsers to access PDF files. In the prior art, browsers mainly use two methods to load PDF files:

[0003] One way is to use the PDF plug-in to download the PDF file directly. This method requires the browser to download the PDF plug-in, and needs to download the entire PDF file. If the PDF file is too large, it will consume too much traffic and take too long to load.

[0004] Another way is that the server converts the PDF file into an HTML file, and the browser loads the HTML file. In this way, the entire PDF file needs to be loaded. If the PDF file is too large, it will consume too much traffic and take too long to load. C...

Examples

Embodiment Construction

[0034] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation manners of the present invention will now be described in detail with reference to the accompanying drawings.

[0035] In a preferred embodiment, refer to figure 1 The method for converting the PDF file of the present embodiment into an HTML embedded image comprises the following steps:

[0036] S1. Receive a PDF file, convert the PDF file into a single HTML file and multiple font files, the HTML file includes screenshots of each page in the PDF file, and each font file includes a type of font in the PDF file. Specifically, the server receives the PDF file, uses a preset command to convert the PDF file, and converts the PDF file into a single HTML file and multiple font files. For the preset command used in the conversion process, reference may be made to the prior art. The converted HTML file contains screenshots of each page i...