html 을 pdf 로 변환하여 다운로드 > php

본문 바로가기
사이트 내 전체검색

php

html 을 pdf 로 변환하여 다운로드

페이지 정보

작성자 서방님 댓글 0건 조회 429회 작성일 16-09-29 11:34

본문

http://pdfcrowd.com/html-to-pdf-api/
<?php
require 'pdfcrowd.php';

try
{   
    // create an API client instance
    $client = new Pdfcrowd("username", "apikey");

    // convert a web page and store the generated PDF into a $pdf variable
    $pdf = $client->convertURI('http://www.google.com/');

    // set HTTP response headers
    header("Content-Type: application/pdf");
    header("Cache-Control: max-age=0");
    header("Accept-Ranges: none");
    header("Content-Disposition: attachment; filename=\"google_com.pdf\"");

    // send the generated PDF 
    echo $pdf;
}
catch(PdfcrowdException $why)
{
    echo "Pdfcrowd Error: " . $why;
}
?>

http://www.devtoolshed.com/content/c-free-component-generate-pdf-convert-html-pdf

댓글목록

등록된 댓글이 없습니다.

Total 612건 14 페이지
게시물 검색

회원로그인

접속자집계

오늘
111
어제
163
최대
1,347
전체
154,645
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.