[go: up one dir, main page]

CN108399156B - The composition method and device of formula in a kind of pdf document - Google Patents

The composition method and device of formula in a kind of pdf document Download PDF

Info

Publication number
CN108399156B
CN108399156B CN201810168769.2A CN201810168769A CN108399156B CN 108399156 B CN108399156 B CN 108399156B CN 201810168769 A CN201810168769 A CN 201810168769A CN 108399156 B CN108399156 B CN 108399156B
Authority
CN
China
Prior art keywords
pdf
formula
information
vectogram
drafting
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.)
Active
Application number
CN201810168769.2A
Other languages
Chinese (zh)
Other versions
CN108399156A (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.)
Beijing Renhe Huizhi Information Technology Co Ltd
Original Assignee
Beijing Renhe Huizhi Information 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 Beijing Renhe Huizhi Information Technology Co Ltd filed Critical Beijing Renhe Huizhi Information Technology Co Ltd
Priority to CN201810168769.2A priority Critical patent/CN108399156B/en
Publication of CN108399156A publication Critical patent/CN108399156A/en
Application granted granted Critical
Publication of CN108399156B publication Critical patent/CN108399156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides the composition methods and device of formula in a kind of pdf document, wherein this method comprises: obtaining the Latex format formula for including in XML file;Jlatex function library is called to determine the size of Latex format formula;Create PDF vectogram identical with the size of Latex format formula;Call Jlatex function library that the drafting information for corresponding to Latex format formula is plotted on the PDF vectogram of creation;The PDF vectogram of drafting is inserted at location information corresponding with Latex format formula by the location information based on Latex format formula in pdf document, to obtain the pdf document after typesetting.The present invention realizes the direct creation of PDF vectogram by the calling of Jlatex function library, easy to operate, further such that the typesetting efficiency of pdf document is higher, and there is no the picture distortion phenomenon under being enlarged, the using experience degree of user is preferable.

Description

