Method, system and storage medium for converting PDF document into DXF document

文档序号:763056 发布日期:2021-04-06 浏览:7次 中文

阅读说明:本技术 Pdf文档转成dxf文档的方法、系统及存储介质 (Method, system and storage medium for converting PDF document into DXF document ) 是由 曾凡鹏 于 2020-12-09 设计创作,主要内容包括:本申请公开了一种PDF文档转成DXF文档的方法、系统及存储介质,方法包括:获取PDF文档的页面元素信息,页面元素信息包括曲线元素信息;根据曲线元素信息,分析计算出曲线元素的参数特性;将曲线元素信息解析成DXF文档的曲线特性参数;将曲线特性参数写入新创建的DXF空白文档,生成DXF文档。系统包括:至少一个存储器、至少一个处理器及至少一个程序指令,程序指令存储在存储器上并可在处理器上运行,处理器用于执行本申请的PDF文档转成DXF文档的方法。存储介质上存储有程序指令,程序指令用于执行本申请的PDF文档转成DXF文档的方法。有效解决了PDF文档转成DXF文档后曲线显示问题,优化视觉效果。(The application discloses a method, a system and a storage medium for converting a PDF document into a DXF document, wherein the method comprises the following steps: acquiring page element information of a PDF document, wherein the page element information comprises curve element information; analyzing and calculating the parameter characteristics of the curve elements according to the information of the curve elements; analyzing the curve element information into curve characteristic parameters of the DXF document; and writing the curve characteristic parameters into the newly created DXF blank document to generate the DXF document. The system comprises: the computer program product comprises at least one memory, at least one processor and at least one program instruction, wherein the program instruction is stored on the memory and can be executed on the processor, and the processor is used for executing the method for converting the PDF document into the DXF document. The storage medium has stored thereon program instructions for performing the method of converting a PDF document to a DXF document of the present application. The problem of curve display after a PDF document is converted into a DXF document is effectively solved, and the visual effect is optimized.)

1. A method for converting a PDF document into a DXF document, comprising the steps of:

acquiring page element information of a PDF document, wherein the page element information comprises curve element information;

calculating the parameter characteristics of the curve elements according to the curve element information;

analyzing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve elements;

and writing the curve characteristic parameters into a newly created DXF blank document to generate the DXF document.

2. The method of converting a PDF document into a DXF document according to claim 1 wherein said analyzing parametric characteristics of said curve elements based on said curve element information comprises:

comparing the curve element information with preset graph information;

if the curve element information is consistent with the preset graph information, the curve element is a regular curve, wherein the regular curve at least comprises one of the following curves: circles, arcs, and ellipses;

acquiring parameter information of the regular curve, wherein the parameter information of the regular curve at least comprises one of the following parameters: circle center position, radius, start point and end point.

3. The method of converting a PDF document to a DXF document according to claim 2 further comprising:

if the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve;

acquiring the rule information of the irregular curve;

acquiring key information of the irregular curve according to the regular information, wherein the key information at least comprises one of the following parameters: control point, node number, and node value.

4. The method of converting a PDF document into a DXF document according to claim 3 wherein said parsing said curve element information into curve characteristic parameters of a DXF document according to said curve element's parameter characteristics comprises:

and linearly fitting the irregular curve into a non-uniform rational B-spline curve according to the key information of the irregular curve, and acquiring control point information, code combination information and code combination value information of the non-uniform rational B-spline curve.

5. The method of converting a PDF document into a DXF document according to claim 2 wherein said parametric characteristics of said curve elements comprise parametric information of said rule curve, said curve element information being parsed into curve characteristic parameters of a DXF document according to said parametric characteristics of said curve elements, further comprising the steps of:

and resolving the parameter information of the rule curve into curve characteristic parameters of the DXF document.

6. The method of converting a PDF document into a DXF document according to claim 1 wherein said parametric properties of curve elements comprise a closed fill path of curve elements, said parsing said curve element information into curve property parameters of a DXF document according to said parametric properties of curve elements, further comprising the steps of:

and analyzing the closed filling path of the curved surface element into a filling characteristic value parameter of the DXF document.

7. The method of converting a PDF document into a DXF document according to claim 1 wherein said page element information further comprises text information, further comprising the steps of:

parsing the text information into multi-line segment information of a DXF document;

