CN117648914A - File generation method and device and terminal equipment - Google Patents

File generation method and device and terminal equipment Download PDF

Info

Publication number
CN117648914A
CN117648914A CN202410126476.3A CN202410126476A CN117648914A CN 117648914 A CN117648914 A CN 117648914A CN 202410126476 A CN202410126476 A CN 202410126476A CN 117648914 A CN117648914 A CN 117648914A
Authority
CN
China
Prior art keywords
page
information
file
work order
generating
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.)
Granted
Application number
CN202410126476.3A
Other languages
Chinese (zh)
Other versions
CN117648914B (en
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.)
Shenzhen Yunji System Technology Co ltd
Original Assignee
Shenzhen Yunji System Technology Co 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 Shenzhen Yunji System Technology Co ltd filed Critical Shenzhen Yunji System Technology Co ltd
Priority to CN202410126476.3A priority Critical patent/CN117648914B/en
Publication of CN117648914A publication Critical patent/CN117648914A/en
Application granted granted Critical
Publication of CN117648914B publication Critical patent/CN117648914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The utility model discloses a file generation method, device and terminal equipment, through obtaining work order information and drawing file in the industry project, and according to work order information generation head page, and then draw with the page object that the head page corresponds in the drawing file, merge head page, page object, generate PDF file, and the PDF file that generates remains the page object in the drawing file, need not to turn into the picture with the file, can reduce the lower problem of picture precision that leads to the conversion because of turning into the picture with the file, and on the basis of need not turning into the picture with the file, also need not to turn into based on high resolution, can reduce the great problem of storage space that the picture that leads to because of high resolution conversion, reduce the time of reading the file, improved the work efficiency of industry project, satisfy the demand that improves the work efficiency of industry project.

Description

