Giter Site home page Giter Site logo

jceb / reveal-pdfexport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcshelby/reveal-pdfexport

0.0 1.0 0.0 12 KB

A reveal.js 3.x / 4.x plugin to easly switch to the built-in PDF export mode and back by pressing a shortcut key.

License: MIT License

JavaScript 100.00%

reveal-pdfexport's Introduction

PdfExport

A reveal.js 3.x / 4.x plugin to easly switch to the built-in PDF export mode and back by pressing a shortcut key.

Installation

Copy this repository into the plugin folder of your reveal.js presentation, ie plugin/pdfexport.

Add the plugin to the initialization of your presentation, as below.

reveal 4.x

<script src="plugin/pdfexport/pdfexport.js"></script>
// .. 
Reveal.initialize({
	// ...
	plugins: [
		// ..
		PdfExport,
	]
});

reveal 3.x

Reveal.initialize({
	// ...
	dependencies: [
		// ...
		{ src: 'plugin/pdfexport/pdfexport.js', async: true },
	]
});

For reveal 3.x only you need to remove all of the following or similar lines from your presentation. Paper- or PDF-stylesheets will be set by the plugin.

<!-- Printing and PDF exports -->
<script>
	var link = document.createElement( 'link' );
	link.rel = 'stylesheet';
	link.type = 'text/css';
	link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
	document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>

Usage

To toggle between screen and PDF mode you can press the E shortcut on the keyboard.

Configuration

You can configure some aspects of the plugin by adding the following options to your reveal configuration. Note that all configuration values are optional and will default to the values specified below.

Reveal.initialize({
	// ...

	// Shortcut for toggling between screen and PDF mode
	pdfExportShortcut: 'E',
});

License

MIT licensed.

Copyright (C) 2020 Sören Weber

reveal-pdfexport's People

Contributors

mcshelby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.