and forming a filling closed path of the multi-line segment for the multi-line segment information.

8. The method of converting a PDF document into a DXF document according to any one of claims 1 to 7 further comprising:

and writing additional information of the PDF document into the DXF blank document, wherein the additional information comprises a document version.

9. A system for converting a PDF document to a DXF document comprising: at least one memory, at least one processor, and at least one program instruction stored on the memory and executable on the processor, the processor being configured to perform a method of converting a PDF document to a DXF document as recited in any one of claims 1-8.

10. A storage medium, characterized by: the storage medium having stored thereon program instructions for performing the method of converting a PDF document into a DXF document according to any one of claims 1 to 8.

Technical Field

The present application relates to the field of document conversion technologies, and in particular, to a method, a system, and a storage medium for converting a PDF document into a DXF document.

Background

PDF (Portable Document Format) has developed to date and has become one of the most popular Document formats on the Internet. DXF is one of the common formats of cad (computer Aided design), and it uses computer and its graphic equipment to help designers to perform design work, and is widely used in building engineering, decoration design, hydroelectric engineering, civil engineering, printing and typesetting, etc. The user often generates a PDF file from a CAD file and then prints out the PDF file, and when the user needs to modify the PDF file, the PDF file needs to be converted into a DXF file. The existing method for converting PDF document into DXF document is characterized in that after a Bezier curve in PDF is converted into DXF document, a simulation curve formed by connecting a plurality of short straight lines is displayed, which is not smooth enough and has poor visual effect.

Disclosure of Invention

The method, the system and the storage medium for converting the PDF document into the DXF document are provided, so that the problem of curve display after the PDF document is converted into the DXF document is effectively solved, and the visual effect is optimized.

In a first aspect of the present application, a method for converting a PDF document into a DXF document is provided, including: acquiring page element information of a PDF document, wherein the page element information comprises curve element information; analyzing and calculating the parameter characteristics of the curve elements according to the information of the curve elements; analyzing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve elements; and writing the curve characteristic parameters into the newly created DXF blank document to generate the DXF document.

The method for converting the PDF document into the DXF document according to the embodiment of the first aspect of the application has at least the following advantages: calculating the curve element information in the PDF document to obtain the parameter characteristics of the curve elements, analyzing the parameter characteristics into the curve characteristic parameters of the DXF document, and writing the converted curve characteristic parameters into the blank DXF document. By converting the characteristic of the curve element parameter in the PDF document into the curve characteristic parameter of the DXF document, the curve element in the PDF can be converted into the curve element in the DXF, instead of converting the curve element in the PDF document into an analog curve in the DXF, and the problems of insufficient smoothness of the curve and poor visual effect caused by the fact that the analog curve is connected by a plurality of short straight lines are avoided.

According to some embodiments of the present application, analyzing and calculating a parametric characteristic of a curve element from curve element information includes: comparing the curve element information with preset graph information; if the curve element information is consistent with the preset graph information, the curve element is a regular curve, wherein the regular curve at least comprises one of the following curves: circles, arcs, and ellipses; acquiring parameter information of the regular curve, wherein the parameter information of the regular curve at least comprises one of the following parameters: circle center position, radius, start point and end point. Comparing the curve element information with preset graphic information, if the curve element information is consistent with the preset graphic information, the curve element information of the PDF document is a regular curve, and the regular curve at least comprises one of the following curves: circles, arcs, and ellipses. The regular curve may be represented by parametric information of the regular curve, such as a center of a circle, a radius, a start point, or an end point. The position and the size of the circle can be determined through the circle center and the radius; the position and the size of the arc can be determined through the circle center, the radius, the starting point and the ending point; the size and position of the ellipse can be determined by the center of the circle, the focus, the major axis length and the minor axis length.

According to some embodiments of the application, further comprising: if the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve; acquiring the rule information of the irregular curve; acquiring key information of the irregular curve according to the regular information, wherein the key information at least comprises one of the following parameters: control point, node number, and node value. And when the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve. Through the mathematical induction method, the rule of the irregular curve is extracted, the key information of the irregular curve is obtained according to the rule of the irregular curve, the key information at least comprises control points, node numbers and node values, the irregular curve can be uniquely determined through the key information, the irregular curve of the PDF document is conveniently represented through the key information, the key information is favorably analyzed into the curve characteristic parameters of the DXF document, the characteristic information of the irregular curve can be completely reserved, the analyzed DXF document curve can be smooth, the problems that the converted curve is not smooth enough and the visual effect is poor are effectively solved.

