Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a library to help me convert DOC files to PDF using PHP.
I'm also open to using an external website if this functionality already exists elsewhere, as long as this website has a programmatic API and is free.
Any suggestions how to approach this?
I haven't looked at PHP in a very long time, but if you can make web service calls from it then try this product. It provides excellent conversion fidelity. It also supports additional formats including Infopath, Excel, PowerPoint etc and has Watermarking support as well.
Please note that I have worked on this product so the usual disclaimers apply.
Late but possibly useful as a general reference particularly in light of the "external website" option you mentioned - Docmosis provides a web-service api for creating doc + pdf + odt + other formats from any application that can invoke a REST web service (or HTTP post).
You can change the file extension of the word file to pdf,by using below code
$filename = preg_replace('".docx$"', '.pdf', $filename);
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I work on one project, I used html2pdf by spipu but unfortunately I encountered problems at the end, such as problems with pictures and also rendering. My question is what would you recommend if I want to convert the automatically generated html into a php file to pdf on my own domain and site. My idea is something like this that my given html generated code, which already shows me a browser as it would convert to pdf (using html5 ...). Also, and this is probably the biggest problem I need to get rid of before and after element. I was looking at different kinds but some require api key and registering and then converting this html somewhere else, and I would like to avoid it.
I've used tcpdf in the past it works great and it's open source.
Take a look at their website they have plenty of examples that might get you going.
Wanted to mention this answer as a comment since the question is vague but my SO reputation prevents me from that still..
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Can anybody advise on the best PDF generator class/library to use with PHP? Preferably one which is maintained.
I am aware that this is a duplicate of the following question, however, the accepted answer is over 3 years old and I want to know whether the answer has changed since this time.
Which one is the best PDF-API for PHP?
Thank you
Try TCPDF, have good features
http://www.tcpdf.org/examples.php
Also simple HTML to PDF Converter API in (PHP, C#, ASP.net C#, ASP VB.net, JAVA,...)
from "PDF CROWD"
http://pdfcrowd.com/html-to-pdf-api/
very simple to use, but I think this API may need to purchase even they provide a free test account..
Have you tried http://www.PDFnow.com?
Provides a powerful template engine, and is pretty easy to use.
Supports complex layouts, layouts for multiple pages, invoices spreading separate pages, pagenumbers, headers, footers, etc. Definitively much better than fpdf.
You can simply integrate it into your PHP code by:
generatePdf(<templateName>, <ParameterArray>);
very straightforward.
Have a look on http://wkhtmltopdf.org/ Convert HTML to PDF using WebKit engine.
It can be used from PHP easily. For example, there is a bundle for Symfony2: http://knpbundles.com/KnpLabs/KnpSnappyBundle
Best One is TCPDF
http://www.tcpdf.org/
Never Use DOMPDF
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there an API for converting word files to HTML without losing the format?
Can the google documents API be used for this?
I tried saaspose but the returning result is always a server error.
Solutions that did not work for me:
Converting MS Word document to html in php
I've spent a bit of time loking into this, and the best solution that I've found was to install unoconv on the server, and using PHP to interface with it through system calls.
I would have loved to find a good native PHP solution for this, but unfortunately I couldn't.
Edit
Since originally answering this, I've come across a web service which presents an API for converting documents. I haven't tested it very thoroughly but it does seem to produce decent results at converting Word to HTML: CloudConvert.
PHPDocx has a solution. According to site you may extract data directly from any database or spreadsheet and export them to other popular formats (PDF, DOC, HTML, ODT, ...) with the help of the conversion plugin. These reports may include editable graphs (only docx), images, tables, headers, footers, etcetera.
Am not sure how good it can convert word to html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am working on creating a website which will allow users to update a table using Javascript.
What I am looking for is a way to allow the user to export the table as an image (jpg, png etc.) or a PDF once it has been modified.
If there is a similar thread or topic please let me know, I don't really know where to start here. If you can recommend background reading that would be great too.
This is not something that can really be done client side (without installing software on the clients, of course). You will need to generate this PDF server-side.
How you do that depends on the language and platform you are using.
There are a couple open source PDF librarys you can use;
SharPDF, PDFClown, iTextSharp just to name a few...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have generated my REST API, and now I have to write a documentation for the API.
As the API is mainly generated by a third-party plugin it's not possible to generate the DOC automatically.
So what the best tool (to save time) to manually write a DOC?
PS: I do have github account, I wonder if the user pages can fit this need.
You might want to take a look at TechWriter for Web Services. It also supports generating documentation for REST APIs.
You can spent sometime to put DocBlock into all function/class you have built
A tool like PHPDOC is available for you to compile DocBlock into documentation and regenerate whatever you need (into your desired format).
Not to mention, is stored as static HTML