2013-08-05 4 views
-2

거기 html 내용을 pdf로, word docuement로 개조하고 파일을 능가하는 PHP 도서관이다. 는 이미 Php KoolGrid라는 라이브러리가HTML을 pdf, doc 및 xls로 변환하는 도서관

+0

다른 질문을 참조하십시오, http://stackoverflow.com/questions/13593870/how-to-create-a-pdf-file-from-an-html-using- 같은 수출하는 몇 가지 방법이있다 php-and-then-save-it-on-the-server –

+0

http://phpexcel.codeplex.com에서'phpexcel library'를 사용해보십시오 http://phpexcel.codeplex.com/wikipage?title=Features&referringTitle을보십시오 = Documents –

+0

모든 형식으로 변환 할 수있는 단일 라이브러리가 없습니다. PHPExcel은 Excel (BIFF 및 OfficeOpenXML)과 PDF를 모두 작성할 수 있으며 PHPWord는 Word (OfficeOpenXML)와 PDF를 모두 작성할 수 있습니다. 두 가지 모두 PDF 렌더링을위한 추가 타사 라이브러리가 필요합니다. 그러나 이미이 도구를 사용해 본 적이 있다면 어떻게 요구 사항을 충족시키지 못합니까? 정확히 무엇이 필요합니까? –

답변

0

여기이 http://html2pdf.fr/en/default

$html = file_get_contents("valid.html"); 
require_once("html2pdf.class.php"); 
$html2pdf = new HTML2PDF("P", "A4", "en", array(10, 10, 10, 10)); 
$html2pdf->setEncoding("ISO-8859-1"); 
$html2pdf->WriteHTML($html); 
$html2pdf->Output("pdf/PDF.pdf", "F"); //output to file 
$html2pdf->Output(); //output to browser 
0

을 시도 TCPDF 라이브러리, phpword, phpexcel하지만 서로 다른 라이브러리를 사용하여 시도했다, 그러나 그것은 단지에만 HTML 테이블을 수출 보인다. 그것은

• PHP::GridTableView::ExportToExcel() 
• PHP::GridTableView::ExportToWord() 
• PHP::GridTableView::ExportToCSV() 
• PHP::GridTableView::ExportToPDF() 
• PHP::ExportSettings::IgnorePaging 
• PHP::ExportSettings::FileName 
관련 문제