Organization Use

Back to Support

This page provides technical documentation for using NAPS2 in a organization where installations are centrally managed.

Deployment

NAPS2 provides an MSI installer for easy deployment via Group Policy. You can find the latest MSI on the download page.

Optional Files

Optional files (e.g. for OCR) will be downloaded automatically, but if you would rather deploy them yourself (or the target machine doesn't have internet access) you can place them in these folders:

%APPDATA%\NAPS2\components\tesseract-3.0.4                    (for tesseract.exe)
%APPDATA%\NAPS2\components\tesseract-3.0.4\tessdata           (for .traineddata language files)        
%APPDATA%\NAPS2\components\tesseract-3.0.4\tessdata\configs   (for the hocr file)
%APPDATA%\NAPS2\components\gs-9.21                            (for gsdll32.dll)

Either copy the files from your local installation, or manually download and extract them from Sourceforge.

For OCR, you'll need tesseract.exe and the .traineddata file for each language you want. If the user doesn't have write permissions on the components folder, you'll also have to deploy the hocr file.

To import PDFs not created by NAPS2, you'll need the gsdll32.dll file.

You can change where NAPS2 looks for optional files by using the ComponentsPath element in appsettings.xml.

Configuration

You can configure NAPS2 for your users by deploying application-level configuration files to the NAPS2 installation directory (%PROGRAMFILES(X86)%\NAPS2).

There are two configurable application-level files:

profiles.xml

This file stores a list of scanning profiles. It acts as a set of default profiles that new users start with. If no application-level profiles.xml file exists, new users will start with no profiles. Note that once a user makes a change to any profile, changes to the application-level profiles.xml will no longer have any effect for that user. If you'd like to change this behavior, use the LockSystemProfiles element in appsettings.xml.

The user-level profiles are stored in %APPDATA%/NAPS2/profiles.xml. You can use your copy of this file as a base for the application-level profiles.xml (they use the exact same format).

appsettings.xml

This file stores global configuration information for all users. To make changes, use the default appsettings.xml file as a base and make changes in a text editor. The default content is this:

<?xml version="1.0" encoding="utf-8" ?>
<AppConfig>
  <DefaultCulture></DefaultCulture>
  <StartupMessageTitle></StartupMessageTitle>
  <StartupMessageText></StartupMessageText>
  <StartupMessageIcon>Information</StartupMessageIcon>
  <SaveButtonDefaultAction>SaveAll</SaveButtonDefaultAction>
  <HideOcrButton>false</HideOcrButton>
  <HideImportButton>false</HideImportButton>
  <HideSavePdfButton>false</HideSavePdfButton>
  <HideSaveImagesButton>false</HideSaveImagesButton>
  <HideEmailButton>false</HideEmailButton>
  <HidePrintButton>false</HidePrintButton>
  <DisableAutoSave>false</DisableAutoSave>
  <LockSystemProfiles>false</LockSystemProfiles>
  <LockUnspecifiedDevices>false</LockUnspecifiedDevices>
  <NoUserProfiles>false</NoUserProfiles>
  <AlwaysRememberDevice>false</AlwaysRememberDevice>
  <DisableGenericPdfImport>false</DisableGenericPdfImport>
  <NoUpdatePrompt>false</NoUpdatePrompt>
  <DeleteAfterSaving>false</DeleteAfterSaving>
  <DisableSaveNotifications>false</DisableSaveNotifications>
  <SingleInstance>false</SingleInstance>
  <ComponentsPath></ComponentsPath>
  <OcrTimeoutInSeconds>60</OcrTimeoutInSeconds>
  <OcrState>UserConfig</OcrState>
  <OcrDefaultLanguage></OcrDefaultLanguage>
  <DefaultProfileSettings>
    <DriverName>wia</DriverName>
    <UseNativeUI>false</UseNativeUI>
    <PaperSource>Glass</PaperSource>
    <BitDepth>C24Bit</BitDepth>
    <PageSize>Letter</PageSize>
    <PageAlign>Right</PageAlign>
    <Resolution>Dpi100</Resolution>
    <AfterScanScale>OneToOne</AfterScanScale>
    <Brightness>0</Brightness>
    <Contrast>0</Contrast>
    <EnableAutoSave>false</EnableAutoSave>
    <MaxQuality>false</MaxQuality>
    <Quality>75</Quality>
    <ExcludeBlankPages>false</ExcludeBlankPages>
    <BlankPageWhiteThreshold>70</BlankPageWhiteThreshold>
    <BlankPageCoverageThreshold>25</BlankPageCoverageThreshold>
    <BrightnessContrastAfterScan>false</BrightnessContrastAfterScan>
    <WiaOffsetWidth>false</WiaOffsetWidth>
    <ForcePageSize>false</ForcePageSize>
    <FlipDuplexedPages>false</FlipDuplexedPages>
    <TwainImpl>Default</TwainImpl>
  </DefaultProfileSettings>
  <KeyboardShortcuts>
    <!-- Many elements here -->
  </KeyboardShortcuts>
</AppConfig>


Default Culture

If you'd like to specify NAPS2's default language to be something other than the machine default, use the DefaultCulture element with a language tag (e.g. "en-US" for US English, "de-DE" for German).

Example:

<DefaultCulture>de-DE</DefaultCulture>


Startup Message

If you'd like users to see a message every time users start NAPS2 (e.g. to remind them of regulatory requirements), use the StartupMessage elements.

StartupMessageTitle: An optional string that will be displayed as the message box window's title.
StartupMessageText: The message text to be displayed. If not specified, no message box window is displayed at startup.
StartupMessageIcon: The message box window's icon name. Possible values: "None", "Information", "Warning".

Example:

<StartupMessageTitle>Notice</StartupMessageTitle>
<StartupMessageText>Confidential documents must be dealt with in accordance with company policies.</StartupMessageText>
<StartupMessageIcon>Information</StartupMessageIcon>


Example startup message


Save Button Default Action

If you'd like to change the default action for the buttons "Save PDF", "Save Images", and "Email PDF", use the SaveButtonDefaultAction element. Possible values: "SaveAll", "SaveSelected", "AlwaysPrompt", "PromptIfSelected". Note that "SaveSelected" will act the same as "SaveAll" if no images are selected.

Example:

<SaveButtonDefaultAction>AlwaysPrompt</SaveButtonDefaultAction>


Hide (Various) Buttons

If you'd like to hide some of the toolbar buttons, use these elements. Also see OCR State.

Example:

<HideImportButton>true</HideImportButton>
<HideOCRButton>true</HideOCRButton>
<HideSavePdfButton>true</HideSavePdfButton>
<HideSaveImagesButton>true</HideSaveImagesButton>
<HideEmailButton>true</HideEmailButton>
<HidePrintButton>true</HidePrintButton>


Disable Auto Save

If you'd like to disable the Auto Save feature due to privacy or security concerns, use the DisableAutoSave element.

Example:

<DisableAutoSave>true</DisableAutoSave>


Lock System Profiles

If you'd like to have more control over user profiles, use the LockSystemProfiles element. With this enabled, users will be unable to edit or delete the profiles specified in the application-level profiles.xml, and such profiles can be updated at any time by the administrator.

By default, if the scanning device is not specified in a profile, users will be able to set it themselves. You can use the AlwaysRememberDevice element to automatically set the device when the profile is first used. If you would prefer to force users to always select the device when scanning, use the LockUnspecifiedDevices element.

Example:

<LockSystemProfiles>true</LockSystemProfiles>


Lock Unspecified Devices

If you have LockSystemProfiles enabled and would like the user to always be prompted to choose a device (rather than being able to specify one in the profile), you can use the use the LockUnspecifiedDevices element.

Example:

<LockUnspecifiedDevices>true</LockUnspecifiedDevices>


No User Profiles

If you have LockSystemProfiles enabled and would like the user to be unable to create or use custom profiles, use the NoUserProfiles element.

Example:

<NoUserProfiles>true</NoUserProfiles>


Always Remember Device

If you would like profiles that don't have a specified device to remember the selected device when they are first used, use the AlwaysRememberDevice element.

Example:

<AlwaysRememberDevice>true</AlwaysRememberDevice>


No Update Prompt

If you don't want users to be prompted to update tesseract when they click the OCR button, use the NoUpdatePrompt element.

Example:

<NoUpdatePrompt>true</NoUpdatePrompt>


Delete After Saving

If you'd like images to be deleted after they're saved to avoid accidental duplication, use the DeleteAfterSaving element.

Example:

<DeleteAfterSaving>true</DeleteAfterSaving>


Disable Save Notifications

If you don't want save notifications (the small popup in the bottom right after saving), use the DisableSaveNotifications element.

Example:

<DisableSaveNotifications>true</DisableSaveNotifications>


Single Instance

If you only want one instance of NAPS2 to run at once, use the SingleInstance element. Trying to start a second instance will focus the first one instead.

Example:

<SingleInstance>true</SingleInstance>


Components Path

If you want to change where NAPS2 looks for components (i.e. tesseract ocr files), use the ComponentsPath element. If the user doesn't have write permissions on the selected folder, you'll need to make sure you deploy all the necessary files yourself.

If not specified, the default path is %APPDATA%\NAPS2\components.

Example:

<ComponentsPath>%PROGRAMFILES(X86)%\NAPS2\components</ComponentsPath>


Ocr Timeout

If you want to change the amount of time allowed for OCR (per page), use the OcrTimeoutInSeconds element. The default is 60 seconds.

Example:

<OcrTimeoutInSeconds>120</OcrTimeoutInSeconds>


Ocr State

If you'd like to force OCR to be enabled or disabled, use the OcrState element. Possible values: "UserConfig", "Enabled", "Disabled".

You probably want to deploy language files if you set it to Enabled.

Example:

<OcrState>Disabled</OcrState>


Ocr Default Language

If you'd like to set a default language for OCR, use the OcrDefaultLanguage element with a language code. Reference: http://www.loc.gov/standards/iso639-2/php/code_list.php.

If OcrState is Enabled and a default language is set, it will override any user preference for language.

Example:

<OcrDefaultLanguage>eng</OcrDefaultLanguage>


Default Profile Settings

If you'd like to customize the default settings used when users create a new profile, you can change the DefaultProfileSettings elements.

DriverName: The driver to use to connect to the scanner. Possible values: "wia", "twain".
UseNativeUI: Whether to use the native scanning UI (rather than the profile's detailed settings).
Brightness, Contrast: -1000 to 1000
BitDepth: "C24Bit" (color), "Grayscale", "BlackWhite".
PageAlign: "Left", "Center", "Right".
PageSize: "Letter", "Legal", "A5", "A4", "A3", "B5", "B4", "Custom"
Resolution: "Dpi100", "Dpi150", "Dpi200", "Dpi300", "Dpi400", "Dpi600", "Dpi800", "Dpi1200"
PaperSource: "Glass", "Feeder", "Duplex"

Example:

...
<PageSize>A4</PageSize>
...


Default page size A4


If PageSize is "Custom", you must also add a CustomPageSize element. A CustomPageSizeName element is optional. For example:

...
<PageSize>Custom</PageSize>
<CustomPageSizeName>Letter</CustomPageSizeName>
<CustomPageSize>
  <Width>8.5</Width>
  <Height>11</Height>
  <Unit>Inch</Unit>
</CustomPageSize>
...

Possible values for Unit: "Inch", "Centimetre", "Millimetre"

Back to Support