File generation method and device and terminal equipment
Technical Field
The application belongs to the technical field of industry, and particularly relates to a file generation method, device and terminal equipment.
Background
With the continuous progress of automation technology, the degree of automation and the automation scale in the industrial field are increased, and the industrial projects related to automation in the industrial field are increased, and with the increase of the industrial projects, a large amount of work order information and design drawings exist in the industrial projects, so that a large amount of work order information and design drawings need to be processed, and the working efficiency of the industrial projects is reduced. To accommodate an increasing number of industrial projects, it is desirable to increase the efficiency of the industrial project.
In order to improve the working efficiency of the industrial project, the related work order information and design drawings are digitally described and combined, so that the number of files to be processed can be reduced, and the working efficiency of the industrial project is improved. Typically, the design drawing is converted into a PDF file, and the work order information is added to the PDF file to complete the merging of the work order information and the design drawing.
In general, work order information may be added to a PDF file by directly editing the PDF. However, the PDF file is directly edited, and is converted into a picture, so that the processing list information is added to the picture, and the problem of lower picture precision exists in the process of converting the PDF file into the picture, and even if the picture is based on the high-resolution converted picture, the problem of lower picture precision can be solved, but the high-resolution converted picture needs a larger storage space, so that a longer time is needed for reading the high-resolution converted picture, the working efficiency of an industrial project is reduced, and the requirement for improving the working efficiency of the industrial project cannot be met.
Disclosure of Invention
The embodiment of the application provides a file generation method, device and terminal equipment, and aims to solve the problem that the picture accuracy is low due to the fact that a PDF file is converted into a picture and processing list information is added to the picture.
In a first aspect, an embodiment of the present application provides a method for generating a file, including:
acquiring work order information and drawing files in the industrial project;
generating a head page according to the work order information;
extracting a page object corresponding to the head page from the drawing file;
and merging the head page and the page object to generate a PDF file.
In a possible implementation manner of the first aspect, the generating a header page according to the work order information includes:
determining typesetting information of the work order information;
and generating a head page according to the typesetting information and the work order information.
In one possible implementation manner of the first aspect, the generating a header page according to the typesetting information and the work order information includes:
determining a display configuration of a display device, the display device being a device for displaying the industrial item;
generating an intermediate header page according to the display configuration;
and generating a target head page according to the middle head page, the typesetting information and the work order information.
In one possible implementation manner of the first aspect, the generating a target header page according to the intermediate header page, the typesetting information, and the work order information includes:
acquiring a preset font compression mode;
updating the work order information based on the font compression mode to obtain target work order information;
and generating a target head page according to the middle head page, the typesetting information and the target work order information.
In one possible implementation manner of the first aspect, the extracting, from the drawing file, a page object corresponding to the header page includes:
extracting a page object corresponding to the head page from the drawing file, and determining editing operation corresponding to the page object;
and executing the editing operation on the page object to generate a target page object.
In a possible implementation manner of the first aspect, before the performing the editing operation on the page object and generating a target page object, the method includes:
identifying object information in the page object;
and when the object information comprises annotation information, converting the annotation information into built-in information of the page object, marking the annotation information as binding annotation of the page object, and obtaining a processed intermediate page object so as to execute the editing operation on the page object based on the intermediate page object to generate a target page object.
In one possible implementation manner of the first aspect, the merging the header page and the page object to generate a PDF file includes:
determining the proportion information of the page object relative to the head page;
based on the proportion information, adjusting the size information of the page object to obtain an adaptation page object;
and merging the head page and the adaptation page object to generate a PDF file.
In a second aspect, an apparatus for generating a file provided in an embodiment of the present application includes:
the acquisition module is used for acquiring the work order information and the drawing file in the industrial project;
the generating module is used for generating a head page according to the work order information;
the extraction module is used for extracting a page object corresponding to the head page from the drawing file;
and the merging module is used for merging the head page and the page object to generate a PDF file.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method for generating a file provided in the first aspect when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, which when executed by a processor implements the method for generating a file as provided in the first aspect above.
It will be appreciated that the advantages of the second to fourth aspects may be found in the relevant description of the first aspect and are not repeated here.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
according to the embodiment of the invention, the header page is generated by acquiring the work order information and the drawing file in the industrial project and according to the work order information, further the page object corresponding to the header page is extracted from the drawing file, the header page and the page object are combined to generate the PDF file, the generated PDF file retains the page object in the drawing file, the problem that the converted picture precision is lower due to the fact that the file is converted into the picture is solved, the problem that the converted picture is not required to be converted due to the fact that the file is converted into the picture is solved, the problem that the storage space is larger due to the fact that the file is converted based on high resolution is solved, the time for reading the file is shortened, the working efficiency of the industrial project is improved, and the requirement for improving the working efficiency of the industrial project is met.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for generating a file according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of another method for generating a file according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a header page according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a document generating device according to an embodiment of the present application;
fig. 5 is a block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved by the present application more clear, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Referring to fig. 1, fig. 1 shows a step flowchart of a file generating method according to an embodiment of the present invention, which specifically includes the following steps:
and step 101, acquiring work order information and drawing files in the industrial project.
Among them, the industrial project may be a project related to various projects in the industrial field, which may include an infrastructure project for industrial production, a maintenance/update project of equipment related to industrial production, a technical improvement project related to industrial production technology, and the like. The work order information may be a basis for executing various work plans in an industrial project, the work plans may be production-related plans in the industrial field, the work plans may include a production work plan, a maintenance work plan, and the like, the work order information may include one or more product-related information, and the work order information may include product information, engineering information, picture information, process information, and the like. The drawing file may be an industrial drawing generated in the implementation process of the industrial project, the industrial drawing may include a circuit schematic, a part drawing, an assembly drawing, and the like, the drawing file may be a graphic file that graphically represents the drawing, such as a DWG file, and the drawing file may include graphic information for displaying the drawing.
Specifically, the product information may be information of a product produced by an industrial project, and the product information may include product name information, product number information, product specification information, product code information, and the like of the product. The project information may be information related to the industrial project, the project information may include project code information, project name information, project date information, the project date information may include a date when the industrial project was started, a date when the industrial project was accepted, and the like. The picture information may be a picture related to the product, and the picture information may include picture information for describing a shape of the product, a schematic diagram for describing a structure of the product, a two-dimensional code picture/bar code picture related to the product, and the like. The process information may be a process involved in the operation plan, and the process information may include process route information, process detail information, and the like.
When the need for processing documents in an industrial project is detected, the work order information and the drawing documents in at least one industrial project can be acquired through communication connection with one or more industrial projects.
In a specific implementation, each industrial project in the industrial field can be connected in a communication way, so that for each industrial project in the industrial field, whether the related work order information and the design drawing are digitally described and combined in the industrial project or not can be detected in real time, namely whether the file processing requirement in the industrial project exists or not is detected, and when the file processing requirement in the industrial project is detected, the work order information and the drawing file required by the file processing of the industrial project in other industrial projects can be acquired by communicating with other industrial projects except the industrial project in the industrial field. And 102, generating a head page according to the work order information.
The header page may be a page file generated in a structured file format, and may include page information and structure information. The page information may be information related to displaying the page. The page information may be recorded through an object list, the object list may be used to record attribute information of at least one head object in the head page, the head object may include a text object, a picture object, etc., the attribute information may include text attribute information of the text object, picture attribute information of the picture object, the text attribute information may include information of font type, size, color, symbol, etc. of the text, and the picture attribute information may include information of pixels of the picture object, arrangement order of pixels, color, etc. The structure information may be represented as a hierarchical structure of the header page.
After the work order information is obtained, a blank head page can be generated according to a preset page format.
Specifically, the blank header page may be a page file generated in a structured file format, and no other information is recorded in the blank header page except the basic information.
After the blank head page is obtained, the work order information can be written into an object list of the blank head page to obtain the head page.
In practical application, a blank head page corresponding to each industrial item can be generated, and further, the work order information related to the industrial item can be written into an object list of the blank head page; the blank head page corresponding to each operation plan in the industrial project can be generated, and the work order information related to the operation plan can be written into the object list of the blank head page.
And step 103, extracting a page object corresponding to the head page from the drawing file.
The page object may be an object in a drawing file.
After the header page is determined, a target drawing file corresponding to the header page can be determined from all drawing files.
In practical application, the engineering coding information in the header page can be determined, and the industrial project corresponding to the engineering coding information is determined, so that the drawing file related to the industrial project can be determined from all drawing files to be the target drawing file; the process route information in the header page can be determined, and further, drawing files related to the process route information can be determined from all drawing files to be target drawing files; product information in the header page can be determined, and further, drawing files related to the product can be determined from all drawing files to be target drawing files.
Specifically, the determining range of the target drawing file may be set by a user, and the determining range may include a product range, an engineering range, a process range, and the like.
For example, when the determination range set by the user is the engineering range, the engineering information in the header page can be determined based on the engineering range to determine that the drawing file related to the industrial project is the target drawing file from all the drawing files, and then the drawing files can be divided according to different industrial projects; for another example, when the determination range set by the user is the product range, the product information in the header page can be determined based on the product range to determine that the drawing file related to the product is the target drawing file from all the drawing files, so that the drawing files can be divided according to different products.
And after the target drawing file is obtained, the target drawing file can be converted into a PDF file, and then page objects in the PDF file can be extracted.
In practical application, a PDF file generated in a structured file format can be adopted, graphic information in a target drawing file is written into an object list of the PDF file, and then page objects in the PDF file can be determined by reading the object list of the PDF file.
In an embodiment of the present application, step 103 may include steps 1031 to 1032:
step 1031, extracting a page object corresponding to the head page from the drawing file, and determining an editing operation corresponding to the page object.
The editing operation may include a rotation operation and a flipping operation.
After the head page is determined, the page object corresponding to the head page can be extracted from the drawing file, the page layout of each page object can be identified, the page layout of each page object is matched with the preset template page layout, when the fact that the page layout of the page object is not matched with the template page layout is detected, editing operation required by the page layout of the page object is determined, and when the fact that the page layout of the page object is matched with the template page layout is detected, editing operation required by the page layout of the page object is determined.
Specifically, the template page layout may be preset by a user based on personal needs, or may be set based on the use of various drawings in industrial projects, and the use of drawings may include the use of references cited in various industrial projects, the use of displays shown in various industrial projects, and the use of prints printed into paper documents for handover or delivery or backup in various industrial projects.
In practical applications, a template page layout corresponding to the application of the drawing may be set in advance based on various applications of the drawing. For example, based on the application displayed in various industrial projects, a template page layout convenient for display can be set, typically, drawing display can be in the form of PPT, video, etc., and further, the template page layout can be set based on the configuration of PPT generation or video generation, that is, the template page layout corresponding to the display application; based on the purpose of printing the paper document, a template page layout convenient for printing can be set, and in general, a printing configuration in a printing apparatus for printing the paper document can be acquired, and then the template page layout can be generated based on the printing configuration, that is, the template page layout corresponding to the printing purpose.
In a specific implementation, the target page layout can be determined from all preset template page layouts, and the target page layout can be determined based on the purpose of the target drawing file or based on the requirement of a user.
Step 1032, performing editing operation on the page object to generate a target page object.
After the editing operation is determined, operations such as rotation and turning can be sequentially performed on the page object needing to perform the editing operation according to the editing operation, so as to generate a target page object.
In practical application, the page layout of all page objects can be matched with the target page layout by editing the page objects needing to execute editing operation, so that the requirements of users or the purposes of the target drawing file can be met.
For example, when the purpose of the target drawing file is printing, the page object to be edited can be edited, so that the page layout of all the page objects is matched with the template page layout corresponding to the printing purpose, that is, the page layout of all the page objects accords with the printing configuration in the printing equipment, and therefore all the page objects can be conveniently printed into the paper file, and the printing efficiency of the printed paper file and the quality of the printed paper file are improved.
For another example, when the purpose of the target drawing file is the display purpose, the page layout of all the page objects can be matched with the template page layout corresponding to the display purpose by editing the page objects needing to be edited, so that the display file for displaying the drawing, such as a PPT or a video, can be conveniently generated by all the page objects, and the efficiency of generating the display file and the display effect of the display drawing are improved.
In an embodiment of the present application, before performing the editing operation on the page object and generating the target page object, the method may further include the following steps:
identifying object information in the page object, converting the annotation information into built-in information of the page object when the object information comprises the annotation information, marking the annotation information as binding annotation of the page object, and obtaining a processed intermediate page object so as to execute editing operation on the page object based on the intermediate page object and generate a target page object.
The object information may include text information, picture information, and logical structure information.
After the editing operation is determined, whether the logical structure information in the page object contains annotation information can be identified, and when the annotation information is identified to be contained, the annotation information can be converted into built-in information of the page object, and the annotation information is marked as binding annotation of the page object, so that the processed intermediate page object is obtained.
And 104, merging the head page and the page object to generate a PDF file.
After the head page and the page object are obtained, the head page and the page object can be combined to generate a PDF file.
In practical application, a blank PDF page can be generated, the display position of the head page in the blank PDF page is determined, the display position of the page object in the blank PDF page is determined, the object information in the head page and the page object can be written into the blank PDF page, and then the display position of the head page and the display position of the page object are written into the blank PDF page, so that the combination of the head page and the page object is completed, and a PDF file is generated.
In a specific implementation, since one or more products may be included in the industrial project, PDF files corresponding to each product may be generated based on the work order information corresponding to each product, so that PDF files corresponding to all products in the industrial project may be obtained, and PDF files corresponding to all products in the industrial project may be combined to obtain a PDF document for describing the industrial project.
In an embodiment of the present application, step 104 may include steps 1041 to 1043:
in step 1041, the proportion information of the page object with respect to the head page is determined.
The ratio information may be width ratio information between a width of the page object and a width of the head page.
After the head page and the page object are obtained, width ratio information between the width of the page object and the width of the head page can be determined.
Step 1042, adjusting the size information of the page object based on the scale information to obtain the adapted page object.
The size information may include a width and a height of the page object, and the adapting page object may be a page object adapted to the size information of the head page.
After the proportion information is determined, the width and the height of the page object can be adjusted according to the proportion information, and the page object which is matched with the size information of the head page is obtained, namely the matched page object.
In step 1043, the header page and the adaptation page are combined to generate a PDF file.
After the head page and the page object are obtained, the head page and the adapting page object can be combined to generate a PDF file.
According to the embodiment of the invention, the header page is generated by acquiring the work order information and the drawing file in the industrial project and according to the work order information, further the page object corresponding to the header page is extracted from the drawing file, the header page and the page object are combined to generate the PDF file, the generated PDF file retains the page object in the drawing file, the problem that the converted picture precision is lower due to the fact that the file is converted into the picture is solved, the problem that the converted picture is not required to be converted due to the fact that the file is converted into the picture is solved, the problem that the storage space is larger due to the fact that the file is converted based on high resolution is solved, the time for reading the file is shortened, the working efficiency of the industrial project is improved, and the requirement for improving the working efficiency of the industrial project is met.
Referring to fig. 2, fig. 2 shows a flowchart of steps of a method for generating a file according to another embodiment of the present invention, which may specifically include the following steps:
step 201, acquiring work order information and drawing files in an industrial project.
For a description of step 201, please refer to the description of step 101, and the detailed description is not repeated.
Step 202, determining typesetting information of the work order information.
The layout information may be layout information of a visual page, the visual page may be a page file for display, such as a header page, a PDF file, etc., the layout information may include position information of various information in the visual page, and the layout information of the work order information may include layout information of various information in the work order information, such as layout information of product information, layout information of engineering information, layout information of picture information, layout information of process information, etc.
After the work order information is acquired, product information, engineering information, picture information and process information in the work order information can be determined, and the association relationship among the product information, the engineering information, the picture information and the process information is determined, so that typesetting information of various information in the work order information, such as typesetting information of the product information, typesetting information of the process information and the like, can be determined based on the association relationship among the product information, the engineering information, the picture information and the process information.
In practical application, path information of various information in the work order information in an industrial project can be determined, so that nesting relation of various information in the work order information can be determined according to the path information, and typesetting information of various information in the work order information can be determined according to the nesting relation of various information in the work order information.
For example, the industrial project a may include a job plan a, where the job plan a may be a job plan for producing the product a1, and the path information of the product a1 may be determined as follows: the industrial project A, the operation plan a and the product a1, a first layer nesting relation that the work order information related to the operation plan a is nested in the work order information related to the industrial project A and a second layer nesting relation that the work order information related to the product a1 is nested in the work order information related to the operation plan a can be determined, and the typesetting information of the work order information related to the product a1, the work order information related to the operation plan a and the work order information related to the industrial project A can be determined based on the first layer nesting relation and the second layer nesting relation.
And 203, generating a head page according to the typesetting information and the work order information.
After the typesetting information is obtained, a blank head page can be generated according to a preset page format, and the work order information is written into an object list of the blank head page according to the typesetting information, so that the head page is obtained.
Referring to fig. 3, fig. 3 shows a schematic diagram of a header page according to an embodiment of the present invention, where, as shown in fig. 3, a work order number may be represented as engineering code information, a product code may be represented as product code information, a specification model may be represented as product specification information, an order date may be represented as a date of acceptance of an industrial item, a product name may be represented as product name information, a product number may be represented as product number information, a process route may be represented as process route information, and a picture a may be represented as a two-dimensional code picture related to a product.
In an embodiment of the present application, step 203 may include steps 2031 to 2033:
in step 2031, a display configuration of a display device is determined.
Wherein the display device may be a device for displaying industrial items, and the display configuration may be a configuration of the display device for displaying images, such as a refresh rate of the display device, a resolution of the display device, and the like.
After the typesetting information is obtained, the display configuration of the display device can be obtained through communication connection with the display device.
In practical applications, one or more devices for displaying the industrial project may be included in the industrial project, and further, based on the work order information, the purpose of the generated head page may be determined, a target display device related to the purpose of the head page may be determined from all display devices of the industrial project, and a display configuration of the target display device may be acquired.
Specifically, the use of the header page may be consistent with the use of the drawing document, such as printing use, display use, and the like.
In step 2032, an intermediate header page is generated according to the display configuration.
The intermediate header page may be a blank header page generated according to a display configuration.
After the display configuration is obtained, an intermediate header page may be generated according to the resolution in the display configuration.
In practical applications, the height and width of the middle header page may be determined based on the resolution of the target device and a preset display scale. For example, the resolution of the target device may be 1280 x 1024 and the display scale may be 1.2, then the height of the middle header page may be 1280 times 1.2 and the width 1024 times 1.2, and then the middle header page may be generated based on the determined height and width.
Step 2033, generating a target header page according to the intermediate header page, the typesetting information and the work order information.
After the middle head page is obtained, the work order information can be written into an object list of the middle head page according to typesetting information to obtain a target head page.
In an embodiment of the present application, step 2033 may specifically include the following steps:
and acquiring a preset font compression mode, updating the work order information based on the font compression mode to obtain target work order information, and generating an intermediate head page according to the typesetting information and the target work order information.
The font compression mode can be used for compressing the storage space of the fonts, and the font compression mode can comprise compression modes such as font format replacement and font subset compression.
After the intermediate head page is obtained, a preset font compression mode can be obtained, font compression is carried out on the work order information in the font compression mode, compressed target work order information is obtained, and then the target work order information can be written into an object list of the intermediate head page according to typesetting information, so that the target head page is obtained.
In an embodiment of the present invention, the font compression method may also be used to perform font compression on the PDF file.
And 204, extracting a page object corresponding to the head page from the drawing file.
And 205, merging the head page and the page object to generate a PDF file.
For the description of step 204 to step 205, please refer to the description of step 103 to step 104, and the detailed description is not repeated.
According to the embodiment of the invention, the typesetting information of the work order information is determined by acquiring the work order information and the drawing file in the industrial project, the header page is generated according to the typesetting information and the work order information, the page object corresponding to the header page is extracted from the drawing file, the header page and the page object are combined, the PDF file is generated, the page object in the drawing file is reserved by the generated PDF file, the problem that the converted picture precision is lower due to the fact that the file is converted into the picture is not required to be solved, the problem that the storage space is larger due to the fact that the file is converted into the picture is not required to be solved on the basis that the file is not required to be converted into the picture, the time for reading the file is reduced, the working efficiency of the industrial project is improved, and the requirement for improving the working efficiency of the industrial project is met.
Referring to fig. 4, fig. 4 shows a schematic structural diagram of a file generating apparatus according to an embodiment of the present invention, which may specifically include the following modules:
the acquisition module 401 is used for acquiring work order information and drawing files in industrial projects;
a generating module 402, configured to generate a header page according to the work order information;
an extracting module 403, configured to extract a page object corresponding to the header page from the drawing file;
and the merging module 404 is used for merging the head page and the page object to generate a PDF file.
In one implementation, the generating module 402 may specifically be configured to:
determining typesetting information of the work order information;
and generating a head page according to the typesetting information and the work order information.
In one implementation, the generating module 402 may specifically be configured to:
determining a display configuration of a display device, the display device being a device for displaying an industrial item;
generating an intermediate header page according to the display configuration;
and generating a target head page according to the intermediate head page, the typesetting information and the work order information.
In one implementation, the generating module 402 may specifically be configured to:
acquiring a preset font compression mode;
updating the work order information based on the font compression mode to obtain target work order information;
and generating a target head page according to the intermediate head page, the typesetting information and the target work order information.
In one implementation, the extracting module 403 may specifically be configured to:
extracting a page object corresponding to the head page from the drawing file, and determining editing operation corresponding to the page object;
and executing editing operation on the page object to generate a target page object.
In one implementation, the apparatus may further include an identification module 405.
The identifying module 405 may be configured to identify object information in a page object before performing an editing operation on the page object to generate a target page object;
and when the object information comprises annotation information, converting the annotation information into built-in information of the page object, marking the annotation information as binding annotation of the page object, and obtaining a processed intermediate page object so as to execute editing operation on the page object based on the intermediate page object and generate a target page object.
In one implementation, the merging module 404 may be specifically configured to:
determining the proportion information of the page object relative to the head page;
based on the proportion information, adjusting the size information of the page object to obtain an adaptation page object;
and merging the head page and the adaptation page, and generating a PDF file.
According to the embodiment of the invention, the header page is generated by acquiring the work order information and the drawing file in the industrial project and according to the work order information, further the page object corresponding to the header page is extracted from the drawing file, the header page and the page object are combined to generate the PDF file, the generated PDF file retains the page object in the drawing file, the problem that the converted picture precision is lower due to the fact that the file is converted into the picture is solved, the problem that the converted picture is not required to be converted due to the fact that the file is converted into the picture is solved, the problem that the storage space is larger due to the fact that the file is converted based on high resolution is solved, the time for reading the file is shortened, the working efficiency of the industrial project is improved, and the requirement for improving the working efficiency of the industrial project is met.
It should be noted that, because the content of information interaction and execution process between the devices is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Referring to fig. 5, fig. 5 shows a block diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 5, the embodiment of the present application further provides a terminal device, where the terminal device 51 includes: at least one processor 511, a memory 512 and a computer program 5121 stored in the memory 512 and executable on the at least one processor 511, the processor 511 implementing the steps of any of the various method embodiments described above when executing the computer program 5121.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps of any of the method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, randomAccess Memory), electrical carrier signal, telecommunications signal, and software distribution medium.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of generating a file, the method being applied to an industrial project, the method comprising:
acquiring work order information and drawing files in the industrial project;
generating a head page according to the work order information;
extracting a page object corresponding to the head page from the drawing file;
and merging the head page and the page object to generate a PDF file.
2. The method for generating a file according to claim 1, wherein said generating a header page from said work order information comprises:
determining typesetting information of the work order information;
and generating a head page according to the typesetting information and the work order information.
3. The method for generating a file according to claim 2, wherein said generating a header page based on said typesetting information and said work order information comprises:
determining a display configuration of a display device, the display device being a device for displaying the industrial item;
generating an intermediate header page according to the display configuration;
and generating a target head page according to the middle head page, the typesetting information and the work order information.
4. The method for generating a document according to claim 3, wherein said generating a target header page based on said intermediate header page, said layout information, and said work order information comprises:
acquiring a preset font compression mode;
updating the work order information based on the font compression mode to obtain target work order information;
and generating a target head page according to the middle head page, the typesetting information and the target work order information.
5. The method for generating a document according to any one of claims 1 to 4, wherein the extracting, from the drawing document, a page object corresponding to the header page includes:
extracting a page object corresponding to the head page from the drawing file, and determining editing operation corresponding to the page object;
and executing the editing operation on the page object to generate a target page object.
6. The method of generating a file according to claim 5, wherein before said editing operation is performed on said page object to generate a target page object, said method comprises:
identifying object information in the page object;
and when the object information comprises annotation information, converting the annotation information into built-in information of the page object, marking the annotation information as binding annotation of the page object, and obtaining a processed intermediate page object so as to execute the editing operation on the page object based on the intermediate page object to generate a target page object.
7. The method for generating a file according to claim 1, wherein the merging the header page and the page object to generate the PDF file comprises:
determining the proportion information of the page object relative to the head page;
based on the proportion information, adjusting the size information of the page object to obtain an adaptation page object;
and merging the head page and the adaptation page object to generate a PDF file.
8. A document generating apparatus, comprising:
the acquisition module is used for acquiring the work order information and the drawing file in the industrial project;
the generating module is used for generating a head page according to the work order information;
the extraction module is used for extracting a page object corresponding to the head page from the drawing file;
and the merging module is used for merging the head page and the page object to generate a PDF file.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202410126476.3A 2024-01-30 2024-01-30 File generation method and device and terminal equipment Active CN117648914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410126476.3A CN117648914B (en) 2024-01-30 2024-01-30 File generation method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410126476.3A CN117648914B (en) 2024-01-30 2024-01-30 File generation method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN117648914A true CN117648914A (en) 2024-03-05
CN117648914B CN117648914B (en) 2024-05-17

