Unlock instant, AI-driven research and patent intelligence for your innovation.

PDF file font compression method and device and electronic device

A compression method and font technology, which is applied in the direction of electronic digital data processing, digital data information retrieval, special data processing applications, etc., can solve the problems of large memory space, occupation, and inability to embed font list compression, etc., to save size and reduce The effect of small memory usage

Pending Publication Date: 2019-06-07
WONDERSHARE TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the prior art, the image compression technology is generally used to compress the images inside the PDF file to a specified size, but the image compression technology can only compress the image content of the PDF file, and cannot compress the embedded font list. The PDF file cannot be compressed to a small enough size and still occupies a large memory space

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
  • PDF file font compression method and device and electronic device
  • PDF file font compression method and device and electronic device
  • PDF file font compression method and device and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0051] This embodiment provides a font compression method for PDF files, such as figure 1 Shown is the flowchart of the font compression method for PDF files, the method includes:

[0052] Step S102: Obtain an embedded font list and text content of the file to be compressed.

[0053] Generally, after the user edits any PDF file, there will be an embedded font list and text content in the PDF file, the embedded font list records multiple embedded fonts, and the text content records multiple text objects, and Each text object uniquely corresponds to an embedded font.

[0054] It is understandable that public fonts and embedded fonts are stored in the file to be compressed. Generally, when the font list in the font in the file to be compressed uploaded by web users is compressed, generally only the embedded font list can be compressed. The public font list cannot be compressed. Public fonts and embedded fonts are stored in the file to be compressed according to different encoding prin...

Embodiment 2

[0082] Corresponding to the foregoing method embodiments, this embodiment provides a font compression device for PDF files, as shown in Figure 3, the device includes:

[0083] The acquiring module 31 is configured to acquire the embedded font list and text content of the file to be compressed; the embedded font list records multiple embedded fonts; and the text content records multiple text objects.

[0084] The first extraction module 32 is configured to extract the text object and the embedded font corresponding to the text object from the text content according to the association relationship between each embedded font and each text object And the first character set corresponding to the embedded font.

[0085] The second extraction module 33 is configured to extract a second set of characters corresponding to the embedded font from the list of embedded fonts.

[0086] The comparison module 34 is configured to compare the first character set and the second character set, and obtain...

Embodiment 3

[0099] The embodiment of the present invention provides an electronic device, such as Figure 4 As shown, the electronic device includes: a memory 41 and a processor 42, where a computer program that can run on the processor 42 is stored in the memory 41, and the processor executes the computer program to implement the steps provided by the photo filing method of the power transmission line device.

[0100] Such as Figure 4 As shown, the device further includes a bus 43 and a communication interface 44. The processor 42, the communication interface 44, and the memory 41 are connected through the bus 43; the processor 42 is configured to execute executable modules stored in the memory 41, such as a computer program.

[0101] The memory 41 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The communication connection between the system network element an...

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 PDF file font compression method and device and an electronic device, and belongs to the technical field of file compression processing. The embodiment of the invention provides a font compression method of a PDF file. Device and electronic device. The method comprises the following steps of: compressing an embedded font in a to-be-compressed file; obtaining an embedded font list and text contents of the to-be-compressed file, according to the incidence relation between each embedded font and each text object, obtaining the text object, extracting a text object from the text content, wherein the text object corresponds to an embedded font and a first character set corresponding to the embedded font; extracting a second character set corresponding to the embedded fonts from the embedded font list; and comparing the first character set with the second character set to obtain a comparison result, and executing a corresponding compression operation according to thecomparison result, so that the server deletes redundant characters in the embedded font list in the to-be-compressed file according to the comparison result, thereby reducing the memory occupied by the embedded font list and saving the size of the to-be-compressed file.

Description

Technical field [0001] The present invention relates to the technical field of file compression processing, and in particular to a font compression method, device and electronic equipment for PDF files. Background technique [0002] With the development of the Internet, electronic documents are becoming more and more popular with users, especially PDF (Portable Document Format) files. When users use PDF files, they sometimes need to upload PDF documents to web pages for online task processing. However, the size of the PDF files that are allowed to upload on the web page is limited and needs to be compressed to a specified size before uploading. [0003] In the prior art, the picture compression technology is generally used to compress the pictures inside the PDF file to a specified size, but the picture compression technology can only compress the picture content of the PDF file, and cannot compress the embedded font list. PDF files cannot be compressed to a small enough size and ...

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
IPC IPC(8): G06F17/21G06F17/22G06F16/174
Inventor 晏检平
Owner WONDERSHARE TECH CO LTD