PHP data to chart to image to pdf [closed] - php

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 4 years ago.
Improve this question
I would like to generate a chart from a dataset and eventually put it in a pdf format. How would I go about doing this? Which packages would you recommend?

A solution might to go in two steps :
first, generate the chart, and save it as an image
then, embed this image in a PDF file
About the first point, there are many questions/answers that might help you ; for instance :
Graphs/Charts in PHP
What is the best open source PHP charting solution
Free Chart Libraries for PHP
References on creating Charts/Graphs in PHP ?
About the second point, I've not done that quite often, but I suppose Zend_Pdf, for instance, could be helpful -- note there are probably other solutions too !

I would look into these:
gChartPHP
pChart
Open Flash Chart
Dynamically Generate PDF file with
PHP

Take a look at the Diagrams AddOn for fpdf.
I've never used it but would give it a try before storing a raster image of a chart in a pdf.

You can insert charts in PDF as an image too.
Google's Image Charts is deprecated but still works.
A ditto copy of Google's Image Charts is Image Charts which has free version with their watermark.

Related

PHP Convert Word file to HTML without losing styling and images [closed]

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

PHP - Extract Text from Different File Formats Word/Excel/Powerpoint/PDF/RTF [closed]

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 6 months ago.
Improve this question
I am working on a web application where users can upload different files MS Word (.doc and .docx), Excel (.xls and .xlsx), Power point, PDF, text files and Rich Text Files (.rtf).
As part of the application flow I would like to display a preview of the contents of the files in an IFrame, HTML best but I can go with text, using a PHP class
The approach I am using is:
Identify the extension of each file
Process each file differently
Display the text or HMTL
Is there any library that does this?
There is no single library that solves the problem so I solved it using the following libraries for each file type:
a) MS Word documents - Live Docx (http://www.phplivedocx.org/2009/08/13/convert-docx-doc-rtf-to-html-in-php/)
b) MS Excel - PHP Excel (http://phpexcel.codeplex.com/)
c) Text from PDF - class from this Pastebin http://pastebin.com/hRviHKp1
d) Powerpoint - still work in progress
I have provided more details on my blog http://ssmusoke.wordpress.com/2012/06/16/display-contents-of-different-file-formats-wordexcelpowerpointpdfrtf-as-html/
I had a similar task a few years ago and we ended up using OpenOffice in server mode with ImageMagick to retrieve Thumbnails images of PowerPoint documents. For some kind of presentations library.
Basically the idea is to run OpenOffice and convert your documents to PDF and then use ImageMagick to create a thumbnail image of the first page of that PDF.
This guy here uses OpenOffice with another tool to convert documents: https://stackoverflow.com/a/1046159/626621 (could help you)
Advantage of this is, I think, that an image as a preview of the document will be more telling to your users than just the text.

PHP library for SVG dynamic graphs [closed]

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 was (quite) happy to use jpgraph for graphs in PHP, and when in need of "dynamicity", I just added the image map, handled hover and click events etc. (a bit clumsy in jpgraph, but possible).
But now I've seen pretty cool graphs made in SVG. I didn't know this dynamicity is possible in SVG!
Can you recommend any SVG dynamic graph library for PHP that could replace jpgraph in this sense? Thanks a lot.
Many libraries are using <canvas> instead of SVG. Then, it will really depends on your needs, but D3 is very impressive.
D3
Flot
gRaphael
Try this Raphael js add-on for charting.
http://g.raphaeljs.com/
From a PHP perspective, have a look at this, which looks good, maintained and interactive. Not sure if it covers all your dynamicity needs.
Looking for an alternative for jpGraph which started to cause complaints after upgrading the 'P' part in MAMP, I stumbled upon SVGGraph. Didn't convert my graphs to it yet.

Coverting DOC to PDF programmatically [closed]

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);

Clickable Elements in pchart? [closed]

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've been looking for a good open-source tool for creating graphs in PHP, and pChart is looking like a great candidate.
One need I have is to be able to click on certain elements of the graph, like a category label or an individual bar, to drill-down into the data, and display new data and new graphs on a new page.
Is this something that pChart supports? I know that it outputs image files, and I know that, in a pinch, I could try using HTML Image Maps to make parts of the chart clickable, but I'm hoping there's a more automated way.
If pCharts doesn't support this functionality, is there another php charting package you would reccomend that does? It would need to be open-source, and locally hosted (no Google Chart-type API's).
Thanks!
pChart does not support this directly, last I checked.
However, you can do it with CSS and overlaid elements! One site where you can see an example of this in action is http://craftcult.com/heartchart.php?userid=sugarpinkboutique (press the Get Chart button on the top chart for an example, choose 'seller buyers separate' first for a more elaborate example).
Essentially, you can overlay clickable elements over the chart using JavaScript and/or CSS/HTML. I suggest using absolute positioning in your CSS, and creating the elements with JS based on the data used to create the chart.
I do enjoy working with pChart. It's pretty well-written and flexible. I also saw this link here on SO relating to a library for doing something similar in JS : http://pchart.sunyday.net/ImageMap/

Categories