According to some embodiments of the present application, parsing curve element information into curve characteristic parameters of a DXF document according to parameter characteristics of the curve element includes: and linearly fitting the irregular curve into a non-uniform rational B-spline curve according to the key information of the irregular curve, and acquiring control point information, code combination information and code combination value information of the non-uniform rational B-spline curve. The irregular curve of the PDF document is subjected to mathematical induction, the rule of the irregular curve is extracted, key information of the irregular curve is obtained according to the rule of the irregular curve, the key information at least comprises a control point, a node point and a node point, the irregular curve can be uniquely determined through the key information, the irregular curve is linearly fitted into a non-uniform rational B-spline curve in the DXF document according to the key information, and the control point information, the group code information and the group code value information of the non-uniform rational B-spline curve are obtained. The characteristic information of the irregular curve can be completely reserved, the DXF document curve after analysis is smooth, and the problems that the converted irregular curve is not smooth enough and the visual effect is poor are effectively solved.

According to some embodiments of the present application, the parametric characteristics of the curve element include parametric information of a regular curve, and parsing the parametric information of the curve element into curve characteristic parameters of a DXF document according to the parametric characteristics of the curve element, further comprising: and resolving the parameter information of the rule curve into curve characteristic parameters of the DXF document. The method has the advantages that the parameter information of the regular curve is converted into the curve characteristic parameters of the DFX document, the characteristic information of the regular curve can be completely kept, the DFX document curve can be relatively smooth after conversion, and the problems that the converted regular curve is not smooth enough and the visual effect is poor are effectively solved.

According to some embodiments of the present application, the parametric characteristics of the surface element include a closed fill path of the surface element, parsing the curve element information into curve characteristic parameters of a DXF document according to the parametric characteristics of the curve element, further comprising: the closed fill path of the surface element is parsed into fill property value parameters of the DXF document. The closed filling path of the curved surface element of the PDF document is analyzed into the filling characteristic parameters of the DXF document, so that the closed filling effect of the curved surface element in the PDF document can be effectively reserved, and the visual effect is optimized.

According to some embodiments of the present application, the page element information further includes text information, further comprising the steps of: parsing the text information into multi-line segment information of a DXF document; and forming a filling closed path of the multi-line segment for the multi-line segment information. The method and the device have the advantages that the text information of the PDF document is analyzed into the multi-line segment information of the DXF document, the original form of the text can be reserved, and the problem that when the text information of the PDF document is analyzed into the text information of the DXF document, English and Arabic numbers are converted into the text of the DXF document, and other characters are converted into line paths to cause poor visual effect is solved. The method has the advantages that the text information of the PDF document is completely converted into the multi-line segment information, and the problem that the converted text information is disordered and has poor visual effect can be effectively solved.

According to some embodiments of the application, further comprising: and writing the additional information of the PDF document into the DXF blank document, wherein the additional information comprises a document version. Writing additional information of the document into the newly created DXF empty document may generate a DXF file that may be opened in CAD software. The additional information includes the version number of the document, or the default open program.

In a second aspect of the present application, a system for converting a PDF document into a DXF document is provided, including: the apparatus comprises at least one memory, at least one processor and at least one program instruction, the program instruction being stored on the memory and being executable on the processor, the processor being configured to perform the method for converting a PDF document into a DXF document as set forth in the first aspect of the present application.

In a third aspect of the present application, a storage medium is provided, where program instructions are stored on the storage medium, and the program instructions are used for a method for converting a PDF document into a DXF document as set forth in the first aspect of the present application.

Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.

Drawings

The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:

FIG. 1 is a flowchart of a method for converting a PDF document into a DXF document according to an embodiment of the present application;

FIG. 2 is a logic diagram illustrating a method for converting a PDF document into a DXF document according to an embodiment of the present application;

FIG. 3 is a schematic diagram illustrating circle and ellipse recognition of a method for converting a PDF document into a DXFL document according to an embodiment of the present application;

fig. 4 is a schematic diagram illustrating arc identification of a method for converting a PDF document into a DXFL document according to an embodiment of the present application.

Detailed Description

Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.

