2

Rather than a raw text, I want to use my nice ppt slides within a teleprompter, which use a half-mirror.

enter image description here enter image description here

Text-prompter softwares automatically flip the screen, which is then flipped back by the mirror into the expected readable way.

But PowerPoints doesn't do this first flip display. To counter the half-mirror, I must find a way to output on my screen a symetrically flipped image via the vertical axis (such below but for the whole screen).

enter image description here

At the end, I want something flopped such as :

enter image description here

How can I output a flipped version of my PPT / PDF ?

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
  • See also: [Video Prompter Design](http://technologybites.blogspot.fr/2007/08/video-prompter-design.html) and [DIY](http://www.dchris.net/2013/08/20/diy-teleprompter-english/) – Hugolpz Apr 09 '15 at 15:53

5 Answers5

5

All the answers which involve ImageMagick tools (mogrify, convert) will first force your (potentially) vector-based PDF through a mincer that creates (possibly very large) pixel data from your slides. Converting that back to PDF will not restore you steak... uhmmm vector PDF, but it will just wrap the pixel data into a PDF shell.

There is an alternative: Use Ghostscript together with a little PostScript code snippet to transform vector-based PDF to vector-based PDF.

Ghostscript's solution

Use -dAutoRotatePages=/None (or =/All or =/PageByPage). Here we require =/None in order to tell Ghostscript should not try to auto-rotate the page(s) so that the text is "readable".

Here are the two complete, working commands to mirror PDF pages for A4-sized documents:

  1. Horizontal mirroring (left <=> right):

    gs                                                           \
      -o mirrored-horizonal.pdf                                  \
      -sDEVICE=pdfwrite                                          \
      -dAutoRotatePages=/None                                    \
      -c "<</Install{595 0 translate -1 1 scale}>>setpagedevice" \
      -f input.pdf
    
  2. Vertical mirroring (top <=> bottom):

    gs                                                           \
      -o mirrored-vertical.pdf                                   \
      -sDEVICE=pdfwrite                                          \
      -dAutoRotatePages=/None                                    \
      -c "<</Install{0 842 translate 1 -1 scale}>>setpagedevice" \
      -f input.pdf
    

Width and translate

Assuming that the width of the PDF page is 8.5 inches, aka 612 points, hence the 612 0 translate part in my PostScript code snippet.

If your page width is different from 612 points, you have to adapt that part accordingly.

A4 portrait or A5 landscape media: 595 0 translate.

Google doc presentation, 16/9 are 254 × 143mm aka 10" × 5.63 : 720 0 translate.

Hugolpz
  • 17,296
  • 26
  • 100
  • 187
Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
  • I'am not sure to understand your last point, I will have to try. Did you notice we are not looking for rotation (90⁰, 180⁰), but for **flop**, like if you watch a black text printed on A4 page after turning the page like in a book, through the reverse (white) side, aka p2. – Hugolpz Apr 10 '15 at 11:06
  • I'am testing out your solution. I get a flopped + 180⁰ rotated image. I tried various combination of translate and scale but was unable to get the wished result (without rotation), as displayed in the question. – Hugolpz Apr 10 '15 at 20:35
  • @Hugolpz: Yes, but rotating page(s) by 180 degree can be done by (almost) every viewer easily... (and made persistent too) – Kurt Pfeifle Apr 10 '15 at 20:42
  • @Hugolpz: But you ***DO*** see result is *still* mirrored, albeit not left-to-right, but top-to-bottom, do you? – Kurt Pfeifle Apr 10 '15 at 22:09
  • Yes, its mirrored upside down :) just, it's unfortunate the process requires two differents tools. I also tried to get the horizontal flop (left<=>right), and it also gives me the unexpected up<=>down result. – Hugolpz Apr 11 '15 at 06:05
  • 1
    @Hugolpz: Did you see my second update to the answer?! -- If you're clever, you read my bug report first: then conclude that you can do it via PostScript with `ps2write` (***NOT*** `pswrite`) which you can convert back to PDF -- all with Ghostscript (= still 1 tool, but 2 commands). – Kurt Pfeifle Apr 11 '15 at 06:37
  • Oups! I didnt read the bug repport, went straight for the code snippet ^^ – Hugolpz Apr 11 '15 at 06:40
  • 1
    @Hugolpz: Ping.... See my latest update (I was blind to not see this missing param). – Kurt Pfeifle Apr 11 '15 at 21:42
  • working and pretty net result : same quality, same filesize ! Validated ! I encourage you to delete your earlier tries so the answer just contains the solution (update 3). A tiny explanation on `x y translate` and `x y scale` as well as how you know the input's width would be welcome. To sum up, it works pretty well, thanks a lot :) – Hugolpz Apr 12 '15 at 11:54
  • @Hugolpz: Sorry, I don't like your editing. I'll change it again, as soon as I've more time. It is completely wrong to start it with *'Use `-dAutoRotatePages=...`'*. -- I also want to provide additional illustrations with it. *(Also: there were no 'failed' solutions, only incompletely working ones. And to keep them in the answer, may teach future readers a thing or two also...)* – Kurt Pfeifle Apr 13 '15 at 07:46
  • Feel free to revert me :) – Hugolpz Apr 13 '15 at 09:47
