Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6860549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:25:21+00:00 2026-05-27T02:25:21+00:00

I have a template that has some Javascript used to generate graphs in the

  • 0

I have a template that has some Javascript used to generate graphs in the browser. I would like to use that same template to create a PDF and send as an attachment in an e-mail. In this scenario, there would be no browser/client interaction.

I am using the PDF module that is available from the Play website and I have managed to get the PDF rendering to work. The only issue is that the graphs don’t show up in the PDF but all other static text does. I’m assuming the graphs aren’t appearing in the PDF due to the Javascript not being executed prior to the PDF generation.

Does anyone have any ideas on how to get around this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:25:21+00:00Added an answer on May 27, 2026 at 2:25 am

    Since you are using the Play framework, the easiest way is likely to be using Rhino. http://www.mozilla.org/rhino/ That is Mozilla’s implementation of Javascript to run on the JVM, which is what the Play framework runs on. You may have to make some changes to the Javascript, for instance if it uses the browser Canvas API you would have to make a facade object that sends those drawing commands to the PDF drawing object instead of the screen. Or to both places if that is what you want.

    You might get a more detailed answer if you give some more information about the Javascript graphing code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some template code that I would prefer to have stored in a
I have template that looks like this: 100 template<size_t A0, size_t A1, size_t A2,
I have this Visual Studio solution that includes a project that has a template
I have an RJS template that I use to essentially do the following: Fade
1: I have a .html file that has some markup with some placeholder tags.
I am writing a template that extends templates, but it has some issues. <xsl:template
I have a Rails 2.1.2 site that only has html templates e.g. jobs.html.erb, so
I have a template that creates a unique identifier for each type it is
I have a template class that I serialize (call it C), for which I
I have a T4 template that generates classes from an xml file. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.