In the description of the present application, it is to be understood that the positional descriptions, such as the directions of up, down, front, rear, left, right, etc., referred to herein are based on the directions or positional relationships shown in the drawings, and are only for convenience of description and simplification of description, and do not indicate or imply that the referred device or element must have a specific direction, be constructed and operated in a specific direction, and thus, should not be construed as limiting the present application.

In the description of the present application, the meaning of a plurality is one or more, the meaning of a plurality is two or more, and larger, smaller, larger, etc. are understood as excluding the present number, and larger, smaller, inner, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.

In the description of the present application, unless otherwise expressly limited, terms such as set, mounted, connected and the like should be construed broadly, and those skilled in the art can reasonably determine the specific meaning of the terms in the present application by combining the detailed contents of the technical solutions. The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made without departing from the spirit of the present application within the knowledge of those skilled in the art.

Referring to fig. 1, in a first aspect of an embodiment of the present application, a method for converting a PDF document into a DXF document is provided, including:

s100, acquiring page element information of the PDF document, wherein the page element information comprises curve element information;

s200, analyzing and calculating the parameter characteristics of the curve elements according to the information of the curve elements;

s300, analyzing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve elements;

s400, writing the curve characteristic parameters into the newly created DXF blank document to generate the DXF document.

Calculating the curve element information in the PDF document to obtain the parameter characteristics of the curve elements, analyzing the parameter characteristics into the curve characteristic parameters of the DXF document, and writing the converted curve characteristic parameters into the blank DXF document. The curve element parameters in the PDF document are converted into curve characteristic parameters of the DXF document, so that the curve elements in the PDF document can be converted into the curve elements in the DXF, the curve elements in the PDF document are not converted into the analog curves in the DXF document, the analog curves are formed by combining a plurality of short straight lines or curves, and the curve formed by combining the short straight lines and the curves cannot be smooth enough. And the curve elements in the PDF document are directly converted into the curve elements in the DXFL, so that the problems of insufficient smoothness of the curve and poor visual effect caused by the fact that the simulation curve is connected by a plurality of short straight lines are effectively avoided.

Referring to fig. 2, in some embodiments of the present application, analyzing and calculating a parametric characteristic of a curve element based on curve element information includes: comparing the curve element information with preset graph information; if the curve element information is consistent with the preset graph information, the curve element is a regular curve, wherein the regular curve at least comprises one of the following curves: circles, arcs, and ellipses; acquiring parameter information of the regular curve, wherein the parameter information of the regular curve at least comprises one of the following parameters: circle center position, radius, start point and end point. Comparing the curve element information with preset graphic information, if the curve element information is consistent with the preset graphic information, the curve element information of the PDF document is a regular curve, and the regular curve at least comprises one of the following curves: circles, arcs, and ellipses. The regular curve may be represented by parametric information of the regular curve, such as a center of a circle, a radius, a start point, or an end point. The position and the size of the circle can be determined through the circle center and the radius; the position and the size of the arc can be determined through the circle center, the radius, the starting point and the ending point; the size and position of the ellipse can be determined by the center of the circle, the focus, the major axis length and the minor axis length.

It is understood that a graph formed by combining a regular curve and a straight line, such as a cylinder or a cone, is formed by combining a circle, an arc, or an ellipse and a line segment, curve elements can be processed according to the regular curve, and straight line elements are converted into straight line elements in the DXF document.

Referring to fig. 3, a specific identification method of circles and ellipses: firstly, judging whether the head and tail coordinates of the curve are equal, namely judging whether the curve is closed, and if the head and tail coordinates of the curve are equal, the curve is a closed curve; then judging whether the midpoint coordinate of P0P1 and the midpoint coordinate of P2P3 coincide, if so, the curve is a circle or an ellipse, and the midpoint coordinate is a circle center coordinate O1; judging whether the length of the line segment P0P1 is equal to that of the line segment P2P3, if so, the curve is a circle, and the length of the line segment P0P1 or the length of the line segment P2P3 is the diameter of the circle; if the length of P0P1 and the length of P2P3 are not equal, the curve is an ellipse, and the longer the length of P0P1 or the length of P2P3 is, the longer the major axis, and the shorter the minor axis.

