Skip to main content
Inspiring
August 30, 2018
Answered

Export variables to pdf??

  • August 30, 2018
  • 5 replies
  • 1243 views

Hi! I'm trying to create an exercise where users can write a "to do list". I have a pdf template with text boxes and i want to transfer the text from text entry boxes to the pdf so the user can download it. my idea is to make a button that open the pdf in new window but i don't know how to transfer the variables. help ❤️

    This topic has been closed for replies.
    Correct answer danielg21110809

    I found this that work a lot:  https://elearningbrothers.com/3-ways-print-pdf-captivate-8/

    5 replies

    danielg21110809AuthorCorrect answer
    Inspiring
    September 3, 2018
    Inspiring
    August 31, 2018
    there is not even a way to create a button that makes a screenshoot to the page and save it?

    chrismay_at_delta6226261
    Inspiring
    August 31, 2018

    you could try adding this CSS into the html file captivate creates. I'm not sure all browser support this, it would need some testing

    <style type="text/css" media="print">
     
    @page { size: landscape; }
    </style>

    chrismay_at_delta6226261
    Inspiring
    August 31, 2018

    To create a .pdf you would need to send the vars to a server-side script, or use a javascript library to generate the .pdf. If you are a JS guru, have a look at PDF.js.  Or you can use FPDF library for PHP.

    If you just want your users to be able to print - or if they have the capability to print to .pdf, then you can easily add a button in Captivate with the following JS:

    window.print();

    This will open the browser's standard print dialog box.

    Inspiring
    August 31, 2018

    I tried with "window.print();" but it cut the page:

    Inspiring
    August 31, 2018

    Right - the print set up defaulted to portrait orientation. Users have to make sure to select landscape orientation to print the page as it appears on screen. That will be different for each operating system. You may want to give instructions for selecting landscape.

    Lilybiri
    Brainiac
    August 30, 2018

    Why not insert the variables that have been populated by the TEB's on a slide and let them print?  Is that pdf a form?

    Inspiring
    August 31, 2018

    and how can i print another slide? can i creat a button that allow to print the slide as pdf?

    Inspiring
    August 31, 2018

    If the slide is just static (no interactive elements) it will be easier to just make a pdf document yourself and have button that links to it. Printing off of a Captivate screen likes to default to portrait orientation and many browsers will not let you change that.