Skip to content

Latest commit

 

History

History

docs


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>What is Pympress? &mdash; Pympress developer documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="Pympress developer documentation" href="index.html"/>
        <link rel="next" title="Pympress package" href="pympress.html"/>
        <link rel="prev" title="Welcome to pympress’s documentation!" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          
	<a href="https://github.com/Cimbali/pympress/" class="fa fa-github"> Pympress on GitHub</a>
	<br />
	<a href="index.html" class="icon icon-home"> Docs home</a>
	<div class="version">
		v1.0
	</div>

	
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
	
            
            
                <ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">What is Pympress?</a></li>
<li class="toctree-l1"><a class="reference internal" href="#installing">Installing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#if-you-have-python">If you have python</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#using-pip">Using pip</a></li>
<li class="toctree-l3"><a class="reference internal" href="#from-source">From source</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#binary-install">Binary install</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dependencies">Dependencies</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#usage">Usage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#opening-a-file">Opening a file</a></li>
<li class="toctree-l2"><a class="reference internal" href="#functionalities">Functionalities</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="#hacking">Hacking</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#translations">Translations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pympress.html">Pympress package</a></li>
</ul>

            
          
	<hr style="border: 0; height: 0; border-top: 1px solid rgba(0, 0, 0, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.3); width:80%; margin: 10px auto;" />
	<a href="genindex.html">Index</a>
	<a href="py-modindex.html">Module index</a>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">Pympress</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>What is Pympress?</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://github.com/Cimbali/pympress/blob/master/README.md" class="fa fa-github"> Edit on GitHub</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="what-is-pympress">