Referring to fig. 4, the method for identifying the arc: p4 is the starting point of the curve, P5 is the ending point of the curve, M1 is the midpoint of the connecting line of P4P5, the intersection point of the perpendicular line of P4P5 at the midpoint M1 and the curve is M2, the intersection point of the tangent line of the curve at M2 and the tangent line at P4 is P7, the intersection point of the tangent line of the curve M2 and the tangent line at P5 is P6, whether M2 is the midpoint of P6P7 is judged, whether the perpendicular line of the tangent line at M1M2 and P4 and the perpendicular line of the tangent line at P5 intersect at one point, if intersect at one point, the curve is an arc, the intersection point O2 of the three is the center of a circle, and O2P4 is the radius.

In some embodiments of the present application, further comprising: if the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve; acquiring the rule information of the irregular curve; acquiring key information of the irregular curve according to the regular information, wherein the key information at least comprises one of the following parameters: control point, node number, and node value. And when the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve. Through the mathematical induction method, the rule of the irregular curve is extracted, the key information of the irregular curve is obtained according to the rule of the irregular curve, the key information at least comprises control points, node numbers and node values, the irregular curve can be uniquely determined through the key information, the irregular curve of the PDF document is conveniently represented through the key information, the key information is favorably analyzed into the curve characteristic parameters of the DXF document, the characteristic information of the irregular curve can be completely reserved, the analyzed DXF document curve can be smooth, the problems that the converted curve is not smooth enough and the visual effect is poor are effectively solved.

In some embodiments of the present application, parsing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve element includes: and linearly fitting the irregular curve into a non-uniform rational B-spline curve according to the key information of the irregular curve, and acquiring control point information, code combination information and code combination value information of the non-uniform rational B-spline curve. The irregular curve of the PDF document is subjected to mathematical induction, the rule of the irregular curve is extracted, key information of the irregular curve is obtained according to the rule of the irregular curve, the key information at least comprises a control point, a node point and a node point, the irregular curve can be uniquely determined through the key information, the irregular curve is linearly fitted into a non-uniform rational B-spline curve in the DXF document according to the key information, and the control point information, the group code information and the group code value information of the non-uniform rational B-spline curve are obtained. The characteristic information of the irregular curve can be completely reserved, the DXF document curve after analysis is smooth, and the problems that the converted irregular curve is not smooth enough and the visual effect is poor are effectively solved.

Specifically, the method for converting the bezier curve in the PDF into the non-uniform B-spline curve is summarized through mathematical statistics, and repeated tests find that the bezier curve and the B-spline curve have rules, wherein the specific rules are as follows:

the order of the B spline curve is consistent with that of the Bezier curve;

the quantity and coordinates of the B-spline line taking control points are basically consistent with those of the Bezier curve (if curve straight line mixing occurs)

The case of (2), a control point needs to be added manually);

3. the node number of the third order and above B spline curve is equal to the control node number + 4;

the rule of the node values of the B spline curve is as follows:

order of the scale Number of control points Number of nodes Junction value
1 2 4 0011
2 3 6 000111
3 4 8 00001111
4 7 11 00001112222
5 10 14 00001112223333
6 13 17 00001113334444
7 16 20 00001112223334445555
8 19 23 00001112223334445556666

Among the Bezier curve control points provided by the PDF, three control points are added for each section of curve read, namely, the number of the control points after the third order is increased by a multiple of three.

In some embodiments of the present application, parsing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve element further comprises: and resolving the parameter information of the rule curve into curve characteristic parameters of the DXF document. The method has the advantages that the parameter information of the regular curve is converted into the curve characteristic parameters of the DFX document, the characteristic information of the regular curve can be completely kept, the DFX document curve can be relatively smooth after conversion, and the problems that the converted regular curve is not smooth enough and the visual effect is poor are effectively solved.

In some embodiments of the present application, parsing the curve element information into curve characteristic parameters of the DXF document according to the parameter characteristics of the curve element further comprises: the closed fill path of the surface element is parsed into fill property value parameters of the DXF document. The closed filling path of the curved surface element of the PDF document is analyzed into the filling characteristic parameters of the DXF document, so that the closed filling effect of the curved surface element in the PDF document can be effectively reserved, and the visual effect is optimized.

