Displaying and Printing Documents With a Command

You can open Viewer and display or print a document using a command from the command prompt or a user program.
By specifying command options, you can also specify a view, search for text strings, or specify a printer.

Command line format

The format of the command (dwviewer.exe) used in Viewer is as follows:
 
dwviewer.exe DocuWorks_file_name [/npage_number] [/i"document_name_in_binder"]
[/f] [/vnumber_corresponding_to_view] [/q"search_string"] [/mzoom_ratio] [/mw] [/mh] [/mp]
[/p] [/ptprinter_name driver_name port_name] [/sp] [/sptprinter_name driver_name port_name]
[/oopprint_settings]
 
  • Use lower case characters for the command, options, and text strings.
  • Change the path of "dwviewer.exe" according to your environment.
  • For "DocuWorks_file_name", specify the full path to the DocuWorks file you want to display or print. The path cannot exceed 255 characters.

Description of options

The following table describes each option:
Options Description
/npage_number
Specify the page number you want to display.
Do not enter a space between /n and the page number.
  • When the /i option is also specified, this number refers to the page number of a document contained in a binder. Specifying 0 displays the original data view.
  • This option is ignored if you specify the /p, /pt, /sp, or /spt option.
/i"document_name_in_binder"
If you specified a binder name as the DocuWorks file name, specify the name of the document in the binder that you want to display.
Do not enter a space between /i and the document name. Enclose the document name with double quotation marks (""). The document name cannot exceed 255 characters.
  • This option is ignored if you specify the /p, /pt, /sp, or /spt option.
/f
Displays the DocuWorks file in full screen view.
  • Closing the full screen view will return you to the view specified with the /v option. If the /v option is not specified, you will be returned to the document view.
  • This option is ignored if you specify the /p, /pt, /sp, or /spt option.
/vnumber_corresponding_to_view
Specify the number corresponding to the view in which you want to display the DocuWorks file.
Do not enter a space between /v and the number. You can specify the following numbers:
1 : Document view
2 : Page Sorter view
3 : Original Data view
4 : Page Sorter and Document view
  • If you do not specify this option, the document is displayed in document view. However, if the /f option is specified, the document is displayed in full screen view and returns to document view when the full screen is closed.
  • This option is ignored and the document is displayed in original data view if you specified /n0.
  • This option is ignored if you specify the /p, /pt, /sp, or /spt option.
/mzoom_ratio
Specify the zoom ratio.
Do not enter a space between /m and the value.
  • The range of value you can specify is from 10 to 1,600. Specifying a value outside this range will display the DocuWorks file in 100% ratio.
/mw
Displays the DocuWorks file to fit to the page width.
/mh
Displays the DocuWorks file to fit to the window height.
/mp
Displays the DocuWorks file to fit to the entire page.
/q"search_string"
Specify the text string you want to search.
Enclose the text string with double quotation marks (""). Do not enter a space between /q and the search string. The text string cannot exceed 255 characters.
You can combine ("OR") search conditions by separating them with a space; for instance, enter "A B" to specify "A or B".
If this option is specified, the [Find] dialog box appears and [Find Next] is performed once. In this case, all the check boxes in the [Find] dialog box are selected.
If you do not specify any search string, the string for the previous search performed in Viewer will be used. If no search has been previously performed, the DocuWorks document is displayed without performing a search.
  • If you specified the /n or /i option, the search begins from the specified page.
  • This option is ignored if you specify the /f, /p, /pt, /sp, or /spt option.
  • When the /v option is specified, the search is performed only if /v1 is specified.
/p
Prints the DocuWorks file with the "default printer".
  • If you specify this option, the /n, /i, /f, /v, /q, /m, /mw, /mh, and /mp options are ignored.
/pt printer_name driver_name port_name
Specify the printer to print the DocuWorks file.
Enter spaces between /pt, the printer name, the driver name, and the port name.
/sp
Prints the DocuWorks file with the "default printer".
If the DocuWorks file to be printed is a protected document, the file is skipped and the name of the file and the date processed are recorded in the log file.
The path name of the log file will be "AppData\Local\FUJIFILM\DocuWorks\DWTemp\temp\BatPrint.log".
  • If you specify this option, the /n, /i, /f, /v, /q, /m, /mw, /mh, and /mp options are ignored.
/spt printer_name driver_name port_name
Specify the printer to print the DocuWorks file.
Enter spaces between /spt, the printer name, the driver name, and the port name.
If the DocuWorks file to be printed is a protected document, the file is skipped and the name of the file and the date processed are recorded in the log file.
The path name of the log file will be "AppData\Local\FUJIFILM\DocuWorks\DWTemp\temp\BatPrint.log".
  • If you specify this option, the /n, /i, /f, /v, /q, /m, /mw, /mh, and /mp options are ignored.
/oopprint_settings
This option allows you to specify advanced print settings. It should be specified with /p or /pt.
Specify either of the following text strings. Do not enter a space between /oop and the string. If you want to specify both settings, specify the /oop option twice.
  • nocancel
    Does not show the [Printing] dialog box.
  • skipprotected
    If the DocuWorks file to be printed is a protected document, skips it and records the name of the file and the date processed in the log file.
    The path name of the log file will be "AppData\Local\FUJIFILM\DocuWorks\DWTemp\temp\BatPrint.log".

Example of use

The examples below show the usage of this command.
If the file name contains a space such as "C:\Program Files (x86)\FUJIFILM\DocuWorks\bin\dwviewer.exee", enclose the name with double quotations (" ").
  • Displaying the document named "office memo" in page sorter view
    "C:\Program Files (x86)\FUJIFILM\DocuWorks\bin\DWviewer.exe" "C:\office memo.xdw" /v2
  • Displaying the 25th page of the document named "Chapter 2" in the binder called "User Guide"
    "C:\Program Files (x86)\FUJIFILM&\DocuWorks\bin\DWviewer.exe" "C:\User Guide.xbd" /i"Chapter 2" /n25
  • Displaying the document named "proposal" in full screen view
    "C:\Program Files (x86)\FUJIFILM\DocuWorks\bin\DWviewer.exe" "C:\proposal.xdw" /f
  • Searching the text string "manual" in the document named "proposal"
    "C:\Program Files (x86)\FUJIFILM¥DocuWorks\bin\DWviewer.exe" "C:\proposal.xdw" /q"manual"
  • Printing the document named "proposal" with the default printer
    "C:\Program Files (x86)\FUJIFILM\DocuWorks\bin\DWviewer.exe" "C:\proposal.xdw" /p
  • Printing the document named "proposal" with the printer named "Printer Name" using the driver named "Driver1" and connected to "Port1" without showing the [Printing] dialog box
    "C:\Program Files (x86)\FUJIFILM\DocuWorks\bin\DWviewer.exe" "C:\proposal.xdw" /pt "Printer Name" Driver1 Port1 /oopnocancel