CN103309848A - Method for converting excel document into pdf document - Google Patents

Method for converting excel document into pdf document Download PDF

Info

Publication number
CN103309848A
CN103309848A CN2013102364737A CN201310236473A CN103309848A CN 103309848 A CN103309848 A CN 103309848A CN 2013102364737 A CN2013102364737 A CN 2013102364737A CN 201310236473 A CN201310236473 A CN 201310236473A CN 103309848 A CN103309848 A CN 103309848A
Authority
CN
China
Prior art keywords
document
excel
pdf
pdf document
virtual machine
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
CN2013102364737A
Other languages
Chinese (zh)
Other versions
CN103309848B (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 CHINASOFT CREATIVE INFORMATION SYSTEM CO Ltd
Foshan Power Supply Bureau of Guangdong Power Grid Corp
Original Assignee
Shenzhen Chinasoft Creative Information System Co ltd
Foshan Power Supply Bureau of Guangdong Power Grid Corp
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 Chinasoft Creative Information System Co ltd, Foshan Power Supply Bureau of Guangdong Power Grid Corp filed Critical Shenzhen Chinasoft Creative Information System Co ltd
Priority to CN201310236473.7A priority Critical patent/CN103309848B/en
Priority claimed from CN201310236473.7A external-priority patent/CN103309848B/en
Publication of CN103309848A publication Critical patent/CN103309848A/en
Application granted granted Critical
Publication of CN103309848B publication Critical patent/CN103309848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

A method for converting an excel document into a pdf document comprises the steps as follows: after a conversion task is started, whether a currently operating operation system is equipped with a JAVA virtual machine or not is judged, if yes, the JAVA virtual machine is started, otherwise, the JAVA virtual machine is installed in the currently operating operation system according to a prestored JAVA virtual machine installation package, and then the JAVA virtual machine is started; an excel document which is required to be converted is read; and an excel-pdf document conversion program which is written based on a JAVA language is operated on the JAVA virtual machine so as to convert the excel document into the pdf document; and the pdf document is output. According to the method for converting the excel document into the pdf document, the JAVA programming technique is adopted, a cross-platform JAVA virtual machine is utilized, and the excel-pdf document conversion program which is written based on the JAVA language is operated on the JAVA virtual machine in the currently operating operation system, so as to convert the excel document into the pdf document; therefore, the conversion from the excel document to the pdf document in different operation systems can be achieved, a good support can be provided for the mainstream excel electronic document conversion, and the convenient and fast conversion from the excel document to the pdf document in different operation system platforms can be achieved.

Description

The excel document turns the method for pdf document
Technical field
The present invention relates to the file conversion technology, particularly relate to the method that a kind of excel document turns the pdf document.
Background technology
Excel is a kind of software product of manufacturer of Microsoft exploitation, traditional excel turns the pdf mode, generally be in windows operating system, adopt the working method of pdf virtual printer printer emulation, the form of excel electronic document with the pdf document printed.
Along with informationalized development, the file of current electronic document class is more and more, the pdf electronic document has that volume is little, reading property high, therefore turn the business demand of pdf electronic document for the excel electronic document also more and more, and the business processing between the different operating system platform increases, and the excel document between cross-platform is converted into a kind of active demand to the pdf document.
But because excel belongs to the product of manufacturer of Microsoft, therefore, except windows operating system, and because the otherness between the operating system, in other operating system, can't realize excel to the conversion of the electronic document of pdf form, greatly limited cross-platform between business processing use.
Summary of the invention
Based on this, being necessary provides a kind of excel document to turn the method for pdf document for realizing the cross-platform transfer problem of excel to the electronic document of pdf form.
A kind of excel document turns the method for pdf document, comprises the steps:
Step S1: after convert task starts, judge in the operating system of current operation whether the JAVA virtual machine has been installed, if, then enter step S3, if not, enter step S2;
Step S2: according to the JAVA virtual machine installation kit that prestores the JAVA virtual machine is installed in current operation system, is then entered step S3;
Step S3: start described JAVA virtual machine;
Step S4: the excel document that reads required conversion;
Step S5: the excel-pdf document converse routine that moves based on the JAVA language compilation at described JAVA virtual machine converts described excel document to the pdf document;
Step S6: export described pdf document.
Above-mentioned excel document turns the method for pdf document, adopt the JAVA programming technique, utilize cross-platform JAVA virtual machine, by the excel-pdf document converse routine of the operation of the JAVA virtual machine in current operation system based on the JAVA language compilation, convert the excel document to the pdf document, can realize that excel between different operating system is to the conversion of pdf document, can provide good support to the excel electronic document conversion of main flow, realize that the excel document is to the convenient conversion of pdf document between the different operating system platform.
Description of drawings
Fig. 1 is the method flow diagram that the excel document turns the pdf document;
Fig. 2 is for converting the excel document to the process flow diagram of pdf document process.
Embodiment
Below in conjunction with accompanying drawing the embodiment that excel document of the present invention turns the method for pdf document is described in detail.
With reference to figure 1, Fig. 1 is the method flow diagram that the excel document turns the pdf document, mainly comprises the steps:
Step S1: after convert task starts, judge in the operating system of current operation whether the JAVA virtual machine has been installed, if, then enter step S3, if not, enter step S2; Wherein, described operating system can comprise: the operating systems such as windows, linux or unix, the aforesaid operations system can both move the JAVA virtual machine in good condition.
Step S2: according to the JAVA virtual machine installation kit that prestores the JAVA virtual machine is installed in current operation system, is then entered step S3.
Step S3: start described JAVA virtual machine.
Step S4: the excel document that reads required conversion.
Preferably, can read with the form of document flow the excel document; Perhaps, read the excel document in the mode of assigned source file address, specifying an input parameter is source excel file source.
Step S5: the excel-pdf document converse routine that moves based on the JAVA language compilation at described JAVA virtual machine converts described excel document to the pdf document.
In one embodiment, described excel document is converted to the process of pdf document, referring to shown in Figure 2, can comprise the steps:
Step S501, read the form data of described excel document according to the form number, wherein, described form data comprises the pooling information of row, column sum and ranks;
Step S502, the language message that reads described excel document, headerfooter information and page info obtain the configuration information of pdf document according to described language message, headerfooter information and page info.
Wherein, described page info comprises page size and page orientation, laterally shows such as the paper that adopts the A4 size; The configuration information of described pdf document is language message, headerfooter information and page info for pdf document after the conversion.
Step S503, the picture that reads described excel document and row, column coordinate information thereof obtain the picture set.
The pdf document of step S504, a blank of establishment.
Step S505, according to described configuration information described pdf document is carried out initialization, and write in the described pdf document according to the coordinate information of the picture set picture with correspondence.
Step S6: export described pdf document.
Preferably, can be with the formal output excel document of document flow, or export the excel document in the mode of assigned source file address.
Excel document of the present invention turns the method for pdf document, can realize that the excel document is to the convenient conversion of pdf document between the different operating system platform, present excel document there is reasonable support, be directed to the form editor who mostly is literal and picture in the present excel electronic document most, the present invention also has good support to picture format and word language, because the characteristic of this development language JAVA, can provide good support to other the exploitation of software language.
The above embodiment has only expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (6)

1. an excel document turns the method for pdf document, it is characterized in that, comprises the steps:
Step S1: after convert task starts, judge in the operating system of current operation whether the JAVA virtual machine has been installed, if, then enter step S3, if not, enter step S2;
Step S2: according to the JAVA virtual machine installation kit that prestores the JAVA virtual machine is installed in current operation system, is then entered step S3;
Step S3: start described JAVA virtual machine;
Step S4: the excel document that reads required conversion;
Step S5: the excel-pdf document converse routine that moves based on the JAVA language compilation at described JAVA virtual machine converts described excel document to the pdf document;
Step S6: export described pdf document.
2. excel document according to claim 1 turns the method for pdf document, it is characterized in that, the step that converts described excel document to the pdf document among the described step S5 comprises:
Read the form data of described excel document according to the form number, wherein, described form data comprises the pooling information of row, column sum and ranks;
Read language message, headerfooter information and the page info of described excel document, obtain the configuration information of pdf document according to described language message, headerfooter information and page info;
The picture and the row, column coordinate information thereof that read described excel document obtain the picture set;
Create the pdf document of a blank;
According to described configuration information described pdf document is carried out initialization, and write in the described pdf document according to the coordinate information of the picture set picture with correspondence.
3. excel document according to claim 2 turns the method for pdf document, it is characterized in that, described page info comprises: page size and page orientation.
4. excel document according to claim 1 turns the method for pdf document, and described operating system comprises: windows, linux or unix operating system.
5. excel document according to claim 1 turns the method for pdf document, it is characterized in that, the step that reads the excel document among the described step S4 comprises:
Form with document flow reads the excel document, or reads the excel document in the mode of assigned source file address.
6. excel document according to claim 1 turns the method for pdf document, it is characterized in that, the step of the described pdf document of output comprises among the described step S6: with the formal output excel document of document flow, or export the excel document in the mode of assigned source file address.
CN201310236473.7A 2013-06-14 Excel document turns the method for pdf document Active CN103309848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310236473.7A CN103309848B (en) 2013-06-14 Excel document turns the method for pdf document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310236473.7A CN103309848B (en) 2013-06-14 Excel document turns the method for pdf document

Publications (2)

Publication Number Publication Date
CN103309848A true CN103309848A (en) 2013-09-18
CN103309848B CN103309848B (en) 2016-11-30

Family

ID=

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763174A (en) * 2018-05-30 2018-11-06 中国建设银行股份有限公司 A kind of method and device of file conversion
CN109918622A (en) * 2019-02-27 2019-06-21 中国地质大学(武汉) The method and system converted from Word document to LaTeX document are realized based on JAVA
CN111639112A (en) * 2020-06-11 2020-09-08 中机科(北京)车辆检测工程研究院有限公司 Detection report data extraction statistical method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010266968A (en) * 2009-05-12 2010-11-25 Axissoft Corp Data management server, data management program and data management method for managing input data to spreadsheet
CN102243665A (en) * 2011-08-22 2011-11-16 上海梅花信息有限公司 Document online playing system and method thereof
CN102254005A (en) * 2011-07-15 2011-11-23 苏州阔地网络科技有限公司 Method for transforming and displaying document on webpage
CN102542018A (en) * 2011-12-16 2012-07-04 深圳中兴网信科技有限公司 Web online file viewing system and file conversion device
US20120278705A1 (en) * 2010-01-18 2012-11-01 Yang sheng-wen System and Method for Automatically Extracting Metadata from Unstructured Electronic Documents
CN102880596A (en) * 2012-09-13 2013-01-16 苏州阔地网络科技有限公司 Method and system for converting document format

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010266968A (en) * 2009-05-12 2010-11-25 Axissoft Corp Data management server, data management program and data management method for managing input data to spreadsheet
US20120278705A1 (en) * 2010-01-18 2012-11-01 Yang sheng-wen System and Method for Automatically Extracting Metadata from Unstructured Electronic Documents
CN102254005A (en) * 2011-07-15 2011-11-23 苏州阔地网络科技有限公司 Method for transforming and displaying document on webpage
CN102243665A (en) * 2011-08-22 2011-11-16 上海梅花信息有限公司 Document online playing system and method thereof
CN102542018A (en) * 2011-12-16 2012-07-04 深圳中兴网信科技有限公司 Web online file viewing system and file conversion device
CN102880596A (en) * 2012-09-13 2013-01-16 苏州阔地网络科技有限公司 Method and system for converting document format

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李文锋等: "Java实现Word文档到XML文档转换浅析", 《现代计算机》, 31 March 2008 (2008-03-31) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763174A (en) * 2018-05-30 2018-11-06 中国建设银行股份有限公司 A kind of method and device of file conversion
CN109918622A (en) * 2019-02-27 2019-06-21 中国地质大学(武汉) The method and system converted from Word document to LaTeX document are realized based on JAVA
CN111639112A (en) * 2020-06-11 2020-09-08 中机科(北京)车辆检测工程研究院有限公司 Detection report data extraction statistical method and system

Similar Documents

Publication Publication Date Title
CN102201009B (en) Form generating method and device
CN106933632A (en) FPGA function online upgrading methods based on Ethernet
CN103440264B (en) The realization method and system of electric power field operation form
CN104899027A (en) Universal form verification method for js
CN103176802B (en) Realize the method that the user interface UI of system separates with widget library by control pond
CN102298575A (en) Method and system for copying and pasting Word file content with format
CN104461538A (en) Report generation method and report generation system
US8856429B2 (en) Data storage device based on SPI and its controlling method
CN104537148A (en) Statistical method for bolt information in PDMS (Product Data Management System) model
US20100153622A1 (en) Data Access Controller and Data Accessing Method
CN105528334A (en) Method for processing document operation and terminal
CN103309848A (en) Method for converting excel document into pdf document
CN102375889A (en) Method for constructing webpage through webpage construction database
CN103761395A (en) Method for generating dynamic report of virtual terminal of intelligent substation
CN103559280A (en) Method for flexibly storing and displaying icons
CN103309848B (en) Excel document turns the method for pdf document
CN202110466U (en) Memory-extensible hand-held equipment circuit structure
CN103455290A (en) Visio document-based general report template print method
CN102385474B (en) Data output method, device and system
CN102760212A (en) Virtual desktop malicious code detecting method based on storage mirroring cloning mechanism
CN201638013U (en) Imaging box chip and imaging box with same
CN102880689B (en) Method for exhibiting contents of office files in web application quickly and conveniently
CN101526999A (en) Image and character separating and outputting device and method thereof
CN101615118A (en) The method of exporting prototype and device
CN104281419A (en) Transformer substation device universal printing method based on middleware

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 528011 No. 1 South Fenjiang Road, Chancheng District, Guangdong, Foshan

Co-patentee after: Shenzhen Chinasoft Creative Information System Co., Ltd.

Patentee after: FOSHAN POWER SUPPLY BUREAU OF GUANGDONG POWER GRID CORPORATION

Address before: 528000 Fenjiang South Road, Chancheng District, Guangdong, No. 1, No.

Co-patentee before: Shenzhen Chinasoft Creative Information System Co., Ltd.

Patentee before: Foshan Power Supply Bureau, Guangdong Power Grid Corporation

PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20200526

Granted publication date: 20161130

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20201117

Granted publication date: 20161130