Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Generate an image from a chart visualforce page renderedAs pdf

Hello I have a problem with a visualforce page renderedAs pdf, I need to display chart with apexchart but it's impossible to run javascript in a visualforce renderedAs pdf. My question is, is there any solution for doing that? I was thinking to calling another visualforce page (from the one renderedAs pdf) not rendered As pdf and run javascript there, then generate the data:image/png;base64 and returning this url from the second visualforce page (the one not renderedAs pdf) to apex controller. I don't know if this can be done. I hope someone can help me. THANKS!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ultimately you need browser to run the JavaScript chart libraries. You'll have hard time with it.

You could generate the image earlier (user clicking something on VF page, your JS running, grabbing contents of element or however the chart is done, calling toDataUrl, saving as file/attachment somewhere) and then the pdf page can just reference the file.

There are charting solutions on the web that return an image similar to https://developers.google.com/chart/image but it's ancient and well... you'd need to learn new API and be OK with sending your data to some 3rd party to get the image back. Probably a lot of them will be paid too.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!