2

Flip & flop the whole display

Linux

Source How can I mirror/flip display output?

Go to console (Alt+F2 then type gnome-terminal and press ENTER)

xrandr -x will flip de video horizontally like a mirror.
xrandr -y will flop de video vertically.
xrandr -y -x will both flip and flop (= invert).
xrandr -o inverted will...invert O.o
xrandr -o normal will return to normal the video.

Rational

It is much simplier and more faithful to flip the whole display rather than to go for tricky, time consuming, buggy file format conversions.

Community
  • 1
  • 1
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
  • Hello @KurtPfeifle, it's de facto the most convenient solution I eventually found : a one line command. I'am not validating it for fame but to help the next readers. A simple screen flop based answer indeed makes more sense than a complex file conversion which breaks ppt anymations in the pdf step. If you think you though about it before me, copy the answer and I will be happy to validate your answer as you indeed invested time into this question. – Hugolpz Jul 15 '15 at 20:51
  • No doubt it is the most convenient method to use `xrandr` for anybody who's on an X window display. – Kurt Pfeifle Jul 15 '15 at 20:55
  • On the contrary: if you ***explain*** the reasons why you finally prefer this solution (like you gave in your comment: works with the original file, unchanged), I'd even upvote your answer :-) – Kurt Pfeifle Jul 15 '15 at 20:58
  • BTW: flip + flop together make for a 180 degree rotation (which usually isn't described as "invert"). – Kurt Pfeifle Jul 15 '15 at 20:59
1

Split

You can use unoconv to convert your PPT files to JPEGs. See How to convert pptx files to jpg or png (for each slide) on linux? .

# ptt to pdf
unoconv --export Quality=100 filename.pptx filename.pdf
# pdf to multiples jpg
convert -density 400 my_filename.pdf -resize 2000x1500 my_filename%d.jpg 

Flop

Then use ImageMagick to flop them like this:

convert input.jpg -flop output.jpg
mogrify -flop *.jpg #rewrite upon input

You can also flip them, by adding -flip into the command above.

Glue

You can put them back together in a PDF using ImageMagick:

convert page1.jpg page2.jpg pagex.jpg combined.pdf
convert *.jpg combined.pdf 

Other : pdftk ?

I haven't tried, but I think you can use pdftk to put them back together into a flipped PDF too.

Community
  • 1
  • 1
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
1

You don't say whether or not you have PowerPoint available. If you do, this is quite simple.

First, save the presentation as a Picture Presentation. That saves it to a presentation containing images of your original slides. Open the picture presentation and run this VBA on it:

Sub thing()

Dim oSl As Slide
Dim oSh As Shape

For Each oSl In ActivePresentation.Slides

Set oSh = oSl.Shapes(1) ' there should be only one shape on the slide

oSh.Flip msoFlipVertical
oSh.Top = 0

Next    ' Slide

End Sub
Steve Rindsberg
  • 14,442
  • 1
  • 29
  • 34
0

Flop

As you convert into static images, then rather output pdf and work on it. Then, you can use :

mogrify -density 200x200 -quality 100 -flop *.pdf

It flop your pdf, so you can now use it in a pdf reader full screen, and command the page change using a mouse or other.

Output quality

There may be issues with the output quality and file size. First, if just using mogrify -flop *.pdf, the output is of poor quality. Second, if using mogrify -density 200x200 -quality 100 -flop *.pdf, the output may be of 30 times the initial pdf weight (as far as I saw). This issue is to dig in. See also Convert PDF to image with high resolution

Community
  • 1
  • 1
Hugolpz
  • 17,296
  • 26
  • 100
  • 187