online pdf generation

泪湿孤枕 提交于 2020-01-23 19:22:57

问题


I'm looking to create PDF files instantly online given user input in my html/php page.

are there any FREE API's out there that will allow me to do this?


回答1:


various options, here are a couple:

  • Prince XML
  • wkhtmltopdf
  • TCPDF
  • HTML2PDF
  • PDF converter
  • PDFSharp
  • pdflib
  • formatter coverters



回答2:


Php uses the PDFlib library, it has a lot of pdf functions, check it out here http://php.net/manual/en/book.pdf.php




回答3:


You could probably use pdflib




回答4:


Hi You have two or three approaches:

1) If you can work with XML, that is, the source of your PDF file is in XML format, you could use XSL and XSL:Fo to generate the PDF. XSL and Fo are declarative languages so you can control the PDF layout external to your application. Fo creates only documents, not interactive forms.

2) If you can work in Java, you could use iText to generate the PDF using a jar/api. There is also iTextSharp for C#. Using iText, you can also create PDF Forms, not just documents.

3) If you have XHTML and just want to create PDFs that look like your HTML pages, there are several options - just search the web for HTML to PDF converters.




回答5:


If your pdf isn't overly complex, you should look into XFDF before making an architectural decision. The main benefit to this approach is that there is no need to store pdf's in the db or on hard drive. Additionally, I have seen many pdf generation implementations that use home grown batch processes that are buggy and only create another 'moving part' in an application. If you have very complex pdf needs and don't mind the overhead of storing the pdfs, pdflib is a good choice.



来源:https://stackoverflow.com/questions/1971174/online-pdf-generation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!