Home > php教程 > PHP源码 > PHP Word & Excel 转 PDF

PHP Word & Excel 转 PDF

PHP中文网
Release: 2016-05-25 16:58:47
Original
1863 people have browsed it

Word 转 PDF  

function wd2pdf($ori, $dst)
{
	$winword = new COM('Word.Application');
	$document = $winword->Documents->Open($ori);
	$document->ExportAsFixedFormat($dst, 17);
	$document->Close();
	$winword->Quit();
}
Copy after login

Excel 转 PDF

function xl2pdf($ori, $dst)
{
	$excel = new COM('Excel.Application');
	$workbook = $excel->Workbooks->Open($ori);
	$workbook->ExportAsFixedFormat(0, $dst);
	$workbook->Close();
	$excel->Quit();
}
Copy after login

                   

                   

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template