Family

ID=90046458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410126476.3A Active CN117648914B (en) 2024-01-30 2024-01-30 File generation method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN117648914B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040143794A1 (en) * 2002-12-24 2004-07-22 Konica Minolta Business Technologies, Inc. Image forming device, image forming program, computer readable recording medium on which the program is recorded, and image forming method
CN102467585A (en) * 2010-11-05 2012-05-23 江西金格网络科技有限责任公司 Electronic signature, verification and revocation method of DWG document
CN111639287A (en) * 2020-04-29 2020-09-08 深圳壹账通智能科技有限公司 Page processing method and device, terminal equipment and readable storage medium
CN112036149A (en) * 2020-09-01 2020-12-04 珠海豹趣科技有限公司 File editing method and device, electronic equipment and storage medium
CN114240186A (en) * 2021-12-20 2022-03-25 北京数码大方科技股份有限公司 Work order generation method and generation device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040143794A1 (en) * 2002-12-24 2004-07-22 Konica Minolta Business Technologies, Inc. Image forming device, image forming program, computer readable recording medium on which the program is recorded, and image forming method
CN102467585A (en) * 2010-11-05 2012-05-23 江西金格网络科技有限责任公司 Electronic signature, verification and revocation method of DWG document
CN111639287A (en) * 2020-04-29 2020-09-08 深圳壹账通智能科技有限公司 Page processing method and device, terminal equipment and readable storage medium
CN112036149A (en) * 2020-09-01 2020-12-04 珠海豹趣科技有限公司 File editing method and device, electronic equipment and storage medium
CN114240186A (en) * 2021-12-20 2022-03-25 北京数码大方科技股份有限公司 Work order generation method and generation device and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张宗科: "船舶设计中大批量图纸文件有关信息的自动提取", 船舶, vol. 22, no. 4, 31 August 2011 (2011-08-31), pages 65 - 69 *
张维成 等: "遥感和GIS技术在铁路工程建设中应用", 川藏铁路工程建造技术研讨会论文集, 17 April 2019 (2019-04-17), pages 56 - 64 *

