Page 1 of 1

Anyone have any experience of linking to graphics using PHP?

Posted: Tue Jul 17, 2007 9:10 am
by bubbagrub
Hi,

I'm not sure if this is the right forum for this question, in which case I apologise. I suspect my question is quite a hard one, but here goes. I am writing a fairly simple database application using PHP and MySQL. I need to have the application generate graphs (bar-graphs, pie-charts etc.), which I'd prefer to do using PHP (something like JPowered, I guess).

The tricky part, is that I want to be able to link to the graphs that I've generated in some way from a Word document report. In other words, if I generate a graph, I want to put that graph into my Word document, and if the underlying data in the database changes, then I want the graph to change in the Word document. I don't mind having to manually refresh something to make this happen, of course, but I don't want to have to regenerate each graph and copy it back into the Word document.

I'm guessing this involves using Linked Objects in Microsoft Word - and so the only solution I can currently think of is to export the data into Microsoft Excel and generate the graphs in Excel. That's ok, but I'd rather avoid the middle-step if possible.

Anyone have any thoughts on this? Even a vague possibility would be helpful, as at the moment I have no good ideas at all!

Thanks!

Posted: Tue Jul 17, 2007 10:22 am
by pickle
To the best of my knowledge, when you place an image into a Word document - it gets copied into that document. Therefore, any remote updates don't change the local copy. I'm not sure this can be done.

Posted: Tue Jul 17, 2007 10:26 am
by bubbagrub
pickle wrote:To the best of my knowledge, when you place an image into a Word document - it gets copied into that document. Therefore, any remote updates don't change the local copy. I'm not sure this can be done.
Ah well, that's true, but Word has the option of pasting a link - you do "Paste Special" and say "Paste Link". It works, for example, if you copy an Excel spreadsheet, but not for most other objects I've tried. I think it's OLE?