The composition method and device of formula in a kind of pdf document
Technical field
The present invention relates to typesetting system fields, in particular to the composition method and dress of formula in a kind of pdf document It sets.
Background technique
LATEX is a kind of composing system based on TEX, using this format, even if user does not have typesetting and programming Knowledge can also give full play to the power as provided by TEX.Especially for the complicated table of generation and mathematical formulae, table Now it is especially prominent.Therefore, it is generated in pdf document according to XML file typesetting, for formula part, usually in XML file Retain the XML tag of a representation formula, content is then LATEX format.Wherein, LATEX content is that user is compiled using text Collect device direct editing.
When generating pdf document according to XML file typesetting in the related technology, all LATEX are extracted from XML file first Then the formula content of format calls LATEX interface that all formula contents are generated formula PDF, finally by each formula PDF points It is not inserted into the corresponding position of entire pdf document.
However, PDF composition method formula content corresponding for each LATEX format in the related technology is required to mention It takes, parse and exported with formula, it is complicated for operation, and when the corresponding formula content of LATEX format is more, it considerably increases resource and accounts for Dosage causes the efficiency of typesetting lower.
Summary of the invention
In view of this, the purpose of the present invention is to provide the composition method and device of formula in a kind of pdf document, to improve The efficiency of typesetting.
In a first aspect, the present invention provides a kind of composition methods of formula in pdf document, comprising:
Obtain the Latex format formula for including in XML file;
Jlatex function library is called to determine the size of the Latex format formula;
Create PDF vectogram identical with the size of the Latex format formula;
Call the Jlatex function library that the drafting information for corresponding to the Latex format formula is plotted in the institute of creation It states on PDF vectogram;
The PDF vectogram of drafting is inserted by the location information based on the Latex format formula in pdf document At to location information corresponding with the Latex format formula, to obtain the pdf document after typesetting.
With reference to first aspect, the present invention provides the first possible embodiments of first aspect, wherein the calling Jlatex function library determines the size of the Latex format formula, comprising:
The size of the Latex format formula is determined according to the formula analysis function in the Jlatex function library.
With reference to first aspect, the present invention provides second of possible embodiments of first aspect, wherein the calling The drafting information for corresponding to the Latex format formula is plotted in the PDF vectogram of creation by the Jlatex function library On, comprising:
A JAVA object comprising PDF vectogram is generated, the JAVA object is used to simulate the Graphics2D class of JAVA;
The drafting formula interface for calling the JLatex function library, transmits the JAVA object;
The drafting information for receiving the Latex format formula calls the drawing image function in the Graphics2D class, The drafting information is converted into PDF and draws instruction, to be plotted on the PDF vectogram.
The possible embodiment of second with reference to first aspect, the third the present invention provides first aspect are possible Embodiment, wherein the drafting information includes content information and the location information corresponding to content information, the content letter Breath includes: text information, font information and symbolic information.
The third possible embodiment with reference to first aspect, the 4th kind the present invention provides first aspect are possible Embodiment, wherein described that the drafting information is converted into PDF drafting instruction, comprising:
The font information is converted into the font information of PDF format;
The font information of the text information and the PDF format is converted into PDF and draws instruction.
With reference to first aspect, the present invention provides the 5th kind of possible embodiments of first aspect, wherein incites somebody to action described Before the PDF vectogram drawn is inserted at location information corresponding with the Latex format formula, further includes:
Formula label is drawn in the PDF vectogram of drafting.
Second aspect, the present invention also provides a kind of composing devices of formula in pdf document, comprising:
Formula obtains module, for obtaining the Latex format formula for including in XML file;
Size determining module, for calling Jlatex function library to determine the size of the Latex format formula;
Vectogram creation module, for creating PDF vectogram identical with the size of the Latex format formula;
Vectogram drafting module, for calling the Jlatex function library that will correspond to drawing for the Latex format formula Information processed is plotted on the PDF vectogram of creation;
File type-setting module, for the location information based on the Latex format formula in pdf document, by drafting The PDF vectogram is inserted at location information corresponding with the Latex format formula, to obtain the pdf document after typesetting.
In conjunction with second aspect, the present invention provides the first possible embodiments of second aspect, wherein the size Determining module, specifically for determining the Latex format formula according to the formula analysis function in the Jlatex function library Size.
In conjunction with second aspect, the present invention provides second of possible embodiments of second aspect, wherein the vector Figure drafting module, is specifically used for, and generates a JAVA object comprising PDF vectogram, the JAVA object is for simulating JAVA's Graphics2D class;The drafting formula interface for calling the JLatex function library, transmits the JAVA object;Described in reception The drafting information of Latex format formula calls the drawing image function in the Graphics2D class, and the drafting information is turned It is changed to PDF and draws instruction, to be plotted on the PDF vectogram.
In conjunction with second of possible embodiment of second aspect, the third the present invention provides second aspect is possible Embodiment, wherein the drafting information includes content information and the location information corresponding to content information, the content letter Breath includes: text information and symbolic information.
The composition method and device of formula in pdf document provided by the invention, first acquisition XML file in include Latex format formula;Then it calls Jlatex function library to determine the size of Latex format formula, and creates public with Latex format The identical PDF vectogram of the size of formula;Furthermore Jlatex function library is called to draw the drafting information for corresponding to Latex format formula System is on the PDF vectogram of creation;The finally location information based on Latex format formula in pdf document, by the PDF of drafting Vectogram is inserted at location information corresponding with Latex format formula, to obtain the pdf document after typesetting, that is, it passes through The calling of Jlatex function library realizes the direct creation of PDF vectogram, easy to operate, further such that the typesetting of pdf document is imitated Rate is higher, and there is no the picture distortion phenomenon under being enlarged, the using experience degree of user is preferable.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows the flow chart of the composition method of formula in a kind of pdf document provided by the embodiment of the present invention;
Fig. 2 shows the flow charts of the composition method of formula in another kind pdf document provided by the embodiment of the present invention;
Fig. 3 shows the flow chart of the composition method of formula in another kind pdf document provided by the embodiment of the present invention;
Fig. 4 shows the structural schematic diagram of the composing device of formula in a kind of pdf document provided by the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention Middle attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only It is a part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is real The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, of the invention to what is provided in the accompanying drawings below The detailed description of embodiment is not intended to limit the range of claimed invention, but is merely representative of selected reality of the invention Apply example.Based on the embodiment of the present invention, those skilled in the art institute obtained without making creative work There are other embodiments, shall fall within the protection scope of the present invention.
In the composing system for generating pdf document in view of XML file, for the typesetting of mathematical formulae, there are typesetting efficiency Low, system resource occupies excessively high problem.Based on this, the embodiment of the invention provides a kind of typesetting sides of formula in pdf document Method calls Jlatex function library to carry out mathematical formulae typesetting, and auxiliary XML file generates pdf document, and typesetting efficiency is higher.
The flow chart of the composition method of formula, above-mentioned in pdf document provided in an embodiment of the present invention shown in Figure 1 The executing subject of the composition method of formula is computer equipment in pdf document, and this method specifically comprises the following steps:
S101, the Latex format formula for including in XML file is obtained.
Here, it is contemplated that the concrete application scene of the composition method of formula in pdf document provided in an embodiment of the present invention, this Inventive embodiments need to obtain the Latex format formula for including in XML file, in XML file, remain a representation formula XML tag, the content of label is entirely Latex format.Specifically, the embodiment of the present invention can be by using text editor The Latex code in XML file is obtained, the Latex Code obtaining of the mathematical formulae of desired acquisition.
S102, calling Jlatex function library determine the size of Latex format formula.
Here, for the Latex code of the mathematical formulae of above-mentioned acquisition, the embodiment of the present invention is by calling Jlatex function Library determines the size for the mathematical formulae that Latex code is stated.Wherein, the size of the mathematical formulae includes but unlimited Width value, height value in mathematical formulae.
S103, creation PDF vectogram identical with the size of Latex format formula.
Here, the size for the mathematical formulae that the embodiment of the present invention is got based on Jlatex function library, creation with The identical PDF vectogram of size of Latex code statement, the height of the vectogram of PDF is the height of formula, PDF vectogram Width be formula width.
S104, call Jlatex function library by the drafting information for corresponding to Latex format formula be plotted in the PDF of creation to On spirogram.
Here, the embodiment of the present invention carries out the drafting of mathematical formulae based on the PDF vectogram of initialized size, first First, the Graphics2D class based on JAVA generates the JAVA object comprising PDF vectogram, then calls Jlatex function library In drafting formula procedure, be passed to generated JAVA object information, instruction will be drawn and be converted into the identical PDF of display effect and refer to It enables, and is drawn on PDF vectogram.
S105, the location information based on Latex format formula in pdf document, by the PDF vectogram of drafting be inserted into At the corresponding location information of Latex format formula, to obtain the pdf document after typesetting.
Here, location information of the embodiment of the present invention based on Latex format formula in XML file will have been completed to draw Mathematical formulae and label information be inserted into corresponding position in pdf document, with obtain complete typesetting after pdf document.
The composition method of formula in pdf document provided in an embodiment of the present invention, first acquisition XML file in include Latex format formula;Then it calls Jlatex function library to determine the size of Latex format formula, and creates public with Latex format The identical PDF vectogram of the size of formula;Furthermore Jlatex function library is called to draw the drafting information for corresponding to Latex format formula System is on the PDF vectogram of creation;The finally location information based on Latex format formula in pdf document, by the PDF of drafting Vectogram is inserted at location information corresponding with Latex format formula, to obtain the pdf document after typesetting, that is, it passes through The calling of Jlatex function library realizes the direct creation of PDF vectogram, easy to operate, further such that the typesetting of pdf document is imitated Rate is higher, and there is no the picture distortion phenomenon under being enlarged, the using experience degree of user is preferable.
For the ease of the Latex format formula in XML file to be output in pdf document, the embodiment of the present invention needs to adjust The size of Latex format formula is determined with the formula analysis function in Jlatex function library.The embodiment of the present invention can be based on PDF The default page width of file and default page height determine the size of Latex format formula, that is, various sizes of PDF is literary The size of the corresponding Latex format formula of part is also different.Specifically, the embodiment of the present invention can first call formula analysis function, Then the default page width of pdf document and default page height are input to the formula analysis function, pass through formula analysis letter Several analyses can directly acquire the size of Latex format formula.
The composition method of formula also needs to call Jlatex function library that will correspond in pdf document provided in an embodiment of the present invention In on the PDF vectogram that the drafting information of Latex format formula is plotted in creation, referring to fig. 2, the drafting of above-mentioned PDF vectogram Process specifically comprises the following steps:
S201, a JAVA object comprising PDF vectogram is generated, JAVA object is used to simulate the Graphics2D of JAVA Class;
S202, the drafting formula interface for calling JLatex function library transmit JAVA object;
S203, the drafting information for receiving Latex format formula call the drawing image function in Graphics2D class, will It draws information and is converted to PDF drafting instruction, to be plotted on PDF vectogram.
Here, the embodiment of the present invention firstly generates the JAVA object comprising PDF vectogram, then passes through calling The drafting formula interface of JLatex function library, transmits the JAVA object of above-mentioned generation, then calls JAVA object simulation The drafting information of received Latex format formula is converted to PDF and draws instruction by the drawing image function in Graphics2D class And it is plotted on PDF vectogram.
Wherein, above-mentioned Graphics2D class is a general class, and the powerful X-Y scheme processing capacity that JAVA 2D possesses is i.e. It is to be completed by the Graphics2D class, such is a subclass of Graphics class.Its feature is the figure drawn Shape is handled as an object, first creates object before drawing.In addition, above-mentioned drafting information includes content information and corresponds to The location information of content information, content information include: text information and symbolic information.
In the embodiment of the present invention, after by formula analysis typesetting, Yao Zhenzheng draws formula, will call and above-mentioned passes to JAVA Corresponding each corresponding drawing image function, and be transmitted to drawing image function point, text, symbol etc. and draw information and is corresponding Picture point, draw text, the draftings instruction such as Taoism draw magic figures or incantations number.Above-mentioned drawing image function does not have actually after receiving above-mentioned drafting instruction There is picture on the screen, also do not have to be drawn as bitmap as usually, but drafting instruction is converted into the identical PDF of display effect and is drawn System instruction is drawn on the PDF vectogram based on JAVA object creation.
It is interior involved in formula in the embodiment of the present invention in order to further ensure display effect of the formula in pdf document Hold text information, font information and the symbolic information for including in information and carries out corresponding processing.
For text information, referring to Fig. 3, the composition method of formula is logical in pdf document provided in an embodiment of the present invention It crosses following steps and realizes that drafting information draws the conversion of instruction to PDF:
S301, the font information that font information is converted into PDF format;
S302, the font information of text information and PDF format is converted into PDF drafting instruction.
Here, the PDF that the text information of PDF format is converted is drawn into instruction and is plotted in the PDF based on JAVA object creation On vectogram, the display effect for the text information for including in formula is further ensured.
For symbolic information, in the embodiment of the present invention, remain unchanged it afterwards before switching, to further ensure The display effect for the symbolic information for including in formula.
In addition, for the above-mentioned mathematical formulae for completing to draw in PDF vectogram, can also add in the embodiment of the present invention Add formula label, and the PDF vectogram added with formula label is inserted into location information corresponding with Latex format formula Place.Wherein, above-mentioned formula label can be the number information of mathematical formulae in pdf document.
The composition method of formula in pdf document provided in an embodiment of the present invention, first acquisition XML file in include Latex format formula;Then it calls Jlatex function library to determine the size of Latex format formula, and creates public with Latex format The identical PDF vectogram of the size of formula;Furthermore Jlatex function library is called to draw the drafting information for corresponding to Latex format formula System is on the PDF vectogram of creation;The finally location information based on Latex format formula in pdf document, by the PDF of drafting Vectogram is inserted at location information corresponding with Latex format formula, to obtain the pdf document after typesetting, that is, it passes through The calling of Jlatex function library realizes the direct creation of PDF vectogram, easy to operate, further such that the typesetting of pdf document is imitated Rate is higher, and there is no the formula distortion phenomenon under being enlarged, the using experience degree of user is preferable.
Based on the same inventive concept, it is additionally provided in the embodiment of the present invention corresponding with the composition method of formula in pdf document Pdf document in formula composing device, the principle solved the problems, such as due to the device in the embodiment of the present invention and the present invention are implemented The composition method of formula is similar in the above-mentioned pdf document of example, therefore the implementation of device may refer to the implementation of method, repeats place not It repeats again.As shown in figure 4, for the structural schematic diagram of the composing device of formula in pdf document provided by the embodiment of the present invention, it should The composing device of formula includes: in pdf document
Formula obtains module 11, for obtaining the Latex format formula for including in XML file;
Size determining module 22 is specifically used for root for calling Jlatex function library to determine the size of Latex format formula The size of Latex format formula is determined according to the formula analysis function in Jlatex function library;
Vectogram creation module 33, for creating PDF vectogram identical with the size of Latex format formula;
Vectogram drafting module 44, for calling Jlatex function library that will correspond to the drafting information of Latex format formula It is plotted on the PDF vectogram of creation,
File type-setting module 55, for the location information based on Latex format formula in pdf document, by the PDF of drafting Vectogram is inserted at location information corresponding with Latex format formula, to obtain the pdf document after typesetting.
In specific implementation, above-mentioned size determining module 22, specifically for according to the formula analysis in Jlatex function library Function determines the size of Latex format formula.
In specific implementation, above-mentioned vectogram drafting module 44, specifically for generating JAVA pairs comprising PDF vectogram As JAVA object is used to simulate the Graphics2D class of JAVA;The drafting formula interface of JLatex function library is called, JAVA is transmitted Object;The drafting information of Latex format formula is received, the drawing image function in Graphics2D class is called, information will be drawn It is converted to PDF and draws instruction, to be plotted on PDF vectogram.
Wherein, above-mentioned drafting information includes content information and the location information corresponding to content information, content information packet It includes: text information and symbolic information.
In specific implementation, above-mentioned vectogram drafting module 44, is converted into PDF format also particularly useful for by text information Text information;The text information of PDF format is converted into PDF and draws instruction.
The composing device of formula in above-mentioned pdf document further include:
Label drafting module 66, for drawing formula label in the PDF vectogram of drafting.
The composing device of formula in pdf document provided in an embodiment of the present invention, first acquisition XML file in include Latex format formula;Then it calls Jlatex function library to determine the size of Latex format formula, and creates public with Latex format The identical PDF vectogram of the size of formula;Furthermore Jlatex function library is called to draw the drafting information for corresponding to Latex format formula System is on the PDF vectogram of creation;The finally location information based on Latex format formula in pdf document, by the PDF of drafting Vectogram is inserted at location information corresponding with Latex format formula, to obtain the pdf document after typesetting, that is, it passes through The calling of Jlatex function library realizes the direct creation of PDF vectogram, easy to operate, further such that the typesetting of pdf document is imitated Rate is higher, and there is no the formula distortion phenomenon under being enlarged, the using experience degree of user is preferable.
The computer program product of the method for the typesetting of pdf document, including storage are carried out provided by the embodiment of the present invention The computer readable storage medium of program code, the instruction that said program code includes can be used for executing previous methods embodiment Described in method, specific implementation can be found in embodiment of the method, details are not described herein.
The device of the typesetting of pdf document provided by the embodiment of the present invention can be the specific hardware or installation in equipment In software or firmware etc. in equipment.The technical effect of device provided by the embodiment of the present invention, realization principle and generation and Preceding method embodiment is identical, and to briefly describe, Installation practice part does not refer to place, can refer in preceding method embodiment Corresponding contents.It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description is The specific work process of system, device and unit, the corresponding process during reference can be made to the above method embodiment, it is no longer superfluous herein It states.
In embodiment provided by the present invention, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the invention can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention.Should all it cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. the composition method of formula in a kind of pdf document characterized by comprising
Obtain the Latex format formula for including in XML file;
Jlatex function library is called to determine the size of the Latex format formula;
Create PDF vectogram identical with the size of the Latex format formula;
Call the Jlatex function library that the drafting information for corresponding to the Latex format formula is plotted in described in creation On PDF vectogram;
Location information based on the Latex format formula in pdf document, by the PDF vectogram of drafting be inserted into At the corresponding location information of the Latex format formula, to obtain the pdf document after typesetting.
2. the method according to claim 1, wherein the calling Jlatex function library determines the Latex lattice The size of formula formula, comprising:
The size of the Latex format formula is determined according to the formula analysis function in the Jlatex function library.
3. the method according to claim 1, wherein described call the Jlatex function library will be corresponding to described The drafting information of Latex format formula is plotted on the PDF vectogram of creation, comprising:
A JAVA object comprising PDF vectogram is generated, the JAVA object is used to simulate the Graphics2D class of JAVA;
The drafting formula interface for calling the JLatex function library, transmits the JAVA object;
The drafting information for receiving the Latex format formula calls the drawing image function in the Graphics2D class, by institute It states drafting information and is converted to PDF drafting instruction, to be plotted on the PDF vectogram.
4. according to the method described in claim 3, it is characterized in that, the drafting information includes content information and corresponds to interior Hold the location information of information, the content information includes: text information, font information and symbolic information.
5. according to the method described in claim 4, it is characterized in that, it is described by the drafting information be converted to PDF draw instruction, Include:
The font information is converted into the font information of PDF format;
The font information of the text information and the PDF format is converted into PDF and draws instruction.
6. the method according to claim 1, wherein it is described by the PDF vectogram of drafting be inserted into Before at the corresponding location information of the Latex format formula, further includes:
Formula label is drawn in the PDF vectogram of drafting.
7. the composing device of formula in a kind of pdf document characterized by comprising
Formula obtains module, for obtaining the Latex format formula for including in XML file;
Size determining module, for calling Jlatex function library to determine the size of the Latex format formula;
Vectogram creation module, for creating PDF vectogram identical with the size of the Latex format formula;
Vectogram drafting module, for calling the Jlatex function library to believe the drafting for corresponding to the Latex format formula Breath is plotted on the PDF vectogram of creation;
File type-setting module will be described in drafting for the location information based on the Latex format formula in pdf document PDF vectogram is inserted at location information corresponding with the Latex format formula, to obtain the pdf document after typesetting.
8. device according to claim 7, which is characterized in that the size determining module is specifically used for according to Formula analysis function in Jlatex function library determines the size of the Latex format formula.
9. device according to claim 7, which is characterized in that the vectogram drafting module is specifically used for, and generates a packet The JAVA object of the vectogram containing PDF, the JAVA object are used to simulate the Graphics2D class of JAVA;Call the JLatex letter The drafting formula interface in number library, transmits the JAVA object;The drafting information of the Latex format formula is received, described in calling The drafting information is converted to PDF and draws instruction, to be plotted in the PDF by the drawing image function in Graphics2D class On vectogram.
10. device according to claim 9, which is characterized in that the drafting information includes content information and corresponds to The location information of content information, the content information include: text information and symbolic information.
CN201810168769.2A 2018-02-28 2018-02-28 The composition method and device of formula in a kind of pdf document Active CN108399156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810168769.2A CN108399156B (en) 2018-02-28 2018-02-28 The composition method and device of formula in a kind of pdf document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810168769.2A CN108399156B (en) 2018-02-28 2018-02-28 The composition method and device of formula in a kind of pdf document

