The Command-line Interface is provided as an executable file. You can call it from either a Windows batch file or a Linux shell script.
Office Server Document Converter V10.0 can be executed from the Command-line Interface by:
The executable file names are as follows:
Windows | SBCCmd.exe |
---|---|
Linux | SBCCmd |
Environment Variables have to be set in order to execute these files. In Windows versions, these are automatically set by the installer. In Linux versions, they have to be set. See Environment Variables and Symbolic Links.
To run the command-line program of Office Server Document Converter V10.0 for Windows, enter the following command:
If Office Server Document Converter V10.0 for Windows is successfully installed, the following message will be displayed:
Then you can view sample.pdf in the \tmp directory.
In Office Server Document Converter V10.0 for Linux , the installation program will place the shell script file named run.sh in the [Install directory]. This is a sample shell script for running the command-line program SBCCmd. This script sets the necessary environment variables in the shell, and runs SBCCmd. To run the command-line program of Office Server Document Converter V10.0 for Linux using this script, enter the following command from your terminal window:
If Office Server Document Converter V10.0 for Linux is successfully installed, the following message will be displayed, then you can get sample.pdf in /tmp directory:
The same parameters in the same formats apply to both SBCCmd and run.sh.
The following parameters apply to the Command-line Interface: Parameters with “*” in the following table indicate a negative meaning if no is placed in the beginning of the command.
When specifying a path name that contains a space, the path name must be enclosed in double quotation marks. If two conflicting parameters are specified, the last parameter on the line takes precedence.
Parameter | Functions |
---|---|
-d Original-Document | Specifies the URI of the original document to be converted.
|
-o Output-File |
Specifies the path name of the resulting output file.
|
-i Option-Setting-File | Specifies the path name of “Option Setting File” which defines Office Server Document Converter V10.0 options in XML format. Any number of these parameters can be specified. If any content of this file is changed it automatically overwrites the previous settings. Because only a described parameter in the Option Setting File is evaluated, it is possible to change a part of setting by adding a file that describes those parameters that should be changed. If conflicting values for a parameter are specified in the Option Setting File and the Command-line, the last specified value overwrites the previous value. |
-p Output-Format / Printer-Name |
Specifies
the output format of the converted results or specifies the printer name when results should be printed.
If this parameter is omitted, -p @PDF is automatically specified.
See “PDF Output” for PDF output info. See “SVG Output” for SVG output info. See “XPS Output” for XPS output info. See “INX Output” for INX output info. See “Flash Output” for Flash output info. Monochrome/256 colors JPEG, PNG and TIFF output are effective only with Windows versions. |
-start Start-Page | Specifies the start page and the end page of output document. If the start page is omitted or the specified value is 0, the start page is considered the first page. If the end page is omitted or 0, or the specified value exceeds the actual page number, the end page is considered the last page. If the setting is inconsistent, (for example, -start 5 -end 3) an error occurs.
|
-end End-Page | |
-omitbp |
If there is an blank page at the beginning of the document, that page is skipped. It is valid only if the conversion source file is MS Word or MS Excel.If there is an blank page at the beginning of the document, that page is skipped.The skipped pages are counted as one page.If you want to skip and get only the first page with content, specify it in combination with -end 1.Skip even if the first page has only header and footer. |
-fontalias name=substname | Specifies font substitutions. If the option -fontalias A=B is specified, all of font family-name A in the file will be substituted with font B. If you are going to specify multiple substitutions, you must specify the -fontalias parameter for every substitution. You can also specify this option using the “Option Setting File”. The substitution is not recursive, or is done only once. |
-extlevel Error-Level |
Permits setting the error level at which Office Server Document Converter V10.0 will stop converting and
abort the job.
|
-silent | Suppresses the output of Error Messages. Normally error information is sent to stdout or stderr. |
-stdout | Error Messages is sent to stdout only if this parameter is specified. It is output to stderr by default. |
-stderr | Error Messages is also sent to stderr if this parameter is specified. It is output to stderr by default. |
-pgbar * | Outputs the progress of the page generation to the console. “.” shows the progress of formatting, “-” shows the progress of the outputted page. |
-v | Shows the version, copyright and license information. Cannot be used with any other parameter. |
-h -? |
Displays a list of all the Command-line parameters. |
Parameter | Functions | ||||||
---|---|---|---|---|---|---|---|
-gdismooth Value | Performs the smoothing when printing and outputting images. Specifies the smoothing processing to text, borders and images separately.
|
||||||
-linkfile Value | Outputs an image file linked to the OOX file. | ||||||
-propertynonoutput | Do not output Office file properties (Title/Subject/Author/Keywords). |
Parameter | Functions |
---|---|
-wmarktext text | Displays the specified watermark text on each page. Possible to make it multiple lines by delimiting with the line feed \n. This setting is invalid with the evaluation version. |
-wmarkfont fontFamily | Specifies the font family to the character string which you set to wmarktext. |
-wmarkweight fontweight | Specifies the font weight to the character string which you set to wmarktext. Possible to specify normal, bold or the numerical value from 100 to 900. |
-wmarkstyle fontstyle | Specifies the font style to the character string which you set to wmarktext. |
-wmarkopacity Value | Specifies the opacity to the character string which you set to wmarktext. |
The parameters for printer are only available for the Windows version.
Parameter | Functions |
---|---|
-copies Copies | Specifies the number of copies when outputting to a printer. The default value is 1. |
-collate * | This parameter is effective only when outputting multiple copies. When -collate is specified, printing from the specified starting page to the ending page repeated. When -nocollate is specified, the same page is continuously printed as multiple copies. |
-fitpaper | Adjusts the page size to fit in the paper size specified by the printer. When printing a A4 size PDF to a A4 size paper, the printable area becomes smaller due to the non printable margins. |
Parameter | Functions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
-pdfver Version | Specifies the PDF version from the following:
|
||||||||||
-tpdf * | Generates Tagged PDF. Ignored if PDF cannot be tagged depending on the PDF versions. | ||||||||||
-lpdf * | Generates linearized PDF optimized for the display on the Web. | ||||||||||
-pdfprofile file | When PDF/A-1b:2005 or PDF/A-2b:2011 is specified for PdfVersion, the ICC profile must be specified. In that case, specify the full path of the ICC profile to this parameter. This parameter is invalid except for PDF/A-1b:2005 and PDF/A-2b:2011. | ||||||||||
-encrypt Key-Length |
Specifies the key length when encrypting the PDF file. The key length can be specified
from the following:
|
||||||||||
-userpwd Password | Specifies the user password required to open the PDF. Specify up to 32 ASCII characters. | ||||||||||
-ownerpwd Password | Specifies the owner password for the PDF. Specify up to 32 ASCII characters. | ||||||||||
-npt * |
Prohibits printing the PDF file. Use -ppa when you specify PDF version 1.4 or later and -encrypt 40rc4 is not specified.
It is necessary to specify -ownerpwd so that this parameter is effective. |
||||||||||
-ncg * |
Prohibits making changes of the PDF file.
It is necessary to specify -ownerpwd so that this parameter is effective. |
||||||||||
-ncc * |
Prohibits copying the content of the PDF file.
It is necessary to specify -ownerpwd so that this parameter is effective. |
||||||||||
-nca * |
Prohibits adding comments and form fields to the PDF file.
It is necessary to specify -ownerpwd so that this parameter is effective. |
||||||||||
-nff * |
Prohibits filling in of form fields and signing of the PDF file.
Ignored when you specify PDF1.3 or -encrypt 40rc4.
In order to make this parameter effective, other parameter settings may be required. For more details, see also PDF Reference. |
||||||||||
-nab * |
Prohibits text access for screen reader devices of the PDF file.
Ignored when you specify PDF1.3 or -encrypt 40rc4. It is necessary to specify -ncg so that this parameter is effective. |
||||||||||
-nad * |
Prohibits inserting, deleting and rotating the PDF pages.
Ignored when you specify PDF1.3 or -encrypt 40rc4. It is necessary to specify -ncg so that this parameter is effective. |
||||||||||
-ppa Value |
Specifies whether to permit printing of the created PDF with one of the following values:
|
||||||||||
-peb Value |
Specifies whether to embed the embeddable fonts in PDF or not with one of the following values:
|
||||||||||
-pee Fontname | Embeds the specified font in the PDF. If you want to specify multiple fonts, put commas between the fonts. | ||||||||||
-pef * | An error is not issued when font embedding fails. | ||||||||||
-peg * | An error is not issued when glyphs are missing. | ||||||||||
-pex * | An error is not issued when PDF/A is generating. | ||||||||||
-picc Value |
Selects how to compress the color images embedded in PDF.
|
||||||||||
-picg Value |
Selects how to compress the grayscale images embedded in PDF.
|
||||||||||
-picm Value |
Selects how to compress the monochrome images embedded in PDF.
|
||||||||||
-pidc Value |
Selects how to downsample the raster color images embedded in a PDF with the following values:
|
||||||||||
-pidca dpi | |||||||||||
-pidct dpi | |||||||||||
-pidg Value |
Selects how to downsample the raster grayscale images embedded in PDF using the following values:
|
||||||||||
-pidga dpi | |||||||||||
-pidgt dpi | |||||||||||
-pidm Value |
Selects how to downsample the raster monochrome images embedded in PDF using the following values:
|
||||||||||
-pidma dpi | |||||||||||
-pidmt dpi | |||||||||||
-pjq Percent | Specifies the quality of the raster graphics when specified JPEG format by -picc or -picg using the range of 1 to 100(%). A higher % increases the image quality. However the file size also becomes larger. The initial value is 80. | ||||||||||
-pcs * | Specifies not to compress text and line art in the PDF. | ||||||||||
-pos * | Compresses objects in PDF. The setting is invalid when -pcs is specified. | ||||||||||
-plr * | Specifies whether the external link specified by the relative address is transformed into “Open the file” or into “World Wide Web link” in the PDF link properties. When -plr is specified, it is transformed to “World Wide Web link”. When -noplr is specified, it is transformed to “Open the file”. If the document is designed to be viewed on a browser then it is suggested to use the world wide web -plr as the default setting. | ||||||||||
-prc Value |
Specifies how to convert the RGB color space (DeviceRGB) to DeviceGray.
|
||||||||||
-prr dpi | Specifies the resolution value of the transformed raster images from 70 to 500(dpi). This parameter is effective only with Windows versions and should be set with consideration of whether better image quality or file size is more important. | ||||||||||
-pdfscale scale | Specifies the scaling ratio of the PDF to output. A value without a unit or % value can be specified as a scale (1.0 = 100%). When -pdfwidth is specified after -pdfscale, -pdfscale will take priority. The same applies to -pdfheight. | ||||||||||
-pdfheight length | Scales the output height of PDF. Height values can be specified as a unit or a % value. | ||||||||||
-pdfwidth length | Scales the output width of PDF. Width values can be specified as a unit or a % value. |
Parameter | Functions | ||||||||
---|---|---|---|---|---|---|---|---|---|
-svgver Profile |
Specifies the SVG profile:
|
||||||||
-svgip Method |
Specifies how to treat images within the SVG file.
|
||||||||
-svgicp Directory | Specifies the destination for images when “1” is selected for the -svgip parameter. (Outputs the image as an external file.) When a relative path is used to specify the Directory, the path will be relative to the output path specified with -o. When -o is the standard output, an error will occur if the relative path is specified. Then it is necessary to specify an absolute path. | ||||||||
-svgcicp * | When images are copied and processed in the directory specified by -svgicp, creates the directory if the specified copy destination directory does not exist. | ||||||||
-svgiren * | Specifies whether to rename all file names to the prefix specified by -svgiprfx, or to use the original name when images are copied to the directory specified by -svgicp. When the file name is duplicated, a sequential number is added. When -svgiren is specified, all files are renamed. | ||||||||
-svgiprfx Prefix | When images are copied to the directory specified by -svgicp, specifies the prefix of the file name. The file name will be prefixed followed by sequence number. When it is not specified, they are only sequential numbers. | ||||||||
-svggzip * | Outputs SVG compressed in gzip. | ||||||||
-svgsingle * | A document composed of multiple pages is outputted as a single SVG file. | ||||||||
-svgfmt Format | When the original document has multiple pages and -svgsingle parameter is not specified, each page will be output as an SVG files that has a consecutive number at the end of the file name. This parameter specifies the format of those consecutive numbers. For example, when “document.svg” is specified as the name for the output file, by specifying “-01” for -svgfmt parameter the output files will be document-01.svg, document-02.svg and so on. If this parameter is omitted, “1” is considered to be specified. | ||||||||
-svgspn * | When -svgsingle is not specified and the output SVG has only one-page, the sequential number specified by -svgfmt is not added. | ||||||||
-svgea * | Embeds all fonts that can be embedded in the SVG. | ||||||||
-svgee Font-Name | Embeds the specified font in SVG. If you want to specify multiple fonts, put commas between fonts. | ||||||||
-svgef * | An error is not issued when font embedding fails. | ||||||||
-svgic Value |
Selects how to convert the raster images which may not be directly embedded in the SVG.
|
||||||||
-svgjq Percent | Specifies the quality of the raster graphics with the range of 1 to 100(%) when JPEG format is specified to -svgic. The quality becomes higher in proportion to the increase in the number, however the file size also becomes larger. The initial value is 80. | ||||||||
-svgrr dpi | Specifies the rasterize-resolution value of the transformed raster images from 70 to 500(dpi). This parameter is effective only with Windows versions. | ||||||||
-svgidpi dpi | Specifies the resolution of the down sampling when embedding an image with 1 or more integers. When the resolution of the original image is lower than specification, it's embedded with the lower resolution. | ||||||||
-svgidm method | Specifies the method of compression when down sampled.
|
||||||||
-svgpmax pages | Specifies the maximum number of pages outputted when -svgsingle is specified. If this parameter is omitted, "5000" is considered to be specified. When either -svgpmax or -svghmax is specified, (or both are specified), and the page exceeds either the maximum size (-svghmax) or the maximum number of pages (-svgpmax), Office Server Document Converter V10.0 will stop converting and abort the job as an error. |
||||||||
-svghmax Value | Specifies the maximum value of the height when assigning two or more pages to a single page when -svgsingle is specified. A unit must be given and specified. When either -svgpmax or -svghmax is specified, (or both are specified), and the page number exceeds either the maximum size (-svghmax) or the maximum number of pages (-svgpmax), Office Server Document Converter V10.0 will stop converting and abort the job as an error. If this parameter is omitted, there is no limitation in height. |
Parameter | Functions | ||||||
---|---|---|---|---|---|---|---|
-inxomode Value |
Specifies the INX output mode in INX Output
|
Parameter | Functions |
---|---|
-flashpartial * | When an error occurs within the document, the flash file in process will be outputted. |
-flashhidebutton | The buttom to navigate to the previous/next page is not displayed when outputting the flash file. |
-flashsplit | Outputs Flash file per page and saves as every single file. |
-noflashputact | Do not output features of ActionScript1.0, such as stop action per page, the page navigation button, linking, etc. |
-flashimgmax pixel | Specifies the number of maximum pixels of images outputted to the Flash file by the integral value. When the width or the height of the output image exceeds the specified value, it is reduced to the specified value when outputting the flash file. When this parameter is omitted, 1000 is applied. The image size that can be embedded in Flash is limited to the value of width x height with 2 raised to the 24th power (16,777,216) by the number of pixels. Note that when embedded image exceeds this size, it may not be displayed with Flash Player. |
Parameter | Functions | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-rasdpi value |
Specifies the image size by a numerical value from 1 to 1,440(dpi) when outputting image. When the value of this parameter is outside the range or it is omitted, a DPI value specified by the font size in the image is applied in Windows version. In Linux version, the default value is 96. The maximum image size available to output depends on system resources such as free available memory, etc. |
||||||||||||||
-rasscale value | When Image are output, the reduction ratio is specified by a numerical value greater than 0 but equal to or less than 1. It can also be specified by % or px (pixel) value. When the value of this parameter is outside the range or it is omitted, the default is 1. | ||||||||||||||
-rasheight value | Sets the maximum image height decided by rasscale when outputting Image. "px" (pixel) is available as the unit. | ||||||||||||||
-rasfmt format | When Image are output, if the original document has multiple pages, multiple image files will be output with sequential numbers at the end of the file name. This parameter specifies the format of those sequential numbers. For example, when "document.png" is specified as the name for the output file, by specifying "-01" for -rasfmt the output files will be document-01.png, document-02.png and so on. If this parameter is omitted, the default is "1". | ||||||||||||||
-rasgdi+ | GdiPlus is used when the file is converted to Image. This setting is effective only with Windows 7 or later / Windows Server 2008 or later. | ||||||||||||||
-rasjq val | Specifies the conversion accuracy by value within a range of 1 to 100(%). When this parameter is omitted, the default is 80%. | ||||||||||||||
-rasmono | Outputs two colors, black and white binary images. The output in this format is only available for the Windows version. | ||||||||||||||
-rasgray | Outputs grayscale 256 tones. | ||||||||||||||
-ras256 | Outputs 256 colors. The output in this format is only available for the Windows version. | ||||||||||||||
-rascomp Compression method |
Specifies the compression method when outputting TIFF / MTIFF.
|
||||||||||||||
-rasrgb "input RGB profile" | Specifies an ICC profile for input/output with the full path when outputting CMYK TIFF. The ICC profile for input is specified to -rasrgb, the color profile for output is specified to -rascmyk. When these parameters are omitted, the ICC profile based on the calculation value is applied. | ||||||||||||||
-rascmyk "output CMYK profile" |
Parameter | Functions |
---|---|
-pdfannot | Specifies whether to output PDF Annotation. Effective when inputting from PDF. |
Parameter | Functions |
---|---|
-docpagenumbercorrection | Page numbers in a table of contents are adjusted and rewritten based on the formatting result. In addition, the total number of pages displayed by inserting the page number will be rewritten to the total number of pages displayed after the formatting being finished. |
Parameter | Functions | ||||
---|---|---|---|---|---|
-docpdfbookmarklevel value |
Specifies whether Word outline level is reflected on PDF bookmark hierarchy.
|
||||
-docnonoutline | Word outline is not output as bookmark. |
Parameter | Functions |
---|---|
-doctrackchange | Outputs the Word Track Changes. Text attributes, colors, etc. of the changed part can be specified with Option Setting File. |
Parameter | Functions |
---|---|
-xlscontinuepagenumber | In header/footer, page numbers are made consecutive numbers with all the sheets, the number of pages is made sum total of all the sheets. |
Parameter | Functions |
---|---|
-xlssheetorderselect Sheet Number | The specified sheets are outputted in order. Sheet numbers can be specified by numerical values separated by commas [,] or by ranges [-] in order. Numerical values for sheets currently displayed in Excel can be specified, and hidden sheets are not counted. If there is no specified sheet, the setting is ignored. It's possible to coexist with the below-mentioned xlssheetorderactivefirst. when xlssheetorderactivefirst is specified, the specified sheet will be outputted following to the specified sheets by xlssheetorderactivefirst. Even if the specified value has the same value in xlssheetorderactivefirst, it is outputted as specified. |
-xlssheetorderactivefirst | The active sheet will be outputted fisrt, then the other sheets will be outputted in order by skipping the active sheet. |
-xlsselectedsheet | The only selected sheet in Excel will be outputted. It can be coexisted with xlssheetorderselect and xlssheetorderactivefirst. In the case of coexisting, xlssheetorderselect and xlssheetorderactivefirst will be applied first, then among the output target sheets, the selected sheet on Excel will be outputted. |
Parameter | Functions |
---|---|
-xlsoutputarea outputarea | Outputs the specified cell area. Cell area is specified by a string in the format of "sheet-name!cell-area". Separates the sheet name and the cell area with "!". Cell area is specified in the format of "column-name_row-number:column-name_row-number" similar to Excel's cell area specification. If there is no sheet specified, it is ignored. If xlssheetorderactivefirst, xlssheetorder or xlssheetselected are specified, they are disabled and this option is enabled. |
Parameter | Functions | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-locale locale character string | The locale used for Excel conversion can be specified by the character string code. If you do not specify this parameter, the locale of the system is used. When there is no associated locale, en-US is considered to be specified.
The supported locales are as follows:
|
Parameter | Functions |
---|---|
-xlsrowcolcontrol parameter | Specifies the parameter value by a character string directly. Parameter value character string "row,col" Specifies the value to adjust the line height and column width by the % value. Comma-delimited numbers with % can be specified in order of the line height and the column width. If this option is specfied, the setting of -xlsrowcolcontrolfile will be ignored. Example : line height 105.5% column width 95% -xlsrowcolcontrol "105.5%,95%" |
-xlsrowcolcontrolfile filename | Specifies a combination of a key and a parameter in XML file. Multiple combinations of a key and a parameter can be written in XML file. If the -xlsrowcolcontrol option is specified, the priority is given to its option. |
-xlsinfoview | The default font name, font size and the printer name of an input file can be acquired as the error information, which is set as INFO (information) error level. When specifying it simultaneously with -xlsrowcolcontrolfile, if the keys match, the parameter can be acquired, if they don't, the message will be acquired.
|
Parameter | Functions |
---|---|
-xlspaper parameter |
Specifies the paper settings. Comma-delimited parameter values can be described and interpreted in order from the beginning. (e.g. "A4, portrait"). 4 elements of paper size, orientation, margins and scaling can be specified. For more details, see also Excel function for paper setting. xlspaper and xlspaperdefault can be specified at the same time, the value of each element is determined in the following order of priority. xlspaper setting -> the valued saved in the Excel file -> xlspaperdefault setting -> the default value embedded in the program |
-xlspaperdefault parameter |
Specifies the default value used when the paper setting is not saved in the Excel file. The available elements are the same as xlspaper.
For more details, see also Excel function for paper setting. xlspaper and xlspaperdefault can be specified at the same time, the value of each element is determined in the following order of priority. xlspaper setting -> the valued saved in the Excel file -> xlspaperdefault setting -> the default value embedded in the program |
Parameter | Functions |
---|---|
-multivol | Separates the PDF file in spreadsheet unit when converting an Excel file to PDF. With this parameter, the -start/-end parameters are specified in separate-volume units. |
-pdffmt string format | Specifies the format of the serial number added to the end of the file name as a string when separating PDF file in spreadsheet unit. For example, if the output file name is workbook.pdf and if you specify "-01", it will be workbook-01.pdf, workbook-02.pdf, and so on. The default value is "1". |
Parameter | Functions |
---|---|
-pptnotes | Converts PowerPoint notes. |
Parameter | Functions |
---|---|
-openpwd Password | It's possble to cancel the password protection set to Word/Excel/Powerpoint (doc/xls/ppt/docx/xlsx/pptx) created in MS Office 97-2021 and PDF Document. Supported by Microsoft Office 2007/2010 encryption algorithms are SHA-1 hash and AES 128. Supported by Microsoft Office 2013/2016/2019/2021 encryption algorithms are SHA-512 hash and AES 128. |
Parameter | Functions |
---|---|
-textwidth Value -textheight Value |
Specifies the paper size when the text format is specified as input data. A unit of measure can be specified for the value. When a unit is not specified, the default unit is pt. |
-textmleft Value -textmtop Value -textmright Value -textmbottom Value |
Specifies the margin size when the text format is specified as input data. |
-textfname font | Specifies the font family name to output when the text format is specified as input data. |
-textfsize Value | Specifies the font size to output when the text format is specified as input data. |
-textpnum | Adds page numbers to the outputs when the text format is specified as input data. |
-textlnum | Adds line numbers to the outputs when the text format is specified as input data. |
-textloset Value | Specifies the distance from the line numbers to the text body when text format is specified as input data. |
-textlfmt format | Specifies the format of the added line numbers when the text format is specified as input data. |
☞ | When the original file is small, the encoding cannot be recognized and the program may fail to read the file. |
---|
Values can be added using one of the following units:
Representation | Meanings |
---|---|
cm | centimeter |
mm | millimeter. 1mm = 0.1cm |
in | inch. 1in = 2.54cm |
pt | point. 1pt = 1in/72 |
pc | pica. 1pc = 12pt |
jpt | 1jpt = 0.3514mm |
q | 1q = 0.25mm |
When executing with a Command-line Interface, if the conversion is successful, it finishes the process with the return value of 0. If the converting is not successful, the program finishes the process with a return value of 1. If the conversion is not performed by specifying -v, etc., the return value is 0.
The following parameter is effective only with Windows versions.
To send a file to a printer use a printer name from the Printers dialog in the Windows start menu or from Printers and Faxes in the Control Panel.
-p "Adobe PDF" -p "EPSON LP-2500"