LinuxCommandLibrary

okular

View document files, primarily PDFs

TLDR

Launch document viewer

$ okular
copy

Open specific documents
$ okular [path/to/file1 path/to/file2 ...]
copy

Open a document at a specific page
$ okular [[-p|--page]] [page_number] [path/to/file]
copy

Open a specific document in presentation mode
$ okular --presentation [path/to/file]
copy

Open a specific document and start a print dialog
$ okular --print [path/to/file]
copy

Open a document and search for a specific string
$ okular --find [search_string] [path/to/file]
copy

SYNOPSIS

okular [options] [URL]
okular [Qt-options] [KDE-options] [file]

PARAMETERS

[URL] or [file]
    Specifies the path to the document to open. This can be a local file path or a URL.


-p
    Opens the document and immediately navigates to the specified number.


--presentation
    Starts Okular in full-screen presentation mode directly after opening the document.


--find
    Searches for the first occurrence of the specified within the document upon opening.


--unique
    Ensures that only one instance of Okular is running. If another Okular window is already open, the document will be opened in that window.


--noraise
    Used with --unique, this option prevents an existing Okular window from being brought to the foreground when a new document is opened in it.


--select
    Selects a specific rectangular region defined by the coordinates (x,y) and dimensions (width,height) after opening. This is primarily useful for automation or specific document types.


--print
    Immediately sends the opened document to the printer without displaying the viewer interface.


--editor-sync
    Used for editor synchronization, typically with LaTeX or Markdown. It opens the document and jumps to the location corresponding to the given source and number.


DESCRIPTION

Okular is a versatile universal document viewer developed by KDE, designed to handle a wide array of document formats with ease. It stands out for its comprehensive support, allowing users to view PDF files, DjVu documents, comic books (CBR, CBZ), EPUB ebooks, PostScript, DVI, XPS, and even Markdown files. Beyond simple viewing, Okular offers powerful annotation tools, enabling users to highlight text, add inline notes, draw shapes, and create bookmarks, making it an excellent tool for students and professionals. Its intuitive interface provides features like text selection, searching within documents, thumbnail navigation, and a structured table of contents view, enhancing productivity and readability. Okular is built on the KDE Frameworks and is an integral part of the KDE Applications, but it's also available on other Linux desktops.

CAVEATS

Okular's full functionality, especially advanced features like --select or editor synchronization, might depend on the specific document format backend and proper system configuration. While it supports embedding annotations directly into PDF files, it also uses external .okular files by default for many formats, which means annotations might not be portable with the document itself unless explicitly exported. Performance with extremely large or complex documents can vary.

SUPPORTED FORMATS

Okular boasts support for an impressive range of document formats, including PDF, DjVu, PostScript, DVI, XPS, OpenDocument Text (ODT), FictionBook (FB2), various comic book formats (CBR, CBZ, CB7, CBT), CHM (Compiled HTML Help), EPUB, Markdown, and various image formats. This wide compatibility makes it a truly versatile viewer.

ANNOTATION PERSISTENCE

Okular offers robust annotation capabilities, allowing users to highlight text, add sticky notes, draw lines and shapes, and even sign documents. By default, annotations are often saved in an external .okular data file alongside the original document. However, for PDF files, Okular provides the option to save annotations directly embedded within the PDF, ensuring their persistence when the document is shared.

HISTORY

Okular's development began in 2005, aiming to create a modern, universal document viewer for the KDE desktop environment. It was designed to replace older, format-specific viewers like KPDF (for PDF) and KDVI (for DVI) in KDE 4, providing a unified interface for various document types. Since its inception, Okular has been a core component of the KDE Applications suite, leveraging powerful libraries like Poppler for PDF rendering and various other backends for different formats. Its continuous development focuses on stability, feature enrichment, and integration within the KDE ecosystem.

SEE ALSO

evince(1), xpdf(1), qpdfview(1), zathura(1), kdegraphics(7)

Copied to clipboard