Publications (2)

Publication Number Publication Date
CN108399156A CN108399156A (en) 2018-08-14
CN108399156B true CN108399156B (en) 2019-09-13

Family

ID=63096708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810168769.2A Active CN108399156B (en) 2018-02-28 2018-02-28 The composition method and device of formula in a kind of pdf document

Country Status (1)

Country Link
CN (1) CN108399156B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507067A (en) * 2019-01-31 2020-08-07 北京易真学思教育科技有限公司 Method for obtaining formula pictures, method and device for transferring formula pictures
CN110059628A (en) * 2019-04-18 2019-07-26 广东小天才科技有限公司 Image recognition method, device, equipment and storage medium
CN112836469A (en) * 2021-01-27 2021-05-25 北京百家科技集团有限公司 Information rendering method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277925B2 (en) * 1999-12-08 2007-10-02 Warnock Kevin L Internet document services
CN101046801A (en) * 2006-03-31 2007-10-03 梅国栋 Chinese periodical half-measure platen based on latex language
CN101329731A (en) * 2008-06-06 2008-12-24 南开大学 Automatic Recognition Method of Mathematical Formula in Image
CN101714133A (en) * 2009-11-18 2010-05-26 佛山市数苑科技信息有限公司 WEB-based mathematical formula editing system and method
CN105654534B (en) * 2015-12-29 2018-01-09 南京大学 A kind of academic poster Automatic Typesetting generation method
CN105868177A (en) * 2016-03-24 2016-08-17 河北师范大学 Universal formula search method

