CN103309848B - Excel document turns the method for pdf document - Google Patents

Excel document turns the method for pdf document Download PDF

Info

Publication number
CN103309848B
CN103309848B CN201310236473.7A CN201310236473A CN103309848B CN 103309848 B CN103309848 B CN 103309848B CN 201310236473 A CN201310236473 A CN 201310236473A CN 103309848 B CN103309848 B CN 103309848B
Authority
CN
China
Prior art keywords
document
excel
pdf document
virtual machine
pdf
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
CN201310236473.7A
Other languages
Chinese (zh)
Other versions
CN103309848A (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
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
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

Abstract

A kind of method that excel document turns pdf document, including: after convert task starts, judge the current operating system run has installed JAVA virtual machine the most, if, then start JAVA virtual machine, if it is not, install JAVA virtual machine in current operation system according to the JAVA virtual machine installation kit prestored, then start JAVA virtual machine;Read the excel document of required conversion;JAVA virtual machine runs the excel pdf document converse routine write based on JAVA language excel document is converted into pdf document;Output pdf document.The method that above-mentioned excel document turns pdf document, use JAVA programming technique, utilize cross-platform JAVA virtual machine, by running the excel pdf document converse routine write based on JAVA language on the JAVA virtual machine in current operation system, excel document is converted into pdf document, can be implemented in the conversion of excel to pdf document between different operating system, the excel electronic document of main flow can be changed the support providing good, it is achieved between different operating system platform, excel document is to the convenient conversion of pdf document.

Description

Excel document turns the method for pdf document
Technical field
The present invention relates to file switch technology, particularly relate to a kind of method that excel document turns pdf document.
Background technology
Excel is a kind of software product of manufacturer of Microsoft exploitation, and traditional excel turns pdf mode, is usually In windows operating system, use the working method of pdf virtual printer printer emulation, by excel Electronic document prints with the form of pdf document.
Along with informationalized development, the file of Current electronic document class gets more and more, and pdf electronic document has body Long-pending little, can readability high, therefore turn the business demand of pdf electronic document for excel electronic document Also get more and more, and the Business Processing between different operating system platform increase, cross-platform between excel literary composition Shelves are converted into a kind of urgent needs to pdf document.
But owing to excel belongs to the product of manufacturer of Microsoft, therefore, in addition to windows operating system, and Due to the diversity between operating system, other operating system cannot realize the electricity of excel to pdf form The conversion of subdocument, significantly limit cross-platform between Business Processing application.
Summary of the invention
Based on this, it is necessary to the cross-platform conversion for the electronic document that cannot realize excel to pdf form is asked Topic, it is provided that a kind of method that excel document turns pdf document.
A kind of method that excel document turns pdf document, comprises the steps:
Step S1: after convert task starts, it is judged that the most installed JAVA in the current operating system run Virtual machine, the most then enter step S3, if it is not, enter step S2;
Step S2: install JAVA in current operation system according to the JAVA virtual machine installation kit prestored virtual Machine, subsequently into step S3;
Step S3: start described JAVA virtual machine;
Step S4: read the excel document of required conversion;
Step S5: run the excel-pdf document write based on JAVA language on described JAVA virtual machine Described excel document is converted into pdf document by converse routine;
Step S6: export described pdf document.
The method that above-mentioned excel document turns pdf document, uses JAVA programming technique, utilizes cross-platform JAVA Virtual machine, writes based on JAVA language by running on the JAVA virtual machine in current operation system Excel-pdf document converse routine, is converted into pdf document by excel document, it is possible to achieve in different operating system The conversion of excel to the pdf document between system, can change the excel electronic document of main flow and provide good Support, it is achieved between different operating system platform, excel document is to the convenient conversion of pdf document.
Accompanying drawing explanation
Fig. 1 is the method flow diagram that excel document turns pdf document;
Fig. 2 is the flow chart that excel document is converted into pdf document process.
Detailed description of the invention
The detailed description of the invention of the method that the excel document to the present invention turns pdf document is made in detail below in conjunction with the accompanying drawings Thin description.
It is the method flow diagram that excel document turns pdf document with reference to Fig. 1, Fig. 1, mainly comprises the steps:
Step S1: after convert task starts, it is judged that the most installed JAVA in the current operating system run Virtual machine, the most then enter step S3, if it is not, enter step S2;Wherein, described operating system is permissible Including: the operating systems such as windows, linux or unix, aforesaid operations system can fully run JAVA Virtual machine.
Step S2: install JAVA in current operation system according to the JAVA virtual machine installation kit prestored virtual Machine, subsequently into step S3.
Step S3: start described JAVA virtual machine.
Step S4: read the excel document of required conversion.
Preferably, excel document can be read with the form of file stream;Or, to specify source file address Mode reads excel document, it is intended that an input parameter is source excel file source.
Step S5: run the excel-pdf document write based on JAVA language on described JAVA virtual machine Described excel document is converted into pdf document by converse routine.
In one embodiment, described excel document is converted into the process of pdf document, shown in Figure 2, May include steps of:
Step S501, according to form number read described excel document form data, wherein, described form Information includes row, column sum and the pooling information of ranks;
Step S502, read the linguistic information of described excel document, headerfooter information and page info, root The configuration information of pdf document is obtained according to described linguistic information, headerfooter information and page info.
Wherein, described page info includes page-size and page orientation, as horizontal in the paper using A4 size Display;The configuration information of described pdf document is for the linguistic information of pdf document, headerfooter information after conversion And page info.
Step S503, the picture reading described excel document and row, column coordinate information thereof obtain picture set.
Step S504, one blank pdf document of establishment.
Step S505, according to described configuration information, described pdf document is initialized, and according to pictures Corresponding picture is write in described pdf document by the coordinate information closed.
Step S6: export described pdf document.
Preferably, pdf document can be exported with the form of file stream, or defeated in the way of specifying source file address Go out pdf document.
The method that the excel document of the present invention turns pdf document, it is possible to achieve excel between different operating system platform Document, to the convenient conversion of pdf document, has reasonable support to current excel document, is directed to current excel Being up to the form editor of word and picture in electronic document, picture format is also had by the present invention with word language Having good support, due to the characteristic of this development language JAVA, the exploitation to other software language can carry For good support.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for this area Those of ordinary skill for, without departing from the inventive concept of the premise, it is also possible to make some deformation and Improving, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended Claim is as the criterion.

Claims (5)

1. the method that an excel document turns pdf document, it is characterised in that comprise the steps:
Step S1: after convert task starts, it is judged that the most installed JAVA in the current operating system run Virtual machine, the most then enter step S3, if it is not, enter step S2;
Step S2: install JAVA in current operation system according to the JAVA virtual machine installation kit prestored virtual Machine, subsequently into step S3;
Step S3: start described JAVA virtual machine;
Step S4: read the excel document of required conversion;
Step S5: run the excel-pdf document write based on JAVA language on described JAVA virtual machine Described excel document is converted into pdf document by converse routine;Specifically include:
According to form number read described excel document form data, wherein, described form data include row, Row sum and the pooling information of ranks;
Read the linguistic information of described excel document, headerfooter information and page info, according to described language Information, headerfooter information and page info obtain the configuration information of pdf document;
The picture and the row, column coordinate information thereof that read described excel document obtain picture set;
Create a blank pdf document;
According to described configuration information, described pdf document is initialized, and according to the coordinate information of picture set Corresponding picture is write in described pdf document;
Step S6: export described pdf document.
The method that excel document the most according to claim 1 turns pdf document, it is characterised in that described Page info includes: page-size and page orientation.
The method that excel document the most according to claim 1 turns pdf document, described operating system includes: Windows, linux or unix operating system.
The method that excel document the most according to claim 1 turns pdf document, it is characterised in that described The step reading excel document in step S4 includes:
Read excel document with the form of file stream, or in the way of specifying source file address, read excel literary composition Shelves.
The method that excel document the most according to claim 1 turns pdf document, it is characterised in that described The step exporting described pdf document in step S6 includes: with the form output pdf document of file stream, or with The mode specifying source file address exports pdf document.
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 CN103309848A (en) 2013-09-18
CN103309848B true CN103309848B (en) 2016-11-30

Family

ID=

Citations (5)

* 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
CN102880596A (en) * 2012-09-13 2013-01-16 苏州阔地网络科技有限公司 Method and system for converting document format

Patent Citations (5)

* 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
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文档转换浅析;李文锋等;《现代计算机》;20080331;第158页 *

Similar Documents

Publication Publication Date Title
CN100356372C (en) Generating method of computer format document and opening method
CN102830928A (en) Method and device for acquiring text inquiry result and mobile equipment
CN103309560A (en) Multi-interface information display method and terminal
TW200504611A (en) Tags, and management method and management system using the same
CN104985939A (en) Laser marking machine control method and laser marking machine
JP2015049604A (en) Electronic apparatus and method for displaying electronic document
CN102346538B (en) Computer system
CN102332002B (en) Method and system for converting file from portable document format (PDF) to electronic publication (EPUB) format
CN102708710B (en) E-book reader and working method thereof
CN103309848B (en) Excel document turns the method for pdf document
CN105528334A (en) Method for processing document operation and terminal
CN101980133A (en) Method and system for detecting text selection region deviation of double-layer electronic file
CN103186636A (en) Method and system for loading readable file in mobile equipment
CN104765266A (en) Simulation clock display method and device and LED display control card
CN105718434A (en) Natural language formula editing method and system
CN103761395A (en) Method for generating dynamic report of virtual terminal of intelligent substation
CN103714179A (en) Multi-language supporting method and system for system blog
CN102708002B (en) Display management method of video card in baseboard management controller (BMC) s, and server
CN104615458B (en) A kind of method and system based on json data format module loadings
US20120036382A1 (en) Computer system with power saving function
CN102541903A (en) Comma separated value (CSV) to microsoft excel (XLS) format conversion mode
CN103309848A (en) Method for converting excel document into pdf document
CN201812335U (en) Embedding type book managing device
CN105068833B (en) The method of BS system tab pattern fast transferrings based on card format
CN103020030A (en) Electronic device and method for quickly introducing mail into editing interface of notepad

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
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

Effective date of registration: 20200526

Granted publication date: 20161130

PD01 Discharge of preservation of patent

Date of cancellation: 20201117

Granted publication date: 20161130