Sumatrapdf Docs Md Command Line Arguments Md At Master Github

Dr. Aris Thorne
-
sumatrapdf docs md command line arguments md at master github

Loading... Loading... Menu - do/check_accesskyes.go - docs/md/Command-line-arguments.md - docs/md/Commands.md - docs/md/Customize-external-viewers.md - docs/md/Customizing-keyboard-shortcuts.md - docs/md/DDE-Commands.md - docs/md/Installer-cmd-line-arguments.md - docs/md/Keyboard-shortcuts.md - docs/md/LaTeX-integration.md - docs/md/Supported-document-formats.md - docs/md/Version-history.md - docs/releasenotes.txt - src/Accelerators.cpp - src/Accelerators.h - src/AppSettings.cpp - src/AppSettings.h - src/Commands.cpp - src/Commands.h - src/ExternalViewers.cpp - src/ExternalViewers.h - src/SumatraUnitTests.cpp This page describes how SumatraPDF manages user settings, preferences, and configuration. It explains where settings are stored, how they're loaded and saved, and how different parts of the application access and modify these settings. For information about command-line arguments, see Command-line arguments.

SumatraPDF stores user preferences in a human-readable text file called SumatraPDF-settings.txt. This file contains all user preferences, including UI settings, viewing preferences, file history, custom keyboard shortcuts, and more. Sources: src/AppSettings.cpp166-296 src/AppSettings.cpp345-402 src/AppSettings.cpp406-466 By default, the settings file is stored in the user's AppData directory: - Standard location: %APPDATA%\SumatraPDF\SumatraPDF-settings.txt - It can be changed using the -appdata command-line argument to specify a different directory Sources: src/AppSettings.cpp80-86 - Loading: At startup, SumatraPDF loads settings from the settings file.

Watching: A file watcher is set up to detect changes made by external editors. - Saving: Settings are saved automatically when changed by the user. - Reloading: If the settings file is modified externally, SumatraPDF reloads it automatically.

The settings file is organized into several main categories: These control the appearance and behavior of the SumatraPDF user interface: - Window state (normal, maximized, fullscreen) - UI Font size (controlled by UIFontSize setting) - Toolbar visibility (controlled by ShowToolbar setting) - Sidebar width (controlled by SidebarDx setting) - Tab width (controlled by TabWidth setting) SumatraPDF uses these settings to configure UI fonts: Sources: src/AppSettings.cpp494-511 These control how documents are displayed: - Default zoom level (fit page, fit width, or a specific percentage) - Default view mode (single page, facing pages, book view, etc.) - Color schemes (including dark mode and custom colors) - Page spacing and margins - Continuous scrolling options SumatraPDF remembers previously opened files and their view states: - Last opened files - Per-file settings like zoom level, page number, and display mode - Most frequently read documents If enabled, SumatraPDF can restore the previous session on startup: - Open documents - Window positions - Tab order and active tab Users can customize keyboard shortcuts by defining them in the settings file.

