You are here: Foswiki>Tasks Web>Item13281 (05 Jul 2015, GeorgeClark)Edit Attach

Item13281: Add print support to the SlideShowPlugin.

pencil
Priority: Enhancement
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Extension
Component: SlideShowPlugin
Branches: master
Reported By: VickiBrown
Waiting For:
Last Change By: GeorgeClark
I want to print a slideshow. The print preview looks good for page 1, but slowly, as I work through the pages, the slides move downward and eventually break across page boundaries.

It's so close, but not right.

Screenshot 1 shows an attempt to print two slides to one sheet. Note that it tried, but because of the extra spacing, it failed.

Screenshot 2 shows how the slides eventually break across page boundaries.

  • screenshot 1:
    Item13281 screenshot1.png

  • screenshot 2:
    Item13281 screenshot2.png

-- VickiBrown - 27 Feb 2015

Please have a try at the new Extensions.Testing.SlideShowPlugin.

-- MichaelDaum - 27 Feb 2015

Michael - I got an error

Error: Errors encountered during package installation. The Extension may not be usable.
I can't download http://foswiki.org/pub/Extensions/Testing/PatchItem12225Contrib/PatchItem12225Contrib_installer because of the following error:
Not Found

fetching installer from http://foswiki.org/pub/Extensions/Testing/ ... Download failed 
 - I can't download http://foswiki.org/pub/Extensions/Testing/PatchItem12225Contrib/PatchItem12225Contrib_installer because of the following error:
Not Found
Installation terminated

-- VickiBrown - 01 Mar 2015

Also, a quick look at the "new" version told me that it doesn't line up well on the page as a slide show, perhaps because of the errors?

I re-installed the previous version.

-- VickiBrown - 01 Mar 2015

Vicki, That Patch is not needed for this extension any more. It is needed only when an extension uses "triplet" style versions "v1.2.3" Most of the default extensions have been reverted to simple decimal "1.23" versions, and we can remove the dependency.

In any event, it would not cause any issues with or without it, but it's not found because it's in the Extensions repo, not Extensions/Testing. I wonder if the alignment issues has to do with the US standardizing on "Letter" size paper, but most everywhere else using "A4".

-- GeorgeClark - 01 Mar 2015

In looking at the code, the css doesn't include the page break properties. Maybe it would work better with explicit breaks. See: http://lvsys.com/how-to-add-page-breaks-to-html-in-articles for an example.

-- GeorgeClark - 01 Mar 2015

When I say it doesn't line up well on the page as a slide show, I'm talking about the Browser, not paper. The Slide show is buggy. I never even tried to print.

I shouldn't need to add special CSS to make the slideshow work correctly in the browser. That's what SlideShow Plugin does.

-- VickiBrown - 01 Mar 2015

Vicki, my suggestion was to MichaelDaum, that the SlideShowPlugin CSS is missing the page alignment css needed so that the browser can know where to insert page-breaks with the browser prints the page. You stated right at the start "I want to print a slideshow. The print preview looks good for page 1, but slowly, as I work through the pages, the slides move downward and eventually break across page boundaries" That's the browser printing the page. Unless the extension css includes page breaks, then the browser has no idea how to align the text to the pages.

-- GeorgeClark - 02 Mar 2015

Vicki, This patch seems to resolve the issue on the old plugin:

diff --git a/SlideShowPlugin/lib/Foswiki/Plugins/SlideShowPlugin/SlideShow.pm b/SlideShowPlugin/lib/Foswiki/Plugins/SlideShowPlugin/SlideShow.pm
index c260dd8..cc14eeb 100644
--- a/SlideShowPlugin/lib/Foswiki/Plugins/SlideShowPlugin/SlideShow.pm
+++ b/SlideShowPlugin/lib/Foswiki/Plugins/SlideShowPlugin/SlideShow.pm
@@ -124,7 +124,8 @@ sub handler {
 
                 $slideComment = $slideComment ? "\n$slideComment\n" : '';
                 $text =~ s/%SLIDECOMMENT%/$slideComment/gs;
-                $text .= "%BR%\n\n" x 20;
+                $text .= "%BR%\n\n" x 18;
+                $text .= '<p style="page-break-after:always;"></p>';
                 $slideNum++;
             }
             $text =~

No idea on the 1.2 upcoming version. It renders the slides in javascript and only prints one page.

-- GeorgeClark - 03 Mar 2015

Michael, inability to print a slideshow should probably be a blocker for 1.2. I know it's something that I used to do frequently.

-- GeorgeClark - 03 Mar 2015

Fixed. Have a try at Extensions.Testing.SlideShowPlugin.

-- MichaelDaum - 03 Mar 2015
 
Topic revision: r10 - 05 Jul 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy