DocView Capture by DocView.AI3 Nov 2026 09:49

Output and export

The last step of every workflow, PDF generation & export, turns each batch into files and data and delivers them to your systems. You set it up on the Output & export tab of a Batch Setup:

  • the Output: image format, file and folder names, and data files,
  • the Export destinations: where the output goes, and
  • optionally a separate export setup per document type.

Output settings

  1. Open the Batch Setup and go to Output & export. Create a draft first if the version is released.
  2. Fill in the Output card (see below).
  3. Click Save output settings.

Images

Setting Choices
Image format Searchable PDF, PDF/A (archive, searchable), PDF (image only), Multipage TIFF, Single-page TIFF (one file per page)
Compression Automatic, CCITT G4 (black & white), LZW (lossless; Flate in PDF), JPEG
JPEG quality Used with JPEG compression. Default 80.

A searchable PDF holds the page images with an invisible OCR text layer, so users can search and copy text. Choose PDF/A for long-term archiving.

File and folder names

Setting Meaning
Folder Relative to each destination, for example {{ batch.name }}.
File name Without extension, for example {{ doc.class }}_{{ doc.number }}.

Names are templates. Click Insert field beside each box to pick batch, document, date, system or environment values instead of typing them. Some examples:

{{ doc.class }}/{{ date.now | date.to_string '%Y-%m' }}
{{ doc.fields.InvoiceNumber | object.default doc.number }}

The second example uses the invoice number, or the document number when there is none.

The pick list offers these groups:

Group Examples
Batch Batch name, Batch id, Batch Setup, Priority, Source, Created, Number of documents, batch fields
Document Document number, Document type (key and name), Number of pages, Classification confidence
Document fields Every field of the document types this setup exports
Line items Row number and table columns (CSV with one row per table row)
Date and time Today, Now, Year, Month, Day, Time
System Machine name, Worker account, Domain, Operating system, Time zone
Environment Environment variables whose names start with DOCVIEW_

Tip: Use an environment variable such as DOCVIEW_EXPORT_ROOT in folder names. The same Batch Setup then works on test and live servers without changes.

Data files

Under Data files, tick XML, CSV and/or JSON. Tick One data file per batch (otherwise one per document) for a single file per batch.

Without further design, DocView writes a built-in structure. The CSV has one row per document: batch name, document number, class and file, then every field.

Design the data files

Switch on Design the data files to shape each file for the system that reads it. Tabs appear for XML, CSV and JSON, plus What goes in, which shows the built-in structures and what templates can use.

  • XML: write any XML your system expects. Click Start from the built-in structure to begin. Add an XSD schema (validated before export) to check the XML before it is written.
  • CSV: tick Design the columns. Choose One row per document or row of a table (line items), the Separator (comma, semicolon, tab or bar) and Heading row. Click Start from all fields, or Add column. For each column, type a Heading and pick a Value from the pick list, or choose Custom expression….
  • JSON: write any JSON. Use | json to write a value safely, for example "total": {{ doc.fields.TotalAmount | json }}. The result must be valid JSON.

Templates can use documents (each with number, class, class_name, page_count, confidence, files, fields.Name, tables.Name), doc for the current document, and row and row_number for CSV table rows. Use | json or | html.escape to write values safely in JSON or XML.

Images after export

Images after export can be Keep, Delete immediately or Delete after a number of days (then set Days). See Archive and retention.

Checks on save

Save output settings checks the templates on sample documents, that every field they use exists, and the XML, CSV and JSON they produce. Errors stop the save; warnings are shown with it. For example, DocView warns when a file name template gives an empty name, and refuses a template that uses a field the document types do not have.

Click Check export at the top to check every export setup, template and destination of the version at once, including that every document type goes out somewhere.

Test against a sample batch

Under Test against a sample batch, choose a batch of this Batch Setup and click Test. DocView converts it with the saved settings and shows the files it would make. Nothing is written or sent.

Export destinations

Each enabled destination receives the output. Each one is written as a unit: if it fails, nothing is left behind there, and a retry only delivers to destinations that have not succeeded yet.

Add a destination

  1. Under Add destination, choose the connector (the list is grouped: folders and servers, Microsoft 365, cloud drives, cloud storage, document management, ERP and accounting, CRM and service desk, data and integration), type a Name and click Add.
  2. Fill in its settings and click Save.
  3. Click Test to check the connection.
  4. Use Enabled to switch a destination off, and drag to reorder.

Important: Without an enabled destination, batches stop in the export step with an error.

Connectors

Connector Settings
Folder / network share Folder (a full path such as D:\Export or \\server\share\invoices), Overwrite existing files
SFTP server Server, Port (22), User name, Password (secret) or Private key (secret) with Key passphrase (secret), Remote folder, Overwrite existing files
SQL Server table Connection string (secret), Table (e.g. dbo.Invoices), Column mapping; inserts one row per document. Empty mapping matches columns to fields by name.
REST API / webhook Address, Method (POST or PUT), Headers (secret), Include the files, Time-out (seconds), Build the request with a script
C# script (runs on the DocView Worker) C# script, Parameters, Time limit per step (seconds)
SharePoint / Teams, OneDrive, Google Drive, Dropbox, Box, ShareFile, Amazon S3 and S3-compatible (IBM Cloud Object Storage …), Azure Blob, FTP/FTPS, WebDAV, e-mail Sign-in, Folder and When the file exists; most can fill columns or properties from the document (Metadata). See Cloud and business-system destinations.
CMIS (IBM FileNet, Alfresco, Documentum …), M-Files, DocuWare Sign-in, where documents go, the document type or class, and Metadata for properties or index fields. See Cloud and business-system destinations.
SAP S/4HANA, SAP Business One, Dynamics 365 / Dataverse, Business Central, Salesforce, Xero, QuickBooks Online, ServiceNow, OData Sign-in, what to create, Fields (one record per document, with types and nested fields), an optional record script (line items) and Attach the document's files. See Cloud and business-system destinations.

Passwords, keys and connection strings are never typed into a Batch Setup. You choose the name of a secret stored under Settings. See Settings.

The optional REST script gets batch, documents and files, and returns the request body:

return { invoice: documents[0], pdf: files[0].content };

A C# script destination runs your own code on the DocView Worker: BatchExportStart, DocumentExport for each document, BatchExportEnd, and BatchExportFailed. It needs the permission Write C# export scripts. Test compiles the script without running it. See C# export scripts.

Its own output per destination

Each destination can use Same as the output above or Its own output. With its own output you choose Images (including No images (data only)), Data files, One data file per batch, and a different File name and Folder. For example: PDF and XML to a share, TIFF and CSV to another system, and data only to an API.

Export per document type

By default all document types share the Default export. A type can have its own export setup instead, for example invoices to the ERP and delivery notes to the archive.

  1. Under Export setup for, click the document type. Badges show default or own.
  2. Choose Start from: The default export or the export of another type.
  3. Click Give type its own export setup, or load a file under …or load an export setup file.

In an export setup you can also:

  • Download setup: save it as a file.
  • Load setup file: Replace with the file.
  • Copy to other types: give ticked types a copy of this setup.
  • Use the default export: remove the type's own setup.

Only documents of that type go out through its own setup.

Still stuck? support@docview.ai · +44 7886 864921

Made with DocView Capture by DocView.AI · www.docview.ai