Search code examples
javascriptpdfflashchartsinteractive

How to embed interactive chart inside a pdf?


I have a requirement wherein we have to display a chart and few parameters (date, name etc) inside a pdf file. The user should be able to modify the chart depending upon the data selected by the user.

I have seen some examples https://www.youtube.com/watch?v=Z5bdBeFwNCU but not sure how these are getting generated.

Any pointer is highly appreciated. Also I am a java script developer so if there is any solution in JS It would be easier for me to follow


Solution

  • You can look into the docmentation of the creators (Adobe):

    Using JavaScript with PDF files - Tutorials about process.

    Javascript API reference for PDF format - a PDF document listing all commands.

    I did a few projects where charts/diagrams are created on the fly, based on user entries. For that, I used a combination of form fields and annotations, whose parameters are calculated using Acrobat JavaScript.

    There is also an undocumented function in Acrobat JavaScript which allows to create the icon for button form fields.

    As the actual approach depends a lot on the kind of information and graphs, one would have to look at what has to be accomplished. Feel free to contact me in private, if there is some interest. It might be worthwhile to look at "make or buy"…