dspdfviewer − Dual-Screen PDF Viewer
11 | 12 | 13 | -------------------------------------------------------------------------------- /poppler-qt.h: -------------------------------------------------------------------------------- 1 | #ifndef POPPLER_QT5 2 | #includedspdfviewer [options] [filename]
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | exclude: 2 | - vendor 3 | - Gemfile 4 | - Makefile 5 | - README.md 6 | - build* 7 | 8 | markdown: kramdown 9 | kramdown: 10 | input: GFM 11 | hard_wrap: false 12 | # syntax_highlighter_opts: 13 | # line_numbers: false 14 | 15 | # mimick github 16 | # fixed 17 | lsi: false 18 | source: . 19 | 20 | defaults: 21 | - 22 | scope: 23 | path: "" 24 | values: 25 | layout: "default" 26 | -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | {% include html_header.html %} 2 | 3 | {% if page.url != "/index.html" %} 4 |%userprofile%\.config\dspdfviewer.ini
13 | 14 |You can specify all long command-line options (without leading --) here, in a "option=value" format, one per line.
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /testing/pdfs/colored-rectangles.tex: -------------------------------------------------------------------------------- 1 | \documentclass[aspectratio=169]{beamer} 2 | \usepackage{color} 3 | \usepackage{pgfpages} 4 | 5 | \setbeameroption{show notes on second screen} 6 | 7 | \title{Colored Pages without content} 8 | 9 | \begin{document} 10 | 11 | 12 | 13 | \definecolor{8f8}{HTML}{88FF88} 14 | \definecolor{f8f}{HTML}{FF88FF} 15 | 16 | \begingroup 17 | \setbeamercolor{background canvas}{bg=8f8} 18 | \setbeamercolor{note page}{bg=f8f} 19 | \begin{frame} 20 | \end{frame} 21 | \endgroup 22 | 23 | \end{document} 24 | -------------------------------------------------------------------------------- /cmake/compiler_msvc.cmake: -------------------------------------------------------------------------------- 1 | # MSVC 2 | 3 | foreach(var 4 | CMAKE_C_FLAGS 5 | CMAKE_C_FLAGS_DEBUG 6 | CMAKE_C_FLAGS_RELEASE 7 | CMAKE_C_FLAGS_MINSIZEREL 8 | CMAKE_C_FLAGS_RELWITHDEBINFO 9 | CMAKE_CXX_FLAGS 10 | CMAKE_CXX_FLAGS_DEBUG 11 | CMAKE_CXX_FLAGS_RELEASE 12 | CMAKE_CXX_FLAGS_MINSIZEREL 13 | CMAKE_CXX_FLAGS_RELWITHDEBINFO 14 | ) 15 | if(WindowsStaticLink) 16 | if(${var} MATCHES "/MD") 17 | string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}") 18 | endif() 19 | add_definitions(-DWINDOWS_STATIC_LINK) 20 | endif() 21 | endforeach() 22 | -------------------------------------------------------------------------------- /sconnect.h: -------------------------------------------------------------------------------- 1 | #includeNone currently known.
13 | 14 |If you find any bugs, the preferred way to report them is at the github issue tracker at GitHub.
15 | 16 |As a fallback, you can send e-mail to mail@danny-edel.de with the word "dspdfviewer" in the subject line.
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /pdfpagereference.h: -------------------------------------------------------------------------------- 1 | #ifndef PDFPAGEREFERENCE_H 2 | #define PDFPAGEREFERENCE_H 3 | 4 | #includeMost (maybe not all) presenter remote controls technically act as a keyboard sending one of the keystrokes listed either in the main or additional keybindings. If your remote control does not work as intended, please file a bug report describing what keystrokes it generates when you press its buttons. If there is no conflict, a keybinding will be included in the next release.
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /testing/testhelpers.cc: -------------------------------------------------------------------------------- 1 | #include "testhelpers.hh" 2 | 3 | #include<path to LaTeX>\doc\latex\beamer\beameruserguide.pdf from the latex-beamer package on how to create beamer presentations.
13 |Note: Use "show notes on second screen=right" because dspdfviewer assumes that the right half of the page is the notes.
14 |http://dspdfviewer.danny-edel.de for installation instructions and new release announcements.
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /testing/testswapscreen.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dspdfviewer.h" 4 | 5 | /** Test driver 6 | * 7 | * If it detects two screens, it will verify that the windows switch to the 8 | * specified positions. 9 | * If running on single-screen, the commands will be executed without verification, 10 | * just to make sure the code doesn't segfault or similar. 11 | * 12 | * Rinse and repeat 3 times. 13 | * 14 | */ 15 | class SwapScreensAndCheckAlign: public QObject { 16 | Q_OBJECT 17 | 18 | DSPDFViewer& dspdfviewer; 19 | QRect screenPrimary; 20 | QRect screenSecondary; 21 | bool verify; 22 | public: 23 | SwapScreensAndCheckAlign(DSPDFViewer& app); 24 | signals: 25 | void screenSwapRequested(); 26 | void quitRequested(); 27 | public slots: 28 | void checkStartPositions(); 29 | void checkAfterFirstSwap(); 30 | void checkAfterSwapBack(); 31 | }; 32 | -------------------------------------------------------------------------------- /cmake/qrc_embedding.cmake: -------------------------------------------------------------------------------- 1 | # Copy all the filex in QRCFILES into the binary dir, 2 | # and execute qrc (Qt Resource Compiler) on them. 3 | 4 | foreach(qrc IN LISTS QRCFILES) 5 | 6 | add_custom_command( 7 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${qrc} 8 | DEPENDS 9 | ${CMAKE_CURRENT_SOURCE_DIR}/${qrc} 10 | ${TRANSLATIONFILES} 11 | COMMAND cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${qrc} ${CMAKE_CURRENT_BINARY_DIR}/${qrc} 12 | ) 13 | 14 | set(TMP_OUTFILENAME "${CMAKE_CURRENT_BINARY_DIR}/${qrc}.cxx") 15 | 16 | set(RCCCOMPILER ${Qt5Core_RCC_EXECUTABLE}) 17 | 18 | add_custom_command( 19 | OUTPUT ${TMP_OUTFILENAME} 20 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${qrc} 21 | COMMAND ${RCCCOMPILER} -o ${TMP_OUTFILENAME} ${CMAKE_CURRENT_BINARY_DIR}/${qrc} 22 | ) 23 | 24 | unset(RCCCOMPILER) 25 | 26 | list(APPEND EMBEDDED_QRC 27 | ${TMP_OUTFILENAME} 28 | ) 29 | 30 | unset(TMP_OUTFILENAME) 31 | endforeach() 32 | -------------------------------------------------------------------------------- /testing/test-images.cc: -------------------------------------------------------------------------------- 1 | #include "testhelpers.hh" 2 | 3 | using namespace std; 4 | using namespace TestHelpers; 5 | 6 | BOOST_AUTO_TEST_CASE(image_rendering) { 7 | PDFDocumentReference pdr( TestHelpers::pdfFilename("images.pdf"), PDFCacheOption::keepPDFinMemory ); 8 | 9 | auto first = RenderUtils::renderPagePart(pdr.page(0).page, QSize(1920,1080), PagePart::LeftHalf); 10 | auto second = RenderUtils::renderPagePart(pdr.page(1).page, QSize(1920,1080), PagePart::LeftHalf); 11 | 12 | auto firstColor = QColor( 0x70, 0x1e, 0xc1); 13 | auto secondColor = QColor( 0x14, 0x63, 0xb4); 14 | 15 | /** Check sizes of rendered images **/ 16 | BOOST_CHECK_EQUAL( QSize(1920,1080), first.size()); 17 | BOOST_CHECK_EQUAL( QSize(1920,1080), second.size()); 18 | 19 | /** Check pixels in the middle */ 20 | BOOST_CHECK_EQUAL( firstColor, QColor(first.pixel(960,540))); 21 | BOOST_CHECK_EQUAL( secondColor, QColor(second.pixel(960,540))); 22 | } 23 | -------------------------------------------------------------------------------- /docs/installation/gentoo.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation on Gentoo 3 | layout: default 4 | --- 5 | 6 | Gentoo 7 | ====== 8 | 9 | Install from ebuild 10 | ------------------- 11 | 12 | Two kinds of ebuilds are available for dspdfviewer: the git ebuild 13 | (with version number 9999), which downloads and installs the latest 14 | git version of dspdfviewer, and regular ebuilds with normal version 15 | numbers. 16 | 17 | To install, move the ebuilds in the ["gentoo" subdirectory][0] into an 18 | overlay (for more information on overlays, see [the gentoo manual][1]) 19 | in the "app-text/dspdfviewer" directory. Then, unmask the version you 20 | want and run "emerge dspdfviewer". 21 | 22 | [0]: https://github.com/dannyedel/dspdfviewer/tree/master/gentoo 23 | [1]: https://www.gentoo.org/proj/en/overlays/userguide.xml 24 | 25 | ----- 26 | 27 | The inclusion request for the main Gentoo repository is filed under 28 | [bug 520120 in the Gentoo bugzilla][gentoobug]. 29 | 30 | [gentoobug]: https://bugs.gentoo.org/show_bug.cgi?id=520120 31 | -------------------------------------------------------------------------------- /docs/installation/macos.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation on MacOS 3 | layout: default 4 | --- 5 | 6 | ## Homebrew (recommended) 7 | If you use a mac with Homebrew, there already is [a formula][formula] 8 | to install dspdfviewer 9 | 10 | {% highlight bash %} 11 | brew install dspdfviewer 12 | {% endhighlight %} 13 | 14 | The previous command installs the latest release. If you want to test out the 15 | newest features, provide the head option: 16 | 17 | {% highlight bash %} 18 | brew install dspdfviewer --HEAD 19 | {% endhighlight %} 20 | 21 | ## Manually (advanced users) 22 | 23 | If you want to compile from source, please read the 24 | [generic install instructions](/installation/) about 25 | the available cmake-time switches. 26 | 27 | If you installed Qt5 via Homebrew, you will have 28 | to pass its installation prefix to `cmake`: 29 | 30 | ```bash 31 | cmake /path/to/source -DSomeOption=ON -DCMAKE_PREFIX_PATH=$(brew --prefix qt5) 32 | ``` 33 | 34 | [formula]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/dspdfviewer.rb 35 | -------------------------------------------------------------------------------- /debug.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #includedspdfviewer is intended for presentations created with the latex-beamer class, specifically documents created with the show notes on second screen=right option.
13 | 14 |Its purpose is to display the left half of a page on the audience’s screen (which will most commonly be a projector) and the right half on your "private" screen (think: the notebook you carried to the presentation site). The basic idea is that you will display personal notes and information to help you with your presentation on your personal screen, while the audience sees only the PDF they are supposed to see.
15 | 16 |On the secondary screen you will see three clocks: A "wall clock", a "presentation" clock and a "slide" clock.
17 | 18 |The wall clock in the bottom left corner that display current time of day, the presentation clock (labeled "Total") counts the time you spent since you started the presentation, and the "slide" counter (bottom right) displays the time you spent on the current slide.
19 | 20 |The clocks don’t start the second you launch the program, the idea behind that behaviour is that many people have a "title" slide active long before the audience even arrives.
21 | 22 |Once you use the next/previous slide commands, the clock starts. If you want to start the clock, but still display the title slide, just press "previous" (for example, Up Arrow or Right Mouse Button) on the title slide.
23 | 24 |If you want to reset the clocks to zero, press the "Home" button on the keybord.
25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /renderedpage.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | dspdfviewer - Dual Screen PDF Viewer for LaTeX-Beamer 3 | Copyright (C) 2012 Danny Edeldspdfviewer contains several third party components with different licenses. All licenses are provided in the License subfolder in the application's location.
13 | 14 |You can use the following controls while dspdfviewer is running.
13 | 14 |Note that mouse-clicks are subject to pointer position if the hyperlink support is enabled. If your mouse cursor changes to a hand, it will follow the link you are hovering on a click. 15 | 16 |
| Keyboard: ?, F1 | 23 |Display quick-help (most important key bindings) |
24 |
| Keyboard: Spacebar, Page Down / Mouse: Left-Click, Wheel Down |
27 | Go one page forward 28 |Additional keyboard aliases: Down, Right, Return, Enter, N, F |
29 |
| Keyboard: Backspace, Page Up / Mouse: Right-Click, Wheel Up |
32 | Go one page backward 33 |Additional keyboard aliases: Up, Left, P |
34 |
| Keyboard: B, . (period) | 37 |Toggle blanking of the audience screen |
38 |
| Keyboard: G | 41 |Go to specific page (a number entry window will pop up) 42 |Note that the this counts PDF pages, so a single slide having 6 unmasking steps will be 7 PDF pages long, including the initial near-blank page. |
43 |
| Keyboard: Home, H | 46 |Go to the first page and reset the clocks to zero. |
47 |
| Keyboard: Escape, Q | 52 |Quit dspdfviewer. |
53 |
| Keyboard: S, F12 | 56 |Switch primary and secondary screens 57 |Use this if the audience sees your ’note’ side with the clocks and you see the actual presentation on your screen. 58 |If you just want to see the main presentation (for example, because the projector is behind you), use T. |
59 |
| Keyboard: T | 62 |Switch secondary screen’s function 63 |Use this if you want to see the audience side on your screen, without showing the notes to the audience. Pressing the button again will switch back to normal operation. |
64 |
| Keyboard: D | 67 |Switch duplication of the audience’s screen 68 |Use this if you want to see the audience side and the notes on your screen (so the full presentation), leaving the audience’s screen untouched. Pressing the button again will switch back to split mode. |
69 |
The exact behaviour of dspdfviewer is configurable using command-line parameters.
13 | 14 |Unless otherwise noted, all command-line options can be written in a configuration file. See the Files section for the location.
15 | 16 |For the command-line parameters, this program follows the usual GNU command line syntax, with long options starting with two dashes (’-’). A summary of options is included below.
17 | 18 |If you specify those in a configuration file, write one option per line, use the long version without the two leading dashes, followed by an equals sign and the desired value.
19 | 20 |For example, bottom-pane-height=20 is a valid configuration line.
21 | 22 |If an option is specified in both the configuration file and the command-line, the command-line value takes precedence.
23 | 24 |Note for options of type <bool>: They take true, false, 0 or 1 as arguments. For example, --use-second-screen false can be expressed as --use-second-screen 0 or shortened to -u0. 25 |
| -h, --help | 32 |Show summary of options. | 33 |
| -f, --full-page | 36 |Use the presentation program with a normal single-screen PDF, that is display the full page on both the primary and secondary monitor. 37 |The secondary screen still contains timers and thumbnails to help you with your presentation, unless you disable them using the options below. |
38 |
| -u, --use-second-screen <bool> | 41 |Controls whether the program actually works as a dual-screen viewer. 42 |The default is true. 43 |If you only have one screen, but still want to use the cache features, you can set this option to false. If the window ends up on the wrong display, you can still use the switch command (see below). 44 |What comes out on the primary screen depends on whether you use the -f Option: -u0 -f results in a simple full-screen PDF viewer, while -u0 without -f still splits the page in half and outputs only the left frame. |
45 |
| -l, --hyperlink-support <bool> | 48 |Controls whether the program makes PDF Hyperlinks clickable. 49 |The default is true. 50 |While it is normally desired to have clickable hyperlinks, if you cannot control the position of your pointer (if your remote control has only left-click and right-click) it might be safer to disable hyperlinks. |
51 |
| --prerender-previous-pages n | 54 |When jumping to slide m, also pre-render the slides (m-n)..(m-1) (default 3) 55 |Note: If you set this to zero, you will not get a thumbnail for the previous page rendered before you have visited it. |
56 |
| --prerender-next-pages n | 59 |When jumping to slide m, also pre-render the slides (m+1)..(m+n) (default 10) 60 |Note: If you set this to zero, you will not get a thumbnail for the next page rendered before you have visited it. |
61 |
| -a, --presenter-area <bool> | 64 |Show (true, 1) or hide (false, 0) the presenter’s area on the second screen. If this is set to zero, the following options will have no effect. 65 | |
| -d, --duplicate <bool> | 68 |Duplicate (true, 1) or hide (false, 0) the audience’s screen next to the notes on the second screen. 69 |The default is false. |
70 |
| -t, --thumbnails <bool> | 73 |Show (true, 1) or hide (false, 0) the thumbnails on the second screen. |
74 |
| -w, --wall-clock <bool> | 77 |Show (true, 1) or hide (false, 0) the wall clock on the second screen. |
78 |
| -p, --presentation-clock <bool> | 81 |Show (true, 1) or hide (false, 0) the presentation clock on the second screen. |
82 |
| -s, --slide-clock <bool> | 85 |Show (true, 1) or hide (false, 0) the slide clock on the second screen. |
86 |
| -b, --bottom-pane-height n | 89 |Configure how large the presenter area on the second screen will be, unit is percent of second screen’s total height. 90 |Default value 20. |
91 |