In some embodiments of the present application, further comprising: the page element information also comprises text information, and the text information is analyzed into multi-line segment information of the DXF document; and forming a filling closed path of the multi-line segment for the multi-line segment information. The method and the device have the advantages that the text information of the PDF document is analyzed into the multi-line segment information of the DXF document, the original form of the text can be reserved, and the problem that when the text information of the PDF document is analyzed into the text information of the DXF document, English and Arabic numbers are converted into the text of the DXF document, and other characters are converted into line paths to cause poor visual effect is solved. The method has the advantages that the text information of the PDF document is completely converted into the multi-line segment information, and the problem that the converted text information is disordered and has poor visual effect can be effectively solved.

In some embodiments of the present application, further comprising: and writing the additional information of the PDF document into the DXF blank document, wherein the additional information comprises a document version. Writing additional information of the document into the newly created DXF empty document may generate a DXF file that may be opened in CAD software. The additional information includes the version number of the document, or the default open program.

In a second aspect of the present application, a system for converting a PDF document into a DXF document is provided, including: the apparatus comprises at least one memory, at least one processor and at least one program instruction, the program instruction being stored on the memory and being executable on the processor, the processor being configured to perform the method for converting a PDF document into a DXF document as set forth in the first aspect of the present application.

In a third aspect of the present application, a storage medium is provided, where program instructions are stored on the storage medium, and the program instructions are used for a method for converting a PDF document into a DXF document as set forth in the first aspect of the present application.

The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made without departing from the spirit of the present application within the knowledge of those skilled in the art.

The method for converting a PDF document into a DXF document according to an embodiment of the present application is described in detail below with reference to fig. 1 to 4. It is to be understood that the following description is only exemplary, and not a specific limitation of the invention.

With reference to fig. 1 to 4, an embodiment of the present application provides a method for converting a PDF document into a DXF document, including three cases:

firstly, the page elements of the PDF document are one or a combination of a plurality of curves of a circle, a circular arc or an ellipse: obtaining curve element information of a PDF document; comparing the curve element information with preset graph information according to the curve element information; if the curve element information is consistent with the preset graph information, the curve element is a regular curve, wherein the regular curve at least comprises one of the following curves: circles, arcs, and ellipses; acquiring parameter information of the regular curve, wherein the parameter information of the regular curve at least comprises one of the following parameters: circle center position, radius, starting point and ending point; analyzing the parameter information of the rule curve into curve characteristic parameters of the DXF document; analyzing a closed filling path of the surface element into a filling characteristic value parameter of the DXF document; and writing the curve characteristic parameters of the PDF document and the additional information into the newly created DXF blank document to generate the DXF document, wherein the additional information comprises a document version.

Secondly, the PDF document page elements are irregular curves: obtaining curve element information of a PDF document; comparing the curve element information with preset graph information according to the curve element information; if the curve element information is inconsistent with the preset graph information, the curve element is an irregular curve; acquiring the rule information of the irregular curve; acquiring key information of the irregular curve according to the regular information, wherein the key information at least comprises one of the following parameters: control points, node numbers, and node values; linearly fitting the irregular curve into a non-uniform rational B-spline curve according to key information of the irregular curve, and acquiring control point information, code combination information and code combination value information of the non-uniform rational B-spline curve; and writing the curve characteristic parameters of the PDF document and the additional information into the newly created DXF blank document to generate the DXF document, wherein the additional information comprises a document version.

Thirdly, the page elements of the PDF document are text information: acquiring text information of a PDF document, and analyzing the text information into multi-line segment information of a DXF document; forming a filling closed path of the multi-line segment for the multi-line segment information; and writing the multiline segment information and the additional information which are obtained by analyzing the text information of the PDF document into the newly created DXF blank document to generate the DXF document, wherein the additional information comprises a document version.

The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.

The program instructions comprise computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The storage medium includes: any entity or device capable of carrying computer program code, recording medium, computer memory, Read Only Memory (ROM), Random Access Memory (RAM), electrical carrier signals, telecommunications signals, software distribution medium, and the like. It should be noted that the storage medium may include contents that are appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, the storage medium does not include electrical carrier signals and telecommunication signals according to legislation and patent practice.

It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.

In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

The embodiments of the present application have been described in detail with reference to the drawings, but the present application is not limited to the embodiments, and various changes can be made without departing from the spirit of the present application within the knowledge of those skilled in the art.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:市政设备监测信息处理系统及市政设备监测信息处理方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!