This is done through the Shortcuts section: Shortcuts [ [ Cmd = CmdOpen Key = Alt + o ] [ Cmd = CmdCreateAnnotHighlight #00ff00 openedit Key = a ] ] Custom shortcuts can override the built-in shortcuts defined in gBuiltInAccelerators.

Sources: src/Accelerators.cpp86-224 docs/md/Customizing-keyboard-shortcuts.md1-67 Users can configure external applications to open documents: ExternalViewers [ [ CommandLine = "C:\Program Files\FoxitReader\FoxitReader.exe" /A page=%p "%1" Name = Foxit &Reader Filter = *.pdf Key = Ctrl + m ] ] This lets users open the current document in another application with a custom command or shortcut. Sources: src/ExternalViewers.cpp20-169 docs/md/Customize-external-viewers.md1-61 At the heart of SumatraPDF's configuration system is the Command System, which connects user actions (menu selections, keyboard shortcuts, etc.) to application functionality.

Sources: src/Commands.h4-244 src/Commands.cpp1-536 Commands are defined in Commands.h using a macro that creates a list of command IDs and descriptions: Each command has: - A unique ID (e.g., CmdOpenFile ) - A human-readable description (e.g., "Open File...") - Optional command arguments for customization Sources: src/Commands.h9-194 Some commands can accept arguments to customize their behavior: In this example, the command sets a green color (#00ff00) for highlighting and enables automatic opening of the edit dialog.

Command arguments are defined in Commands.cpp: Sources: src/Commands.cpp30-56 docs/md/Commands.md280-427 SumatraPDF has a sophisticated system for handling keyboard shortcuts: Sources: src/Accelerators.cpp225-323 src/Accelerators.cpp675-747 The default keyboard shortcuts are defined in the gBuiltInAccelerators array: Sources: src/Accelerators.cpp86-224 Users can define custom shortcuts in the settings file: Shortcuts [ [ Cmd = CmdOpenFile Key = Alt + o ] ] These shortcuts are parsed and merged with the built-in ones when the application starts: Sources: src/Accelerators.cpp675-747 SumatraPDF loads settings at startup and saves them when they change: The LoadSettings() function reads the settings file and populates the global preferences object: Sources: src/AppSettings.cpp184-296 When settings change, they are automatically saved to disk: Sources: src/AppSettings.cpp345-402 SumatraPDF sets up a file watcher to detect when the settings file is modified externally: When the file changes, the ReloadSettings() function is called to refresh the settings: Sources: src/AppSettings.cpp406-466 src/AppSettings.cpp475-487 SumatraPDF allows users to configure external applications to open documents: SumatraPDF includes configurations for popular PDF readers and other applications: Sources: src/ExternalViewers.cpp40-169 Users can define custom external viewers in the settings file: ExternalViewers [ [ CommandLine = "C:\Program Files\FoxitReader\FoxitReader.exe" /A page=%p "%1" Name = Foxit &Reader Filter = *.pdf Key = Ctrl + m ] ] These are loaded and converted to commands when settings are loaded: Sources: src/AppSettings.cpp142-154 docs/md/Customize-external-viewers.md1-61 SumatraPDF has many advanced settings that are not exposed in the UI but can be edited in the settings file.

These include: - Document Display: Options like FixedPageUI,EbookUI,ComicBookUI with sub-settings for margins, spacing, etc. - File Handling: Settings like RememberStatePerDocument,RestoreSession - UI Customization: Settings like UseTabs,ShowToolbar,CustomScreenDPI - Performance: Settings like SmoothScroll,LazyLoading Users can access these settings through the "Advanced Settings..." option in the Settings menu or command palette. SumatraPDF includes a permission system that can restrict certain features including saving preferences: This is useful for kiosk mode and restricted environments, where modifications to settings should be prevented.

Sources: src/AppSettings.cpp346-356 SumatraPDF supports different themes (including dark mode) that can be configured in the settings: Theme-related commands are created during settings loading: Sources: src/AppSettings.cpp289 Other parts of the application access settings through the global gGlobalPrefs object: SumatraPDF's configuration system provides a flexible way to customize the application through a human-readable settings file.

The system handles: - UI Preferences - Controlling application appearance - Document View Settings - Default viewing modes and options - File History - Tracking recently opened files - Session State - Restoring open documents and window positions - Keyboard Shortcuts - Customizable key mappings - External Viewers - Integration with other applications - Advanced Settings - Fine-tuning application behavior The preferences are stored in SumatraPDF-settings.txt and can be edited directly or through the application UI. Settings are loaded at startup, watched for external changes, and saved automatically when modified.

Refresh this wiki - Configuration and Preferences - Settings File Overview - Settings File Location - Settings Lifecycle - Preference Categories - UI Preferences - Document View Preferences - File History - Session Data - Keyboard Shortcuts - External Viewers - Command System - Command Definitions - Command Arguments - Keyboard Shortcut System - Built-in Shortcuts - Custom Shortcuts - Loading and Saving Settings - Loading Settings - Saving Settings - Monitoring for External Changes - External Viewers Configuration - Built-in External Viewers - Custom External Viewers - Advanced Settings - Permission System - Theme Configuration - Settings Access from Code - Summary

People Also Asked

sumatrapdf/docs/md/Command-line-arguments.md%20at%20master...%20-%20GitHub%3F

Loading...%20Loading...%20Menu%20-%20do/check_accesskyes.go%20-%20docs/md/Command-line-arguments.md%20-%20docs/md/Commands.md%20-%20docs/md/Customize-external-viewers.md%20-%20docs/md/Customizing-keyboard-shortcuts.md%20-%20docs/md/DDE-Commands.md%20-%20docs/md/Installer-cmd-line-arguments.md%20-%20docs/md/Keyboard-shortcuts.md%20-%20docs/md/LaTeX-integration.md%20-%20docs/md/Supported-document-formats.md%20-%20docs/md/Version-history.md%20-%20docs...

Changes%20%B7%20Command%20line%20arguments%20%B7%20Wiki%20%B7%20sumatrapdfreader%20/%20sumatrapdf...%3F

Command%20arguments%20are%20defined%20in%20Commands.cpp%3A%20Sources%3A%20src/Commands.cpp30-56%20docs/md/Commands.md280-427%20SumatraPDF%20has%20a%20sophisticated%20system%20for%20handling%20keyboard%20shortcuts%3A%20Sources%3A%20src/Accelerators.cpp225-323%20src/Accelerators.cpp675-747%20The%20default%20keyboard%20shortcuts%20are%20defined%20in%20the%20gBuiltInAccelerators%20array%3A%20Sources%3A%20src/Accelerators.cpp86-224%20Users%20can%20define%20custom%20shortcuts%20in%20the%20sett...

Command%20line%20arguments%20-%20sumatra%20pdf%3F

Loading...%20Loading...%20Menu%20-%20do/check_accesskyes.go%20-%20docs/md/Command-line-arguments.md%20-%20docs/md/Commands.md%20-%20docs/md/Customize-external-viewers.md%20-%20docs/md/Customizing-keyboard-shortcuts.md%20-%20docs/md/DDE-Commands.md%20-%20docs/md/Installer-cmd-line-arguments.md%20-%20docs/md/Keyboard-shortcuts.md%20-%20docs/md/LaTeX-integration.md%20-%20docs/md/Supported-document-formats.md%20-%20docs/md/Version-history.md%20-%20docs...

Configuration%20and%20Preferences%20%7C%20sumatrapdfreader/sumatrapdf%20%7C%20DeepWiki%3F

Loading...%20Loading...%20Menu%20-%20do/check_accesskyes.go%20-%20docs/md/Command-line-arguments.md%20-%20docs/md/Commands.md%20-%20docs/md/Customize-external-viewers.md%20-%20docs/md/Customizing-keyboard-shortcuts.md%20-%20docs/md/DDE-Commands.md%20-%20docs/md/Installer-cmd-line-arguments.md%20-%20docs/md/Keyboard-shortcuts.md%20-%20docs/md/LaTeX-integration.md%20-%20docs/md/Supported-document-formats.md%20-%20docs/md/Version-history.md%20-%20docs...

Batch%20print%20pdf%20through%20commandline%20with%20sumatra%20pdf%3F

Sources%3A%20src/Accelerators.cpp86-224%20docs/md/Customizing-keyboard-shortcuts.md1-67%20Users%20can%20configure%20external%20applications%20to%20open%20documents%3A%20ExternalViewers%20%5B%20%5B%20CommandLine%20%3D%20%22C%3A%5CProgram%20Files%5CFoxitReader%5CFoxitReader.exe%22%20/A%20page%3D%25p%20%22%251%22%20Name%20%3D%20Foxit%20%26Reader%20Filter%20%3D%20*.pdf%20Key%20%3D%20Ctrl%20+%20m%20%5D%20%5D%20This%20lets%20users%20open%20the%20current%20document%20in%20another%20application%20with%20a%20custom%20command%20or%20shortcut.%20Sourc...