Also Published As

Publication number Publication date
CN117648914B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
US5404294A (en) Tag method for moving information between computers & forms
CN101441713B (en) Optical character recognition method and apparatus of PDF document
CN103177709B (en) Method and device for displaying characters
US8386943B2 (en) Method for query based on layout information
CN112330532A (en) Image analysis processing method and equipment
CN106776994B (en) Application method and system of engineering symbols in engineering report forms and web pages
CN117931106B (en) Cloud printer data processing method and related device based on edge computing
CN112199929A (en) Form processing method and device, storage medium and electronic equipment
CN110211484B (en) Electronic price tag display method, system, server and storage medium
CN109726369A (en) A kind of intelligent template questions record Implementation Technology based on normative document
CN117648914B (en) File generation method and device and terminal equipment
CN112417826B (en) PDF online editing method and device, electronic equipment and readable storage medium
CN102467490B (en) Font data processing method and device
CN111538700A (en) Method for publishing CAD file into electronic map
CN103488619B (en) Method and device for processing document file
CN115761049A (en) Automatic picture marking method, device, equipment and storage medium
JPH0725068A (en) Character generating method and device thereof
CN103186513B (en) A kind of method of document format conversion and device
JP2019148846A (en) Information processing apparatus, information processing method and program
CN114861595A (en) Vector line transformation-based individual font generation method
US10606928B2 (en) Assistive technology for the impaired
CN104461406A (en) Printout method and device
CN113703699B (en) Real-time output method and device for electronic file
CN101571882A (en) System and method for generating minimum outline of characters
CN111967069A (en) Automatic flower writing system and automatic flower writing method

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