Documentation/Screenshots/en

Screenshots for documentation
This page describes how to create screenshots of LibreOffice dialogs and include them in LibreOffice documentation/help. The precondition is to have a git clone of LibreOffice help repository and/or to build core LibreOffice code including help ( switch). For screenshots in multiple languages, build with, where $language list is a list of two- or three-letter language codes separated by space, for example

Basic concepts
Every LibreOffice dialog has a Help ID that uniquely identifies it (so that help browser knows which help page to display when the user invokes help for a particular dialog). Help ID usually looks like this:

i.e. it resembles a path where this dialog's .ui file is stored. We have decided to have IDs of dialog screenshots (and thus file paths where screenshot images are stored) copy their help IDs in order to avoid maintaining of alternate mapping. Given that, the screenshot of the dialog above will be found in the following path:

and its localized version (where $language_code is a two- or three-letter code of the given language) in:

Within LibreOffice (help) source tree, files with screenshot images that are included in help pages (.xhp files) are stored in the following folder:

in the paths corresponding to their screenshot IDs as outlined above.

Creating series of screenshots automatically
To create screenshots of every dialog in LibreOffice in one go, run:

in the root directory of your LibreOffice source tree. You can also create screenshots of individual modules. For instance, the following command creates screenshots of all LibreOffice Calc (sc) dialogs:

After this command completes, the screenshot will be stored in the following folder in your LibreOffice source tree:

in the paths corresponding to their screenshot IDs as outlined above. If you have built LibreOffice with multiple language/locale support (, see above), this screenshot run will automatically create screenshots in all languages you are building with.

Creating screenshots manually
To create dialog screenshots from running LibreOffice, you need to activate screenshotting mode (akin to experimental mode) in, the relevant configuration key is. Once screenshotting mode is active, right mouse click into any dialog action area (where "OK", "Cancel" etc. buttons are) will make a context menu appear:



Click Screenshot item of the context menu to create screenshot of the current dialog. In the dialog that appears, you'll see a screenshot preview and a text area. If you're happy with the result, click Save Screenshot... button to store the screenshot into the folder of choice, preferably directly to  folder and the path corresponding to their screenshot ID.

Explanation in video
Activate English subtitles:

Including screenshots in help pages

 * 1) If you have created screenshot with the help of , copy the screenshot image from   folder to   folder
 * 2) If you have created screenshot manually, the best approach is to save it directly to , respecting screenshot ID path.

Now you can use your preferred way of editing help files (either manually or using HelpAuthoring extension). A .xhp snippet to be included in the help file can look for example like this (for the above area tab dialog, path to screenshot image highlighted):

Area dialog

Alternatively, when creating a screenshot manually, you can copy and paste the markup snippet as generated in the screenshot annotation dialog:



Committing your changes
This is no different from committing other changes to help content, the only gotcha is adding new files with screenshots under git version control: