DJVIEW4(1)
okay bestie, grab a snack π because we're about to get into djview4 β the standalone DjVu viewer from the DjVuLibre gang, hanging out in section 1 of your manual. she's long, she's iconic, and this is part 1 of 3, so pace yourself π
β¨ NAME β¨
djview4 β the standalone DjVu viewer. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
djview4 [options] [argument]
πΈ DESCRIPTION πΈ
So. djview4 is a standalone viewer for DjVu files, and she does NOT come to play. the feature list is genuinely stacked, no cap:
- navigating documents
- zooming and panning page images
- producing and displaying thumbnails
- displaying document outlines
- searching documents for particular words in the hidden text layer
- copying hidden text to the clipboard
- saving pages and documents as bundled or indirect multi-page files
- printing page and documents
and the flex on top of the flex? the viewer can simultaneously display several pages using a side-by-side or a continuous layout. multiple pages at once. main character energy, honestly π
π COMMAND LINE ARGUMENT AND OPTIONS π
This program can run as a standalone program, OR as a slave process for the DjVu browser plugin nsdejavu. iykyk.
When it's running as a standalone program, the command line argument argument can be any of these cuties:
- The filename of a valid DjVu document.
- A local DjVu document URL shaped like this:
file:///path/name.djvu[?djvuopts&keyword=value&...]
the square brackets are just delimiters around the optional components of the URL, they're not part of the URL fr fr. you can specify various options using a syntax similar to that of CGI arguments. doing it this way is very useful for a browser plugin because a plugin has no command line arguments at all. for a standalone viewer though? every option can just be a command line argument, easy peasy.
- A remote DjVu document URL shaped like this:
http://host/path/name.djvu[?djvuopts&keyword=value&...]
https://host/path/name.djvu[?djvuopts&keyword=value&...]
real talk though: browsing remote DjVu documents with the standalone viewer is less efficient than using the browser plugin. the standalone viewer does not benefit from the browser caching strategies and proxy settings π. but it's fine!! proxy settings for the standalone viewer can be set independently with the preferences dialog. problem solved bestie.
An extensive list of options are recognized. Most options can be specified as a command line argument starting with the customary dash character (-), or using the syntax of CGI arguments in the document URL. Some options however are only meaningful as command line arguments. And other options are only recognized when running the X11 version of the djview4 program. so like. read carefully before you start yelling at your terminal π
π₯ COMMAND LINE OPTIONS π₯
The following options are only meaningful when specified on the command line. these ones need you to actually show up with flags, okay?
-helpβ Display a brief help message. when in doubt, ask her directly β¨-verboseβ Prints informational messages on the console. this option is very useful because it displays messages about the unrecognized constructs in the DjVu annotation and hyperlink layers. it's basically her telling you "bestie, i didn't understand that part" π«Ά-fullscreen,-fsβ Startdjview4in full screen mode. hit the keyESCto exit the full screen mode. (yes,ESC. remember it.)-slideshow[=arg]β Startdjview4in slide show mode. the optional numerical argument arg specifies the number of seconds before turning each page. again: use the keyESCto exit the slide show mode. presenting your pages like it's a whole runway show π-style=stylenameβ Specify the graphical user interface style. the recognized values for stylename depend on the installed version of the Qt toolkit. common style names includecde,motif,plastique,platinum, andwindows. outfit change, but for your GUI π
π X11 OPTIONS π
The following command line options are recognized by the X11 version of the djview4 program. and heads up, this is important: unlike most djview4 options, X11 options that demand an argument do not use the equal character to introduce their argument. no = here, bestie. space it out.
-displaydisplayname β Specify that thedjview4windows should appear on the X11 display displayname.-geometryWxH+X+Y β Specify the initial size and position of the first window using the traditional X11 geometry specification syntax. the numerical arguments W and H represent the initial window width and height. the numerical arguments X and Y indicate the window position relative to the top left corner of the screen.-namename β Set the application name.-titletitle β Set the title of the first window.-fnfontname,-fontfontname β Specify the name of the default font used for buttons and menus. the font should be specified using a X logical font description string.-bgcolor,-backgroundcolor β Specify the default background color for graphical user interface elements. the color should be given as a standard X11 color name.-fgcolor,-foregroundcolor β Specify the default foreground color for graphical user interface elements. the color should be given as a standard X11 color name.-btncolor β Specify the default button color. the color should be given as a standard X11 color name.-ncolscount β Limit the number of colors allocated on a 8 bit display. the default color cube contains 216 distinct colors.-cmapβ Force the allocation of a private color map on a 8-bit display. this might increase the color quality but cause flashing when the viewer window gets activated. so like, prettier colors, but she will blink at you. your call π
π GENERAL OPTIONS π
The following options can be specified as command line options, OR they can be passed by augmenting the document URL using a syntax similar to that of CGI arguments:
http://.../file.djvu?djvuopts&key=value&key=value&...
In order to separate real CGI arguments from these options, the viewer only recognizes keywords that appear after the word djvuopts. and the keywords key are derived from the option names by removing the initial dashes. so -page becomes page, etc etc. slay.
-page=pagenameβ Display a specific document page. the search order goes like this, bestie, follow along:- first, the viewer searches a page whose identifier matches the argument pagename.
- otherwise, if pagename is a number preceded by character
+or-, the viewer performs a displacement relative to the current page. - otherwise, starting from the current page and wrapping around, it searches for a page whose title matches the argument pagename.
- otherwise, if pagename is numerical, it is interpreted as an ordinal page number.
- otherwise, and finally, the viewer searches a page whose name matches pagename.
she's thorough. she does not give up on finding your page π«Ά
-pageno=pagenumberβ The page searching algorithm for optionpagecan cause ambiguities when page titles can be interpreted as numbers. the argument of optionpagenois always interpreted as an ordinal page number. this option is less portable thanpagebecause it is not recognized by earlier versions of the djvu plugin. when using this option is necessary, it is advisable to use both thepageandpagenooptions. belt AND suspenders, periodt.-zoom=zoomfactorβ Specify the initial zoom factor. unless the toolbar, pop-up menu and keyboard are disabled, the user will be able to change the zoom factor. legal values for zoomfactor are shown in the below:numberβ Magnification factor in range10%to999%.one2oneβ Select the "one-to-one" mode.widthβ Select the "fit width" mode.pageβ Select the "fit page" mode.stretchβ Stretch the image to the plugin window size.
-showposition=px,pyβ Specify a point in the current page that should be as close as possible to the center of the window. the horizontal and vertical positions px,py in the current page are given as fractions in range0to1. for instance,0,0designates the upper left corner of the page,0.5,0.5is the center, and1,1is the lower right corner. so like. coordinates but make them fractions π-mode=modespecβ Specify the initial display mode. unless the toolbar and pop-up menu are disabled, the user will be able to change it. legal values for modespec are shown in the below:colorβ Display the color image.bwβ Display the foreground mask only.foreβ Display the foreground only.backβ Display the background only.textβ Overlay the hidden text over the color image.
-hor_align=keyword,-halign=keywordβ Specify the horizontal position of the page in the viewer window. (quick clarification so nobody gets confused: this does not specify what part of the page will be shown, but rather how margins will be laid out around the page in the plugin window.) argument keyword must beleft,center, orright.-ver_align=keyword,-valign=keywordβ Specify the vertical position of the page in the viewer window. (same clarification as above, bestie: this does not specify what part of the page will be shown, but rather how margins will be laid out around the page in the plugin window.) argument keyword must betop,center, orbottom.-cache=(yes|no)β Enable or disable the caching of fully decoded pages of the document. caching is on by default. caching of documents whose URL does not contain an extension.djvuor.djvis off by default. sneaky little default, watch out for that one π-continuous=(yes|no)β Enable or disable the continuous layout of multipage documents.-sidebyside=(yes|no),-side_by_side=(yes|no)β Enable or disable the side-by-side layout of multipage documents.-coverpage=(yes|no)β Specify whether the cover page must be displayed alone when multipage documents are shown in side-by-side layout.-righttoleft=(yes|no)β Specify whether pages should be arranged right-to-left when multipage documents are shown in side-by-side layout.
and that's part 1, bestie β there's more coming, don't go anywhere π¦
-layout=keyword{,keyword}** β set your whole layout vibe with one lil comma-separated list of keywords. here's the menu bestie:singleβ turn OFF side-by-side AND continuous modes πdoubleβ turn ON side-by-side mode π«Άcontinuousβ turn ON continuous mode πcover,nocoverβ how the first page gets treated in side-by-side modeltor,rtolβ which way the pages flow in side-by-side modegap,nogapβ whether there's a lil gap between pages or not
-scrollbars=(yes|no)β show or hide the scroll bars when the full image is bigger than the plugin window. default is yes β¨-frame=(yes|no)β show or hide that thin frame + shadow around the DjVu images. frames are enabled by default π-background=color** β pick the color of the background border around the document.colorhas to be in hexadecimalRRGGBBor#RRGGBBformat. no name-colors bestie, we're doing hex only π-toolbar=keyword{(,|+|-)keyword}** β this one controls how the toolbar looks AND what's on it. the argument is a bunch of keywords separated by comma, plus, or minus. ngl it's giving choose-your-own-adventure.
The appearance is controlled by the keywords that come before the first + or -. here's what's recognized in that context:
noβ no toolbar at all, disable it πalwaysβ always show the toolbarautoβ toolbar "autohide" mode (not implemented, so don't get too excited)topβ dock it along the top edge β¬οΈbottomβ dock it along the bottom edge β¬οΈ
The contents are controlled by keywords after the first + or -. each keyword adds (after a +) or removes (after a -) a specific toolbar button or group of buttons. the initial content is decided by that first + or -: if it's a +, the toolbar starts out empty; if it's a -, the toolbar starts with the default selection of buttons. iconic behavior fr.
Here are the content keywords:
modecomboβ the display mode selection toolzoomcomboβ the zoom selection toolzoomβ the zoom buttonsselectβ the selection buttonrotateβ the image rotation buttonsfindβ the text search buttonnewβ the new window buttonopenβ the open new document buttonsaveβ the save buttonprintβ the print buttonlayoutβ the page layout buttonspagecomboβ the page selection toolfirstlastβ the first-page and last-page buttonsprevnextβ the previous- and next-page buttonsbackforwβ reserved for the back and forward buttonshelpβ the contextual help button
For the sake of backward compatibility (grandma energy but we respect it π«Ά), the keywords fore, fore_button, back, back_button, bw, bw_button, color, and color_button are interpreted like keyword modecombo; the keyword rescombo is a synonym of zoomcombo; the keywords pan, zoomsel, and textsel are interpreted like keyword select; and the keyword doublepage is interpreted like keyword layout. All other keywords are ignored. π
-menubar=(yes|no)β show or hide the menu bar chillin' on top of the window.-statusbar=(yes|no)β show or hide the status bar at the bottom of the window.-sidebar=keyword{,keyword}** β controls the dockable panels. the argument is a comma-separated list of keywords. a first group of keywords picks which panels are affected β omit them and it selects all panels. then a second group controls the visibility and position of the selected panels. two-step slay β¨thumbnailsβ the thumbnail paneloutline,bookmarksβ the outline panelsearch,findβ the search panelyes,trueβ show the specified panels (default)no,falseβ hide the specified panelsleftβ dock the specified panels on the left siderightβ dock the specified panels on the right sidetopβ dock the specified panels on the top sidebottomβ dock the specified panels on the bottom side
-thumbnails=keyword{,keyword}** β compatibility alias for-sidebar=keyword{,keyword},thumbnails.-outline=keyword{,keyword}** β compatibility alias for-sidebar=keyword{,keyword},outline.-menu=(yes|no)β enable or disable the pop-up menu.-keyboard=(yes|no)β enable or disable the DjVu plugin keyboard shortcuts. default is yes (enabled). β οΈ heads up bestie: disabling keyboard handling does not disable the shortcuts tied to active menus (see options-menuand-menubar), visible toolbars, and sidebars (see options-toolbarand-sidebar). they got their own thing going on π-mouse=(yes|no)β enable or disable mouse interaction for panning and selecting. default is yes (enabled).-links=(yes|no)β enable or disable hyper-links in the DjVu image. hyper-links are enabled by default π-highlight=x,y,w,h[,color]** β draw a highlighted rectangle at those coordinates on the current page, in whatever color you picked.x,y,w, andhare measured in document image coordinates, not screen coordinates. the origin sits at the bottom left corner of the image.colormust be hexadecimalRRGGBBor#RRGGBBformat. you can stack multiple highlighted zones, and you can intersperse them with multiple-page=pagename options π-find=text** β highlight every occurrence of the given stringtext. this one only works when the document has a hidden text layer. pair it with-sidebar=findto pull up the text searching interface π
The string text can be terminated by a slash (/) followed by letters that specify search options. here's the letter cheat sheet:
cβ case-sensitive searchCβ case-insensitive search (default)wβ search hits start on word boundaries (default)Wβ ignore word boundariesrβ regular expression searchRβ string search (default)
-rotate=(0|90|180|270)β rotate the djvu image by that angle, in degrees, counter-clockwise. spin it bestie π-print=(yes|no)β enable or disable printing the DjVu document. printing is enabled by default.-save=(yes|no)β enable or disable saving the DjVu document. saving is enabled by default.-passiveβ make the DjVu image display like an ordinary web image. the default zoom factor becomespage. toolbar, status bar, scrollbars, menus, and keyboard shortcuts are all disabled. it's giving minimalism β¨-passivestretchβ same deal, display like an ordinary web image. but this time the default zoom factor becomesstretch. toolbar, status bar, scrollbars, menus, and keyboard shortcuts are all disabled too.-nomenu,-notoolbar,-noscrollbarsβ these options were recognized by some versions of the DjVu viewers, and they're honored here for backward compatibility. a warning message gets printed when option-verboseis active. π
-logo,-textsel,-searchβ okay so bestie, these used to be recognized by some versions of the DjVu viewers, but djview4 does not implement them rn π. You'll just get a warning message printed at you when-verboseis active. That's it, that's the whole tea.
π USAGE π
Okay so most of the good stuff? You get it from the menus, the toolbar, the side bar, or the pop-up menu that shows up when you hold down the right mouse button over a DjVu image. Periodt.
And for the detailed help? Click the contextual help icon in the toolbar, then click around on the various sections of the djview user interface and it'll explain itself to you. Very main character of it honestly. β¨
So here's the table of useful key combos that get recognized when the djvu document is active. Memorize these, they're iconic:
SHIFT+F1β Activate the contextual help.1,2, and3β Change zoom to to 100%, 200% and 300%. (yes the original says "to to", we don't gatekeep)Up,Down,Left,Rightβ Scroll the image in the given direction.Homeβ Display top left corner of the image.Endβ Display bottom right corner of the image.Control+Homeβ Go to the beginning of the document.Control+Endβ Go to the end of the document.Space,Returnβ Scroll down or go to next page.Backspaceβ Scroll up or go to previous page.Page Downβ Go to the next page.Page Upβ Go to the previous page.+,-β Zoom in and out.[,]β Rotate image.Wβ Select the "Fit Width" zooming mode.Pβ Select the "Fit Page" zooming mode.CTRL+F,F3β Search the hidden text layer.CTRL+Gβ Go to a specific page by name or by number.
Now the fun part π β you can get some handy effects by holding down modifier keys. These keys are configurable from the preference dialog, but here's what the default assignments look like:
CTRL+SHIFTβ Hold these keys to show the magnification lens. πCTRLβ Hold this key to select an area with the mouse.SHIFTβ Hold this key to display all hyperlinks.
Likeβ¦ the way that CTRL+SHIFT gives you a whole magnifying lens?? Obsessed fr fr. π¦
πΈ ENVIRONMENT πΈ
Setting the environment variable DJVIEW_VERBOSE to a nonzero value is equivalent to calling djview with the option -verbose. And setting the environment variable DJVIEW_OPENGL to the values 0 or 1 overrides the preference settings regarding OpenGL rendering. Lowkey a whole vibe switch.
When you click on a djvu hyperlink that points to a web page, the program first tries to execute the web browser programs whose names are listed in the colon separated environment variable BROWSER. If that doesn't work out, it goes for sensible platform dependent defaults. It's giving "I'll find a way, bestie." π
The user interface language is determined like this, in order:
- First it tries to find a complete set of translation files for the language specified in the preference dialog.
- Then it checks the ISO 639 languages specified in the colon separated environment variable
LANGUAGE. - Finally, it looks at the language specified by the system locale.
And if all of those searches fail? The user interface language reverts to the english default. No cap.
π CREDITS π
This program was written by LΓ©on Bottou <leonb@users.sf.net> and is distributed under the GNU General Public License. π
It also includes code derived from the program tiff2pdf, written by Ross Finlayson and released under a BSD license. Credit where credit is due, always. π«Ά
π₯ SEE ALSO π₯
okay that's the whole page bestie, you're officially a djview4 expert now π β¨
This gorgeous thing came out of DjVuLibre, dated 10/11/2001, and it's page DJVIEW4(1). go forth and render some djvu files, you absolute icon ππ¦πΈ
π¦ where this page comes from
- arch rolling: djview 4.12.3-1 Β· GPL2
- nixpkgs unstable: djview 4.12.3
- opensuse-leap 16.0: djvulibre-djview4 4.12-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre-djview4 4.12-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre-djview4 4.12-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre-djview4 4.12-bp160.1.12 Β· GPL-2.0-or-later
- Copyright (c) 2007- Leon Bottou
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms