This question already has an answer here: Convert HTML + CSS to PDF with PHP? [closed] 30 answers for using FPDF you can download from the link and for more information , Here's http://fpdf.org after that you can integrate as follows.. <?php require_once('fpdf.php'); class PDF extends FPDF { function Header() { $query='your query'; $row=mysql_fetch_assoc($
这个问题在这里已经有了答案: 使用PHP将HTML + CSS转换为PDF? [已关闭] 30个回答 对于使用FPDF,您可以从链接下载并了解更多信息,这里是http://fpdf.org 之后你可以整合如下.. <?php require_once('fpdf.php'); class PDF extends FPDF { function Header() { $query='your query'; $row=mysql_fetch_assoc($query); // data from database $this->SetXY(50,60);
Possible Duplicate: Convert HTML + CSS to PDF with PHP? Is there a Codeigniter library for us to convert a HTML/CSS page into a PDF? I believe WKHTMLTOPDF works but the instructions (requiring MochiWeb) to install it seem too complicated for me. Is there an easier solution like dropping in a plugin/libary and getting it to work? There are a number of HTML to PDF libraries out there, MPDF
可能重复: 使用PHP将HTML + CSS转换为PDF? 是否有Codeigniter库让我们将HTML / CSS页面转换为PDF? 我相信WKHTMLTOPDF的作品,但指示(需要MochiWeb)来安装它似乎对我来说太复杂了。 是否有更简单的解决方案,比如放入插件/库文件并让它起作用? 有很多HTML到PDF的库,MPDF是优秀和免费的。 PrinceXML在功能设置和输出方面是迄今为止最好的,但它很昂贵。 所有这些都有PHP包装器,但Codegigniter没有特定的。 这
Possible Duplicate: Convert HTML + CSS to PDF with PHP? I'm on a basic Apache with no extensions apart from default enabled and I want to create a PDF file from the current page. The current page is PHP echoing out some variables but I want to create a PDF document from the HTML and text currently shown on the page. Something like WHMCS quote system. You could use a third party solu
可能重复: 使用PHP将HTML + CSS转换为PDF? 我在一个基本的Apache上,除了默认启用之外没有任何扩展,我想从当前页面创建一个PDF文件。 当前页面是PHP回显了一些变量,但我想从HTML和当前显示在页面上的文本创建一个PDF文档。 像WHMCS报价系统。 您可以使用第三方解决方案,例如: http://pdfcrowd.com/ http://www.web2pdfconvert.com/ http://html-pdf-converter.com/ 我推荐pdfcrowd.com - 它有一个可以
Possible Duplicate: Convert HTML + CSS to PDF with PHP? I have a form with 5 fields, two of which are textboxes extended with tinyMCE, the rest are simple inputs of type text. I need to generate a PDF from this input. I understand that I can use Zend_Pdf to generate the PDF and include the plain text data. But how, for example, can I include a bulleted list from the tinyMCE fields? Woul
可能重复: 使用PHP将HTML + CSS转换为PDF? 我有一个有5个字段的表单,其中两个是使用tinyMCE扩展的文本框,其余都是简单的文本输入。 我需要从这个输入中生成一个PDF。 我知道我可以使用Zend_Pdf生成PDF并包含纯文本数据。 但是,例如,我可以如何在tinyMCE字段中包含项目符号列表? 最好的方法是创建一个HTML文件,然后使用例如DOMPDF或HTML2PDF? 理想情况下,我宁愿只使用zend框架来创建文档,定位并插入字段,
Possible Duplicates: Convert HTML + CSS to PDF with PHP? Hi guys I am working with my new project. I want to generate a new pdf file with the help of PHP code. How can i do this? Do you any have any ideas? thanks You can try free libraries like fPdf FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF s
可能重复: 使用PHP将HTML + CSS转换为PDF? 嗨,大家好 我正在与我的新项目合作。 我想在PHP代码的帮助下生成一个新的PDF文件。 我怎样才能做到这一点? 你有什么想法吗? 谢谢 你可以尝试免费的图书馆,如fPdf FPDF是一个PHP类,允许使用纯PHP生成PDF文件,也就是说不使用PDFlib库。 FPDF的F表示免费:您可以将其用于任何形式的使用,并对其进行修改以适应您的需求。 从Zend Framework看Zend_PDF - 它允许
Possible Duplicate: Convert HTML + CSS to PDF with PHP? Is it possible to convert a HTML page to PDF using PHP, and if so, how can it be done? Specifically, the page is an invoice generated dynamically. So I would like it loaded using: http://example.com/invoices/3333 And the HTML output would have to be converted to PDF. Any good libraries that do this will be fine. If you wish to c
可能重复: 使用PHP将HTML + CSS转换为PDF? 是否可以使用PHP将HTML页面转换为PDF,如果可以,怎么办? 具体来说,该页面是动态生成的发票。 所以我想用它加载: http://example.com/invoices/3333 HTML输出必须转换为PDF。 任何好的图书馆都会这样做。 如果您希望从php 创建 pdf,pdflib将帮助您(如其他人所建议的那样)。 否则,如果你想通过PHP 将 HTML页面转换为PDF,你会发现这里有点麻烦。3年来,我一直在
I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7. It uses fairly basic CSS to style it and renders fine in HTML. I'm now after a way of converting it to PDF. I have tried: DOMPDF: it had huge problems with tables. I factored out my large nested tables and it helped (before it was just consuming up to 128M of memory then dying--thats my limit on memory in php.i
我有一个在Firefox 3和IE 7中呈现良好的HTML(不是XHTML)文档。它使用相当基本的CSS来设计它,并且在HTML中渲染得很好。 我现在正在将它转换为PDF。 我努力了: DOMPDF:它有很多表格问题。 我分解了我的大型嵌套表,并且它有所帮助(在它耗尽高达128M的内存然后死亡之前 - 这是我在php.ini中对内存的限制),但是它使得表格变得非常混乱,似乎并没有得到图片。 这些表只是基本的东西,有些边框样式可以在不同的点添加一
I need to get the contents of a remote file, but with sending a few headers, and one of them is the "Connection: keep-alive" header... so I tried it with a simple call to file_get_contents(), like this: <?php $sfheaders="Cache-Control:max-age=0 Connection:keep-alive"; $opts = array( 'http' => array( 'method' => "GET", 'header' => $sfheaders ) ); $
我需要获取远程文件的内容,但是发送一些头文件,其中一个头文件是“Connection:keep-alive”头文件...所以我试着用一个简单的方法调用file_get_contents(),像这样: <?php $sfheaders="Cache-Control:max-age=0 Connection:keep-alive"; $opts = array( 'http' => array( 'method' => "GET", 'header' => $sfheaders ) ); $context = stream_context_create($opts); $url="http://so
Using PHP, what's the fastest way to convert a string like this: "123" to an integer? Why is that particular method the fastest? What happens if it gets unexpected input, such as "hello" or an array? I've just set up a quick benchmarking exercise: Function time to run 1 million iterations -------------------------------------------- (int) "123":
使用PHP,什么对这样的字符串转换的最快方法: "123"为整数? 为什么这种特定方法最快? 如果它得到意外的输入,例如"hello"或数组,会发生什么? 我刚刚开始了一个快速的基准测试: Function time to run 1 million iterations -------------------------------------------- (int) "123": 0.55029 intval("123"): 1.0115 (183%) (int) "0":
I am finding a way to get the difference between client clock and server clock. Till now i have tried the following approach. collecting: client request time server time client response time the problem is we get unknown delay between request to reach server and response to reach client. Here's an implementation of this scheme using JavaScript and PHP: time.js var request = n
我正在寻找一种方法来获得客户端时钟和服务器时钟之间的差异。 直到现在我已经尝试了以下方法。 搜罗: 客户端请求时间 服务器时间 客户端响应时间 问题是我们在到达服务器的请求和到达客户端的响应之间得到了未知的延迟。 下面是使用JavaScript和PHP的这个方案的一个实现: time.js var request = new XMLHttpRequest(); request.onreadystatechange = readystatechangehandler; request.open("POST", "http://