Also Published As

Publication number Publication date
CN108399156A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN107832108B (en) Rendering method and device of 3D canvas webpage elements and electronic equipment
CN106095437B (en) The implementation method and device of the user interface layout type of RTL from right to left
CN103823620B (en) Screen adaption method and device
CN103313120B (en) Show method, mobile terminal, high in the clouds and the system of picture
US10664980B2 (en) Vector graphics handling processes for user applications
CN104298725B (en) The method that online courseware development system disposably edits input multi version output
CN108399156B (en) The composition method and device of formula in a kind of pdf document
CN105930312B (en) A kind of printing strip edit methods and device based on POS terminal
CN105635464A (en) Message processing method and apparatus
CN116757165B (en) Method for projecting effect tool to OFD file based on layout data stream file base plate
CN110211484A (en) A kind of electronics price tag display methods, system and server and storage medium
CN106021353A (en) Display adaption method and system of webpage
CN110096275A (en) A kind of page processing method and device
CN107301046A (en) Treating method and apparatus, computer equipment and the storage medium of icon
CN105227873B (en) A kind of test method and device of on-screen display data
CN109543130A (en) The display methods and device of label under three-dimensional scenic
KR20200065797A (en) 3D spatial information visualization system and method
CN114860205A (en) Application extension system, method and device of low-code development platform
CN115988170B (en) Method and device for clearly displaying English characters in real-time video combined screen in cloud conference
CN108733441A (en) A kind of rendering method for visualizing and system suitable for large scale electric network symbolic device
KR101912931B1 (en) Software development method, device, and computer readable medium based on object oriented block
JP2005055573A (en) High-speed display processor
CN110975284A (en) Unity-based NGUI resource rendering processing method and device
CN110990104B (en) Texture rendering method and device based on Unity3D
CN104793837A (en) Picture generation method and device

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