Skip to main content
Participant
April 28, 2021
Question

How do I graph, create KPIs and then display the produced graphic in a PDF file

  • April 28, 2021
  • 3 replies
  • 670 views

I am using javascript to create an interactive PDF. I have just been doing this for a few weeks so I'm definitely a beginner. I have been successful in collecting and storing data from user form input.

 

Now, I would like to graph results from this data (and ultimately create KPIs) and insert the generated images at predefined locations in the same PDF document - but I am not having any success.

1) I haven't been able to find PDF javascript APIs to create basic graphs.

2) Also I tried to import external library that creates KPIs into my PDF javascript logic but it didn't allow me to use the 'import' statement. 

Is what I'm trying to do possible? 

Thanks

This topic has been closed for replies.

3 replies

Legend
April 29, 2021

I honestly don't think PDF is your solution, even if it may be your deliverable. You might have a much less painful development process if you work with apps which are designed for graphing, and a front end app for data entry, then finally export to PDF. Yes, the user would need Acrobat, if Acrobat is your tool for exporting to PDF; depends on the graphing tool.

wr17Author
Participant
April 30, 2021

Thanks. This is helpful. I need to work with the customer to level-set their expections. 

try67
Community Expert
Community Expert
April 29, 2021

This is a very complex task, and sometimes impossible. The only way to do it is by using images or comments.

There are no external libraries I'm aware of that can do it. It has to be custom-made for your specific needs.

wr17Author
Participant
April 30, 2021

Thank you for your feedback on this. This confirms what I was seeing. 

Bernd Alheit
Community Expert
Community Expert
April 29, 2021

1) May be possible with the comment drawing objects.

wr17Author
Participant
April 30, 2021

Thank you for your feedback on this.