<span id="what-is-pympress"></span><h1>What is Pympress?<a class="headerlink" href="#what-is-pympress" title="Permalink to this headline">¶</a></h1>
<p>Pympress is a little PDF reader written in Python using Poppler for PDF rendering and GTK+ for the GUI.</p>
<p>It is designed to be a dual-screen reader used for presentations and public talks, with two displays: the <em>Content window</em> for a projector, and the <em>Presenter window</em> for your laptop. It is portable and has been tested on various Mac, Windows and Linux systems.</p>
<p>It comes with many great features:</p>
<ul class="simple">
<li>supports embedded videos</li>
<li>text annotations displayed in the presenter window</li>
<li>natively supports beamer&#8217;s <em>notes on second screen</em>!</li>
</ul>
<p>Pympress is a free software, distributed under the terms of the GPL license (version 2 or, at your option, any later version).</p>
<p>This is now a fork of <a class="reference external" href="https://github.com/Schnouki/pympress">Schnouki&#8217;s original Pympress</a>, at least for now.</p>
</div>
<div class="section" id="installing">
<span id="installing"></span><h1>Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h1>
<div class="section" id="if-you-have-python">
<span id="if-you-have-python"></span><h2>If you have python<a class="headerlink" href="#if-you-have-python" title="Permalink to this headline">¶</a></h2>
<div class="section" id="using-pip">
<span id="using-pip"></span><h3>Using pip<a class="headerlink" href="#using-pip" title="Permalink to this headline">¶</a></h3>
<p>Run the following command in your shell (or replace <code class="docutils literal"><span class="pre">python3</span> <span class="pre">-m</span> <span class="pre">pip</span></code> with <code class="docutils literal"><span class="pre">python</span> <span class="pre">-m</span> <span class="pre">pip</span></code> or just <code class="docutils literal"><span class="pre">pip</span></code>):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">pympress</span>
</pre></div>
</div>
<p>Or you can get it from github:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">git</span><span class="o">+</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">Cimbali</span><span class="o">/</span><span class="n">pympress</span><span class="c1">#egg=pympress</span>
</pre></div>
</div>
<p>If you don&#8217;t have pip, see <a class="reference external" href="https://docs.python.org/3.5/installing/index.html">the python documentation on installing</a>. You may also want to check that you have all <a class="reference external" href="#dependencies">the dependencies</a>.</p>
</div>
<div class="section" id="from-source">
<span id="from-source"></span><h3>From source<a class="headerlink" href="#from-source" title="Permalink to this headline">¶</a></h3>
<p>If you also want the source code, you can clone this repo or grab <a class="reference external" href="https://github.com/Cimbali/pympress/releases/latest">the latest releases&#8217; source</a>, open a console where you put the code, and type <code class="docutils literal"><span class="pre">python3</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">.</span></code> (or, if you plan on modifying that code, <code class="docutils literal"><span class="pre">python3</span> <span class="pre">-m</span> <span class="pre">pip</span> <span class="pre">install</span> <span class="pre">-e</span> <span class="pre">.</span></code>). Same remarks as above apply.</p>
</div>
</div>
<div class="section" id="binary-install">
<span id="binary-install"></span><h2>Binary install<a class="headerlink" href="#binary-install" title="Permalink to this headline">¶</a></h2>
<p>If you don&#8217;t want to know about source code or dependencies, this is for you.
Grab <a class="reference external" href="https://github.com/Cimbali/pympress/releases/latest">the latest installer for your platform</a> and execute it. You&#8217;re done!</p>
<p>Currently binaries are only available for windows (.msi files). Choose packages with &#8216;amd64&#8217; in the name if you have a 64 bit machine, &#8216;x86&#8217; if you have a 32 bit machine. The &#8216;vlc&#8217; suffix indicates that this installer ships VLC as well to support video, so try it if the other version fails to read videos.</p>
</div>
<div class="section" id="dependencies">
<span id="dependencies"></span><h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
<p>Pympress relies on:</p>
<ul class="simple">
<li>Python, 3.x or 2.7 (with <a class="reference external" href="https://pypi.python.org/pypi/setuptools">setuptools</a>, which is usually shipped by default with python).</li>
<li><a class="reference external" href="http://poppler.freedesktop.org/">Poppler</a>, the PDF rendering library.</li>
<li><a class="reference external" href="https://www.cairographics.org/">Cairo</a> (and python bindings for cairo), the graphics library which to pre-render and draw over PDF pages.</li>
<li><a class="reference external" href="http://www.gtk.org/">Gtk+ 3</a>, a toolkit for creating graphical user interfaces.</li>
<li><a class="reference external" href="https://wiki.gnome.org/Projects/PyGObject">PyGi, the python bindings for Gtk+3</a>. PyGi is also known as <em>pygobject3</em>, just <em>pygobject</em> or <em>python3-gi</em>.<ul>
<li>Introspection bindings for poppler may be shipped separately, ensure you have those as well (<code class="docutils literal"><span class="pre">typelib-1_0-Poppler-0_18</span></code> on OpenSUSE, <code class="docutils literal"><span class="pre">gir1.2-poppler-0.18</span></code> on Ubuntu)</li>
</ul>
</li>
<li>optionally VLC, to play videos (with the same bitness as Python)</li>
</ul>
<p>On windows GTK+3, Poppler and their python bindings are all shipped together in <a class="reference external" href="https://sourceforge.net/projects/pygobjectwin32/">the PyGi installer</a>. <em>Be sure to check the supported Python versions (up to 3.4 at the time of writing)</em>, they appear in the FEATURES list in the linked page.</p>
<p>On other platforms they are often installed by default, or easily available through your package or software manager.
For example, on ubuntu, you can run the following as root to make sure you have all the prerequisites <em>assuming you use python3</em>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">python3</span> <span class="n">python3</span><span class="o">-</span><span class="n">pip</span> <span class="n">libgtk</span><span class="o">-</span><span class="mi">3</span><span class="o">-</span><span class="mi">0</span> <span class="n">libpoppler</span><span class="o">-</span><span class="n">glib8</span> <span class="n">libcairo2</span> <span class="n">python3</span><span class="o">-</span><span class="n">gi</span> <span class="n">python3</span><span class="o">-</span><span class="n">cairo</span> <span class="n">gir1</span><span class="o">.</span><span class="mi">2</span><span class="o">-</span><span class="n">gtk</span><span class="o">-</span><span class="mf">3.0</span> <span class="n">gir1</span><span class="o">.</span><span class="mi">2</span><span class="o">-</span><span class="n">poppler</span><span class="o">-</span><span class="mf">0.18</span>
</pre></div>
</div>
<p>Different distributions might have different package naming conventions, for example the equivalent on OpenSUSE would be:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">zypper</span> <span class="ow">in</span> <span class="n">python3</span> <span class="n">python3</span><span class="o">-</span><span class="n">pip</span> <span class="n">libgtk</span><span class="o">-</span><span class="mi">3</span><span class="o">-</span><span class="mi">0</span> <span class="n">libpoppler</span><span class="o">-</span><span class="n">glib8</span> <span class="n">libcairo2</span> <span class="n">python3</span><span class="o">-</span><span class="n">gobject</span> <span class="n">python3</span><span class="o">-</span><span class="n">gobject</span><span class="o">-</span><span class="n">Gdk</span> <span class="n">python3</span><span class="o">-</span><span class="n">cairo</span> <span class="n">typelib</span><span class="o">-</span><span class="mi">1</span><span class="n">_0</span><span class="o">-</span><span class="n">GdkPixbuf</span><span class="o">-</span><span class="mi">2</span><span class="n">_0</span> <span class="n">typelib</span><span class="o">-</span><span class="mi">1</span><span class="n">_0</span><span class="o">-</span><span class="n">Gtk</span><span class="o">-</span><span class="mi">3</span><span class="n">_0</span> <span class="n">typelib</span><span class="o">-</span><span class="mi">1</span><span class="n">_0</span><span class="o">-</span><span class="n">Poppler</span><span class="o">-</span><span class="mi">0</span><span class="n">_18</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="usage">
<span id="usage"></span><h1>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h1>
<div class="section" id="opening-a-file">
<span id="opening-a-file"></span><h2>Opening a file<a class="headerlink" href="#opening-a-file" title="Permalink to this headline">¶</a></h2>
<p>Simply start Pympress and it will ask you what file you want to open.
You can also start pympress from the command line with a file to open like so:
<code class="docutils literal"><span class="pre">pympress</span> <span class="pre">slides.pdf</span></code></p>
</div>
<div class="section" id="functionalities">
<span id="functionalities"></span><h2>Functionalities<a class="headerlink" href="#functionalities" title="Permalink to this headline">¶</a></h2>
<p>All functionalities are available from the menus of the window with slide previews. Don&#8217;t be afraid to experiment with them!</p>
<p>Keyboard shortcuts are also listed in these menus. Some more usual shortcuts are often available, for example <code class="docutils literal"><span class="pre">Ctrl</span></code>+<code class="docutils literal"><span class="pre">L</span></code>, and <code class="docutils literal"><span class="pre">F11</span></code> also toggle fullscreen, though the main shortcut is just <code class="docutils literal"><span class="pre">F</span></code>.</p>
<p>A few of the fancier functionalities are listed here:</p>
<ul>
<li><p class="first"><strong>Swap screens</strong>: If Pympress mixed up which screen is the projector and which is not, press <code class="docutils literal"><span class="pre">S</span></code></p>
</li>
<li><p class="first"><strong>Go To Slide</strong>: To jump to a selected slide without flashing through the whole presentation on the projector, press <code class="docutils literal"><span class="pre">G</span></code> or click the &#8220;current  slide&#8221; box.</p>
<p>A spin box will appear, and you will be able to navigate through your slides in the presenter window only by scrolling your mouse, with the <code class="docutils literal"><span class="pre">Home</span></code>/<code class="docutils literal"><span class="pre">Up</span></code>/<code class="docutils literal"><span class="pre">Down</span></code>/<code class="docutils literal"><span class="pre">End</span></code> keys, with the + and - buttons of the spin box, or simply by typing in the number of the slide. Press <code class="docutils literal"><span class="pre">Enter</span></code> to validate going to the new slide or <code class="docutils literal"><span class="pre">Esc</span></code> to cancel.</p>
</li>
<li><p class="first"><strong>Estimated talk time</strong>: Click the <code class="docutils literal"><span class="pre">Time</span> <span class="pre">estimation</span></code> box and set your planned talk duration. You can also pass this on the command line through the <code class="docutils literal"><span class="pre">-ett</span></code> flag. The color will allow you to see at a glance how much time you have left.</p>
</li>
<li><p class="first"><strong>Adjust screen centering</strong>: If your slides&#8217; form factor doesn&#8217;t fit the projectors&#8217; and you don&#8217;t want the slide centered in the window, use the &#8220;Screen Center&#8221; option in the &#8220;Presentation&#8221; menu.</p>
</li>
<li><p class="first"><strong>Resize Current/Next slide</strong>: You can drag the bar between both slides on the Presenter window to adjust their relative sizes to your liking.</p>
</li>
<li><p class="first"><strong>Preferences</strong>: Some of your choices are saved in a configuration file, in <em>~/.config/pympress</em> or <em>~/.pympress</em> on linux, and in <em>%APPDATA%/pympress.ini</em> on windows.</p>
</li>
<li><p class="first"><strong>Cache</strong>: For efficiency, Pympress caches rendered pages (up to 200 by default). If this is too memory consuming for you, you can change this number in the configuration file.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="hacking">
<span id="hacking"></span><h1>Hacking<a class="headerlink" href="#hacking" title="Permalink to this headline">¶</a></h1>
<p>Feel free to clone this repo and use it, modify it, redistribute it, etc, under the GPLv2+.
Pympress has inline sphinx documentation (<a class="reference external" href="http://www.sphinx-doc.org/en/latest/ext/example_google.html">Google style</a>, contains rst syntax), and the <a class="reference external" href="https://github.com/Cimbali/pympress/tree/master/docs/">docs folder</a> contains the documentation generated from it, hosted on <a class="reference external" href="https://cimbali.github.io/pympress/pympress.html">the github pages of this repo</a>.</p>
<div class="section" id="translations">
<span id="translations"></span><h2>Translations<a class="headerlink" href="#translations" title="Permalink to this headline">¶</a></h2>
<p>If you want to add a translation, check if <code class="docutils literal"><span class="pre">pympress/share/locale/&lt;language&gt;/pympress.po</span></code> already exists. If not, take <a class="reference external" href="https://github.com/Cimbali/pympress/tree/master/pympress/share/locale/pympress.pot">the template file</a> as input and translate all the strings, then add it to the repo in <code class="docutils literal"><span class="pre">pympress/share/locale/&lt;language&gt;/pympress.po</span></code>.
Finally pass this .po file to msgfmt and add the output to the repo at <code class="docutils literal"><span class="pre">pympress/share/locale/&lt;language&gt;/LC_MESSAGES/pympress.mo</span></code>.</p>
</div>
</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="pympress.html" class="btn btn-neutral float-right" title="Pympress package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="index.html" class="btn btn-neutral" title="Welcome to pympress’s documentation!" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2009-2011, Thomas Jost; 2015-2017 Cimbali.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'b&#39;0.6-107-g2817d0c&#39;',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>