Press hotkey to print out template filled in with message text

Discussion in 'JS Plugin Requests' started by EnMod, Jan 26, 2016.

  1. EnMod

    EnMod noelquiles.com Veteran

    Messages:
    24
    Likes Received:
    3
    First Language:
    English
    Hello all!

    I'm working on an RMMV game that is like an interactive quiz hosted on the web.  When the player completes the quiz, they can see their score result before being asked to start again or quit.  My supervisor's supervisor had a request for it, that the score results page be printed out without using screenshots. 


    To that end, I've figured that the best way to go about this would be to create a plugin that, on pressing a hotkey:
    - sends the current score variable to an HTML/something else template
    - creates a PDF from that template as a sort of completion certificate with the score filled in (Congratulations, you got [score]! Try again later!)
    - sends PDF to the browser's print dialog

    How would I set this up?  I have considered some solutions and I think integrating the functionality of jsPDF (be patient, the site is very slow to finish loading) would be how I get the PDF to generate and get saved/printed, as I can hopefully call a get for the variable and use that in jsPDF.  

    Is there a simpler way to make this happen? Would I run into issues calling jsPDF within an MV plugin? I assume not since I would include jsPDF in the <head>, but the question remains. 

    Thanks for your time in advance!
     
    Last edited by a moderator: Jan 26, 2016
    #1

Share This Page