Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty page after each slide when exporting PDF from 3.4.0 #1804

Closed
pkubowicz opened this issue Jan 24, 2017 · 11 comments
Closed

Empty page after each slide when exporting PDF from 3.4.0 #1804

pkubowicz opened this issue Jan 24, 2017 · 11 comments
Labels

Comments

@pkubowicz
Copy link
Contributor

To reproduce:

  1. clone reveal.js
  2. run npm install && npm start
  3. export to PDF according to https://github.com/hakimel/reveal.js#pdf-export

Result: you have 4 pages instead of 2. There is an empty page after each slide.

You can also change index.html to

Reveal.initialize({
			pdfMaxPagesPerSlide: 1,

but this does not have any effect. I tried using every bundled theme, but this also does not change the number of pages.

For me the vanilla presentation from the official repository should export correctly as PDF.

@hakimel
Copy link
Owner

hakimel commented Jan 24, 2017

This should be fixed in master. Can you give it a try and let me know if it works for you as well?

Pretty major bug, so I'll put out a new release once the fix is confirmed.

@pkubowicz
Copy link
Contributor Author

I checked it also on my own presentation and the fix works fine. Thanks a lot!

@hakimel
Copy link
Owner

hakimel commented Jan 25, 2017

Thanks for checking but turns out that change broke PDF exports through command line tools :/ Reworked it to avoid adjusting the page height and breakpoints.

@pkubowicz
Copy link
Contributor Author

pkubowicz commented Feb 9, 2017

@hakimel This issue is present again in master. Reproduces as before, so pdfMaxPagesPerSlide does not work. Also present in dev. See the git bisect log:

# bad: [1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3] Merge pull request #1636 from traff/master
# good: [286b69b61f64bf47dd3ea710175aeb4de8288d9f] fix empty pages in pdf exports (closes #1804)
git bisect start 'HEAD' '286b69b61f64bf47dd3ea710175aeb4de8288d9f'
# bad: [9f8e4d5742df486cce577f6e0dbae666aabc4eb1] 3.4.1
git bisect bad 9f8e4d5742df486cce577f6e0dbae666aabc4eb1
# bad: [953d302f8b3c1a5dfc430f2e34b67a81bc35c9d2] adjust pdf margins instead of heights to fix #1804
git bisect bad 953d302f8b3c1a5dfc430f2e34b67a81bc35c9d2
# good: [d9dcff1503cb4e8043a2b434de3cc635914164cb] additional fix for empty pages in pdf exports #1804
git bisect good d9dcff1503cb4e8043a2b434de3cc635914164cb
# first bad commit: [953d302f8b3c1a5dfc430f2e34b67a81bc35c9d2] adjust pdf margins instead of heights to fix #1804

@hakimel
Copy link
Owner

hakimel commented Apr 3, 2017

Reopening.

I'm seeing the empty pages appear when printing in Chrome 59, but not 57. Have been pursuing a fix for a while but haven't found one that works for both in-browser and CLI printing yet.

@hakimel hakimel reopened this Apr 3, 2017
benswift added a commit to benswift/reveal.js that referenced this issue Apr 4, 2017
* hakimel-gh/master:
  new phantom pdf export script that works with 3.4.0 hakimel#1815
  updated pdf docs
  update readme re: pdf exports hakimel#1823
  Update README.md to include block for pdf printing
  Update README.md
  3.4.1
  adjust pdf margins instead of heights to fix hakimel#1804
  additional fix for empty pages in pdf exports hakimel#1804
  fix empty pages in pdf exports (closes hakimel#1804)
  correct grunt option usage
  For a fragment: allow to show a separate note defined in it
@hakimel
Copy link
Owner

hakimel commented Apr 4, 2017

This should be fixed in a way that works for both in-browser and command line (phantom, wkpdf etc) printing now.

Give it a try when you get a chance.

+@Skyr

@Skyr
Copy link

Skyr commented Apr 4, 2017

Sorry, no luck - demo.html still results in 66 pages.
(tested with Chromium on Fedora 24 (56.0.2924.87))

@hakimel
Copy link
Owner

hakimel commented Apr 5, 2017

Thanks for checking. I forgot to mention the change I made is only available in the dev branch – did you test master or dev?

The latest version can be tested in the live demo too: http://lab.hakim.se/reveal-js/?print-pdf. Chrome 57 & 59 on OS X are working. I don't have access to 56 so wasn't able to test that.

@Skyr
Copy link

Skyr commented Apr 5, 2017

My fault - I only checked the master.
The live demo is working perfectly 👍

@hakimel
Copy link
Owner

hakimel commented Apr 5, 2017

Whew, thanks!

SteveDesmond-ca pushed a commit to SteveDesmond-ca/presentations that referenced this issue Apr 19, 2017
SteveDesmond-ca pushed a commit to SteveDesmond-ca/presentations that referenced this issue Apr 19, 2017
SteveDesmond-ca pushed a commit to SteveDesmond-ca/presentations that referenced this issue Apr 19, 2017
@bnjmnt4n bnjmnt4n added the bug label Apr 27, 2017
pm-nsimic pushed a commit to chriwu/ps-tec-2017 that referenced this issue May 1, 2017
* resolves hakimel#1324 allow display property to be configured

- allow display property apply to current slide to be configured

* add 'npm build' script that launch grunt

* Allow switching off preview links

The data-preview-link=false tag can be used to switch off preview links

* Support sass extension for custom themes

* Shift `dependencies` to `devDependencies`.

The `reveal.js` npm module is typically installed to access the CSS/JS
assets for Reveal.js. For those that want to run the plugins, they would
clone the whole repository. Hence, it doesn’t make sense to include
those as `dependencies`, which will increase download times.

Closes hakimel#1734.

* Allow background images without protocols to have query hashes/parameters.

Closes hakimel#1603.

* hakimel#1770, resume playback for paused media.

* hakimel#1770, fixed function name.

* hakimel#1770, added second argument for setAttribute

* hakimel#1770, set 'data-paused-by-reveal' attribute only for the media elements, which are not already in paused state.

* support complex markdown

support <textarea data-template> `some code` </textarea>

* Remove 'history: true' from index.html

Readme says the default is 'history: false', so it may be surprising
for users - it's easy to miss the contradicting setting in index.html

* wait for in-slide video/audio to load before playing, reuse same autoplay logic for slide backgrounds

* prevent autoplaying backgrounds from playing if slide is hidden

* fix race condition by updating backgrounds after slide visibility

*  works with video, defaults to  (same as for images)

* remove unused argument

* make backgrounds (iframes) interactive when the foreground is empty

* 2017

* merge info links in index

* fix empty pages in pdf exports (closes hakimel#1804)

* additional fix for empty pages in pdf exports hakimel#1804

* adjust pdf margins instead of heights to fix hakimel#1804

* typo

* note about showNotes in PDF exports hakimel#1800

* fix markdown typo, update comment hakimel#1780

* recommend using textarea wrapper for inline markdown hakimel#1780

* make background videos work on ipad hakimel#1778

* improved fragment notes support hakimel#1636

* warning about cube/page being deprecated hakimel#1774

* adjust comment for display config value hakimel#1325

* added toggleHelp function 

this way a key can be given ability to toggleHelp on and off.  Previously Reveal.showHelp could open the help screen, but no way to close it.

* added override parameter to toggleHelp function

* update deserialize regex to work with decimals

* docs for hakimel#1816 and remove showHelp

* phantom export throws error if reveal.js isn't present

* fix overview rendering issues in latest chrome hakimel#1649

* allow configuration of which view slide number appears on - fixes hakimel#1791

* correct config name in README

* note about deploying multiplex server with now hakimel#1830

* tweaks to showSlideNumber config hakimel#1833

* avoid npe on iframe postMessage

* print-pdf using callback iso timer

Use window.callPhantom icw page. onCallback to wait for pdf-ready event.
From: http://stackoverflow.com/a/28925479/129269

* print-pdf layout slide contents to fit stretch elements

layout() and thereby layoutSlideContents() is never invoked
when isPrintingPdf() is true so stretch elements are not
sized correctly.
This is ensured now by invoking the layoutSlideContents
from SetupPDF(). There seems no need to scale down
like in other PR's is suggested.

* Fix video background autoplay on iOS

* add autoPlayMedia config option, overrides individual autoplay settings

* allow fullscreen for background iframes

* new cli and in-browser pdf printing compatible fix for hakimel#1804

* make pdf page height offset configurable

* replace cdn.mathjax.org with cdnjs

cdn.mathjax.org is shutting down: https://www.mathjax.org/cdn-shutting-down/

This changes the default MathJax URL in the math plugin, as well as
references in README.md and test/examples/math.html

* formatting

* formatting

* clarify meaning of getProgress() value

* expose getPastSlideCount() via public API

This can be used by plugins which are concerned with helping the
presenter with their pace.

* clarify getTotalSlides() returns the number of slides

* add new getSlides() API

This can be used by plugins which are concerned with helping the
presenter with their pace.

* Allow popup window access to Reveal API

* extract time display code into new _displayTime() function

This will allow us to reuse the display code for displaying
an additional pacing timer.

* use opacity for muted clock elements

This allows us to use different colours for different timers,
which will be useful when we add a pacing timer.

* don't mute minutes when hours is unmuted

* avoid deleting existing classes when muting time elements

and make muting work for negative values

* don't show negative signs inside minutes/seconds elements

* round decreasing timers to mirror increasing timers

* document clock and timer in speaker notes window

* optionally display pacing advice based on slide timings

Add an option to display advice on whether the current pace of the
presentation is on track for the right timing (shown as green), and if
not, whether the presenter should speed up (shown as red) or has the
luxury of slowing down (blue).

The pacing timer can be enabled by configuring by the `defaultTiming`
parameter in the `Reveal` configuration block, which specifies the
number of seconds per slide.  120 can be a reasonable rule of thumb.
Timings can also be given per slide `<section>` by setting the
`data-timing` attribute.  Both values are in numbers of seconds.

When the option is enabled, clicking on the timers will reset the timer
to the beginning of the current slide, i.e. as if pacing was perfectly
on track, not to zero as if the presentation had just begun.

* minor tweak for hakimel#1564

* 3.5.0

* * updated big picture slide
* added schema image
* added deployment texts

* * update big picture svg
* adjusted big picture styles
* moved authors and company slides to the end
*

* * added styles for codelistings
* tweaked dockerfile
* added kubernetes cheatsheet
* moved tldr slide to end of presentation

* * added version number to html source
* added config file for CircleCI integration
* added deploy.sh

* * updated status badge
* troubleshooting deploy script

* * bugfix as suggested in https://goo.gl/W1XnSk

* * changed circle badges in readme
* finetuning deploy.sh
* moved sha label to span inside presentation

* * optimized Dockerfile to leverage docker caching

* * added key ‘v’ to toggle display of GIT sha in upper right corner

* * added PS_VERSION_NUMBER to big picture slide
* shortened stateflow texts

* * removed unneeded files

* * added link to github project on tldr

* * changed port for k8-service

* wip

* * finetuning deployment

* debug

* * editorial finetuning

* * extended deploy script to update dyndns with public cluster ip address

* * added shell scripts for starting and stopping the kubernetes (k8) cluster on GCP
* moved it all to subfolder k8

* * huge commit. The best. No seriously, it’s way to big and it can easily serve as a bad example.

* * added seniority
* finetuning claims on last slide
* controls are now hidden

* * extended collaboration slide

* * added samples for collaboration

* * replaced slide bgnd by collage

* * modified collage
* swapped slide order
* added notes
* reduced size of leafs bgnd

* * tweakd tldr slide

* * replaced the bgnd image on the collaboration slide - new one has some effects applied

* * ignoring .vscode folder

* * added data-timing values for every slide
* extended readme section of the repo

* * changed the way how the schema image is built into the slide

* * windows millenium. and why you may never have heard of it
@nickjmeyer
Copy link

I'm having this same issue, except it seems slightly different. Instead of having a single blank page after each slide, the amount of blank space below each slide seems to be increasing exponentially. I have a ~45 slide deck and using ?print-pdf I get a ~46k page document.

I have yet to narrow down my html file to see what is causing it. Will do this next weekend if no one has jumped on it before me.

derheap pushed a commit to derheap/reveal.js that referenced this issue Feb 22, 2018
derheap pushed a commit to derheap/reveal.js that referenced this issue Feb 22, 2018
derheap pushed a commit to derheap/reveal.js that referenced this issue Feb 22, 2018
derheap pushed a commit to derheap/reveal.js that referenced this issue Feb 22, 2018
R0bes pushed a commit to R0bes/Terraform-Presentation that referenced this issue Jun 7, 2021
R0bes pushed a commit to R0bes/Terraform-Presentation that referenced this issue Jun 7, 2021
R0bes pushed a commit to R0bes/Terraform-Presentation that referenced this issue Jun 7, 2021
R0bes pushed a commit to R0bes/Terraform-Presentation that referenced this issue Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants