Copy link to clipboard
Copied
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 ❤️
I found this that work a lot: https://elearningbrothers.com/3-ways-print-pdf-captivate-8/
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
and how can i print another slide? can i creat a button that allow to print the slide as pdf?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
the page is not static, because the user must type some words and i want to print that words that change for every user
Copy link to clipboard
Copied
JS window.print(); attached to a button that has to be pressed by the user. He can set up to print to a pdf.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
I tried with "window.print();" but it cut the page:
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
tried but don't work, it cut anyway a portion of page. It is so hard to make a button that print only the page portion of scorm? captivate haven't any function that print what the user see? very sad that this simple function doesn't exist..
Copy link to clipboard
Copied
I agree - it is unfortunate that printing a screen is not built-in, but Captivate is supposed to be for on-screen learning. The only solution is to fiddle with the print settings - landscape, shrinking the image to fit the paper, etc. And that is all dependent on the user knowing how those controls work on his/her own machine. I have looked for a JS solution to this, but the best I've found is very old and doesn't work on all browsers.
@chrismay - I tried that one but it is ignored by some browsers.
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
there is not even a way to create a button that makes a screenshoot to the page and save it?
Copy link to clipboard
Copied
I found this that work a lot: https://elearningbrothers.com/3-ways-print-pdf-captivate-8/