Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Export variables to pdf??

Explorer ,
Aug 30, 2018 Aug 30, 2018

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 ❤️

982
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Sep 03, 2018 Sep 03, 2018
Translate
Community Expert ,
Aug 30, 2018 Aug 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2018 Aug 31, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 31, 2018 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2018 Aug 31, 2018

the page is not static, because the user must type some words and i want to print that words that change for every user

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 31, 2018 Aug 31, 2018

JS window.print(); attached to a button that has to be pressed by the user.  He can set up to print to a pdf.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 31, 2018 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2018 Aug 31, 2018

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

Immagine.jpg

Immagine2.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 31, 2018 Aug 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2018 Aug 31, 2018

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..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 31, 2018 Aug 31, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 31, 2018 Aug 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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2018 Aug 31, 2018
there is not even a way to create a button that makes a screenshoot to the page and save it?


					
				
			
			
				
			
			
			
			
			
			
			
		
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 03, 2018 Sep 03, 2018
LATEST
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources