pdfcontroller¶
-
class
openlp.plugins.presentations.lib.pdfcontroller.
PdfController
(plugin)[source]¶ Bases:
openlp.plugins.presentations.lib.presentationcontroller.PresentationController
Class to control PDF presentations
-
check_available
()[source]¶ PdfController is able to run on this machine.
Returns: True if program to open PDF-files was found, otherwise False.
-
check_installed
()[source]¶ Check the viewer is installed.
Returns: True if program to open PDF-files was found, otherwise False.
-
static
process_check_binary
(program_path)[source]¶ Function that checks whether a binary is either ghostscript or mudraw or neither. Is also used from presentationtab.py
:param program_path:The full path to the binary to check. :return: Type of the binary, ‘gs’ if ghostscript, ‘mudraw’ if mudraw, None if invalid.
-
-
class
openlp.plugins.presentations.lib.pdfcontroller.
PdfDocument
(controller, presentation)[source]¶ Bases:
openlp.plugins.presentations.lib.presentationcontroller.PresentationDocument
Class which holds information of a single presentation. This class is not actually used to present the PDF, instead we convert to image-serviceitem on the fly and present as such. Therefore some of the ‘playback’ functions is not implemented.
-
close_presentation
()[source]¶ Close presentation and clean up objects. Triggered by new object being added to SlideController or OpenLP being shut down.
-
get_slide_count
()[source]¶ Returns total number of slides
Returns: The number of pages in the presentation..
-
gs_get_resolution
(size)[source]¶ Only used when using ghostscript Ghostscript can’t scale automatically while keeping aspect like mupdf, so we need to get the ratio between the screen size and the PDF to scale
Parameters: size – Size struct containing the screen size. Returns: The resolution dpi to be used.
-
is_active
()[source]¶ Returns true if a presentation is currently active.
Returns: True if active, False if not.
-