Dynamic Graphing / Charting within a PDF
Copy link to clipboard
Copied
I am trying to determine if it is possible to create a dynamic graph within a PDF. The example I am interested in is an ROI Worksheet. The user would enter the necessary values, the form does some basic calculations and a graph would show a bar chart with Years on the x-axis and Savings on the y-axis. This graph would change based on the inputs from the user. After some research, it would seem that it might be possible but have been unable to confirm. I also realize that such functionality depends on the PDF generator you are using. So, is it possible? If so, is there an example you could direct me to? Also, I realize that Excel is the more appropriate software for this task, but based on how I am using the form, I am restricted to a PDF format.
Thank you in advance for any help on these questions.
Copy link to clipboard
Copied
Holy :pile_of_poo:, this more like Wolfram Mathematica level...
Copy link to clipboard
Copied
It's possible, but there's not a lot of information out there. I've seen some people use annotations (lines, circles, text, etc.) or a method that relies on an undocumented JavaScript method and a knowledge of the PDF specification (e.g., drawing operators). You might find something with a search.
Copy link to clipboard
Copied
Thanks. I have done a lot of searching and came up with very little. The best I found was a video showing the functionality but did not reference the javascript or the PDF. So it was like unicorns exist, but good luck finding one and I am not telling you where to start. I also came across https://www.dynamicpdf.com/docs/dotnet/dynamic-pdf-charts-overview#Creating%20Charts
Copy link to clipboard
Copied
I understand. The problem is anything non-standard like this involves a good amount of custom programming, and people who do this are unwilling to give it away. Feel free to contact me by private message here and I can send a sample of the type of chart you describe.
Copy link to clipboard
Copied
It is very complicated to do something like that in PDF files, but not impossible. Luckily, bar charts are the easiest to implement, but still require a custom-made script. I've created various such scripts for my clients in the past so if you're interested in hiring someone to do it for you (for a fee, of course) feel free to contact me privately via [try6767 at gmail.com] to discuss it further.

