Command-line Interface

The Command-line Interface is provided as an executable file. You can call it from either a Windows batch file or a Solaris / Linux shell script.

Rainbow PDF Server Based Converter V3.0 can be executed from the Command-line Interface by:

Executable File Name

The executable file names are as follows:

WindowsSBCCmd.exe
Solaris / LinuxSBCCmd

Environment Variables have to be set in order to execute these files. In the Windows version these are automatically set by the installer. In the Solaris / Linux versions they have to be set. Please refer to Environment Variables.

Running Command-line program on Windows

To run the command-line program of Rainbow PDF Server Based Converter V3.0 for Windows, enter the following command.

> cd [Install directory]
> SBCCmd -d samples\sample.doc -o \tmp\sample.pdf

If Rainbow PDF Server Based Converter V3.0 for Windows is successfully installed, the following message will be displayed.

SBCCmd : Server Based Converter V3.0 Copyright (c) 1999-2010 Antenna House, Inc.SBCCmd : Formatting finished normally.

Then you can view sample.pdf in the \tmp directory.

Running Command-line program from a shell script

In Rainbow PDF Server Based Converter V3.0 for Solaris / 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 Rainbow PDF Server Based Converter V3.0 for Solaris / Linux using this script, enter the following command from your terminal window.

$ cd [Install directory]
$ ./run.sh -d samples/sample.doc -o /tmp/sample.pdf

If Rainbow PDF Server Based Converter V3.0 for Solaris / Linux is successfully installed, the following message will be displayed. Then you can get sample.pdf in /tmp directory.

Server Based Converter V3.0 Copyright (c) 1999-2010 Antenna House, Inc.SBCCmd : Formatting finished normally.

The same parameters in the same formats apply to both SBCCmd and run.sh.

Command-line Parameters

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.
  • When -d @STDIN is specified, document is loaded from standard in.
If this parameter is omitted, the program will process standard in.
-o Output-File Specifies the path name of the resulting output file.
  • When -o @STDOUT is specified, the result is written to standard out.
  • If both the printer name and this property are specified, the printed result will be stored in the file using the printer driver.
  • When a setting other than printer is specified in a parameter, results will be stored in the file specified by this parameter in the format specified by -p parameter.
If this parameter is omitted, the result will be written to standard out.
-i Option-Setting-File Specifies the path name of "Option Setting File" which defines Rainbow PDF Server Based Converter V3.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, then the Command-line value takes precedence.
-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. With the Standard Flash version, if this parameter is omitted, -p @Flash is automatically specified.
  • When -p @STDPRN is specified, the standard printer is used.
  • When -p @PDF is specified, the converted result is output as PDF.
  • When -p @SVG is specified, the converted result is output as SVG.
  • When -p @INX is specified, the converted result is output as INX.
  • When -p @XPS is specified, the converted result is output as XPS.
  • When -p @Flash is specified, the converted result is output as Flash.
  • When -p @JPEG is specified, the converted result is output as JPEG.
  • When -p @PNG is specified, the converted result is output as PNG.
  • When -p @TIFF is specified, the converted result is output as TIFF.
  • When -p @MTIFF is specified, the converted result is output as multi-page TIFF.
A printer name can only be specified in the Windows version. Please refer to "How to specify the Printer Name".
Please refer to "PDF Output" for PDF output info.
Please refer to "SVG Output" for SVG output info.
Please refer to "INX Output" for INX output info.
Please refer to "XPS Output" for XPS output info.
Please refer to "Flash Output" for Flash output info.
JPEG output and PNG output and TIFF output are available only in the Windows version.
-start Start-Page
-end End-Page
Specifies the start page and the end page of output document. If the start page is omitted or the specified value is 0 or less, the start page is considered the first page. If the end page is omitted 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.
  • SBCCmd :FATAL: Error Level : 4
  • SBCCmd :FATAL: Error Code : 36865 (9001)
  • SBCCmd :FATAL: Parameter error : Must be Start page number <= End page number
-omitbp Effective only when the original file is MS Word or MS Excel. If the beginning of the document is an empty page, by specifying -omitbp parameter the blank page is skipped and content is then acquired from the next page found. Operation of this command with other formats is not guaranteed.
-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 Rainbow PDF Server Based Converter V3.0 will stop converting and abort the job.
  1. Information
  2. Warning
  3. Recoverable Error
  4. Fatal Error
The default value is 2. Thus if an error occurs at the "warning" level or higher, the conversion process will be aborted. If a fatal error occurs, the conversion process will always be aborted.
-silent Suppresses the output of error information. Normally error information is sent to stdout or stderr.
-stdout Error information is sent to stdout only if this parameter is specified. It is outputted to stderr by default.
-stderr Error information is also sent to stderr if this parameter is specified. It is outputted to stderr by default.
-pgbar * Outputs the progress of the page generation to the console.
-v Shows the version, copyright and license information. Cannot be used with any other parameter.
-h or -? Displays a list of all the Command-line parameters.

Parameters for output processing

Parameter Functions
-gdismooth Value Performs the smoothing when printing and outputting images. Specifies the smoothing processing to text, borders and images separately.
1.Text
2.Border
4.Image
Add values when you specify the smoothing processing in combination. If the value is omitted, "7" (all of 3 values are added) is automatically specified. This parameter is effective only with Windows XP or later / Windows Server 2003 or later.

Parameters for Formatter Settings

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 watermark-text.
-wmarkweight fontweight Specifies the font weight to the character string which you set to watermark-text. 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 watermark-text.
-wmarkopacity Value Specifies the opacity to the character string which you set to watermark-text.

Parameters for Printer

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.

Parameters for PDF Output

Parameter Functions
-pdfver Version Specifies the PDF version from the following:
  • PDF1.3
  • PDF1.4 (default)
  • PDF1.5
  • PDF1.6
  • PDF1.7
If this parameter is omitted, PDF1.4 is outputted.
-encrypt Key-Length Specifies the key length when encrypting the PDF file. The key length can be specified as either 40 or 128 (bit). Ignored when you specify PDF 1.3.
-userpwd Password Specifies the user password required to open the PDF. The password must be less than 32 bytes.
-ownerpwd Password Specifies the owner password for PDF. The password must be within 32 bytes.
-npt * Prohibits printing the PDF file.
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 PDF 1.3. In order to make this parameter effective, other parameter settings may be required. See also the 'PDF Reference' from Adobe Systems Incorporated for more details.
-nab * Prohibits text access for screen reader devices of the PDF file. Ignored when you specify PDF 1.3.
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 PDF 1.3.
It is necessary to specify -ncg so that this parameter is effective.
-peb Value Specifies whether to embed the embeddable fonts in PDF or not with one of the following values.
0.Specified font
1.All fonts excluding Base14 font
2.All fonts including Base14 font
-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.
-ppa Value Specifies whether to permit printing of the created PDF with one of the following values. This parameter is effective only when you specify PDF version 1.4 or later.
0.Not Allowed
1.Low Resolution Printing
2.High Resolution Printing
-picc Value Selects how to compress the color images embedded in PDF.
0.Auto
1.JPEG compression
2.ZLIB compression
3.JPEG2000 compression
This parameter is effective for images that cannot be directly embedded into a PDF or -pidc value is not 0. JPEG2000 is effective only for PDF1.5 or later.
-picg Value Selects how to compress the grayscale images embedded in PDF.
0.Auto
1.JPEG compression
2.ZLIB compression
3.JPEG2000 compression
This parameter is effective for images that cannot be directly embedded into a PDF or -pidg value is not 0. JPEG2000 is effective only for PDF1.5 or later.
-picm Value Selects how to compress the monochrome images embedded in PDF.
0.None
1.CCITT Group4
2.CCITT Group3
3.Run Length compression
4.ZLIB compression
This parameter is effective for images that cannot be directly embedded into a PDF or -pidm value is not 0.
-pidc Value Selects how to downsample the raster color images embedded in a PDF with the following values.
0.None
1.Average
2.Bicubic
3.Subsampling
When -pidc value (other than 0) is specified, a color image that has a resolution greater than -pidca dpi will be downsampled to the -pidct dpi value. The default dpi of -pidca is 108, -pidct is 72.
-pidct dpi
-pidca dpi
-pidg Value Selects how to downsample the raster grayscale images embedded in PDF using the following values.
0.None
1.Average
2.Bicubic
3.Subsampling
When -pidg value (other than 0) is specified, a grayscale image with resolution greater than -pidga dpi will be downsampled to the -pidgt dpi resolution. The default dpi of -pidga is 108, -pidgt is 72.
-pidgt dpi
-pidga dpi
-pidm Value Selects how to downsample the raster monochrome images embedded in PDF using the following values.
0.None
1.Average
2.Bicubic
3.Subsampling
When -pidm value (other than 0) is specified, a monochrome image that has resolution larger than the -pidma dpi will be downsampled to the -pidmt dpi resolution. The default dpi of -pidma is 450, -pidmt is 300.
-pidmt dpi
-pidma dpi
-pjq Percent Specifies the quality of the raster graphics when specified JPEG format by -picc or -picg using the range of 1-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.
-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.
0.No Conversion
1.Black to DeviceGray
2.Gray to DeviceGray
3.All RGB to DeviceGray
4.All RGB to CMYK
-prr dpi Specifies the resolution value of the transformed raster images from 70 to 500(dpi). This parameter is available only in the Windows version and should be set with consideration of on 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.

Parameters for SVG Output

Parameter Functions
-svgver Profile Specifies the SVG profile:
  • SVG1.1 (default)
  • SVGBasic
  • SVGTiny
If this parameter is omitted, SVG1.1 is outputted.
-svgip Method Specifies how to treat images within the SVG file.
0.Embeds all image files.
1.Outputs the image as an external file.
If this parameter is omitted, it is considered as 0 and all images are embedded. Refer to Image Output in SVG Output for details of the operation.
-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.
-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 as 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.
0.Auto
1.JPEG conversion
2.PNG conversion
3.JPEG conversion (Also PNG conversion)
When Auto is selected, monochrome, grayscale or 256-or-less-color images are converted into PNG and the rest are converted into JPEG. When this parameter is omitted, the default is Auto. Refer to Image Output in SVG Output for information on embeddable images.
-svgjq Percent Specifies the quality of the raster graphics, when it is specified as JPEG for -svgic, using the range of 1-100(%). 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 rasterized-resolution value of the transformed raster images from 70 to 500(DPI). This parameter is available only in the Windows version.
-svgidpi dpi Specifies the resolution of the down sampling when embedding an image with1 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.
1.biliner
2.bicubic
3.nearest neighbor
If this parameter is omitted, "1" is considered as specified.
-svgpmax pages Specifies the maximum number of pages outputted when -svgsingle is specified. If this parameter is omitted, "5000" is considered as 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), Rainbow PDF Server Based Converter V2.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), Rainbow PDF Server Based Converter V2.0 will stop converting and abort the job as an error. If this parameter is omitted, there is no limitation in height.

Parameters for INX Output

Parameter Functions
-inxomode Value Specify the INX output mode in INX Output option
0.Text area output mode
1.Line area output mode
2.Block output mode
If this parameter is omitted, Text area output mode is adopted. Refer to INX Output Settings for details.

Parameters for Flash 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.

Parameters for Image Output

Parameter Functions
-rasdpi value Specifies the image size by a numerical value from 1-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. (Windows version)
The maximum image size available to output depends on the Windows 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 XP or later / Windows Server2003 or later.
-rasjq val Specifies the conversion accuracy by value within a range of 1-100(%). When this parameter is omitted, the default is 80%.
-rasmono This parameter is specified when the original file is monochrome. Using this setting can reduce memory consumption.

Parameters for Text Input

Parameter Functions
-textwidth Value
-textheight Value
Specifies the paper size 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. 1 mm = 1/10 cm
in inch. 1 in = 2.54 cm
pt point. 1 pt = 1/72 in
pc pica. 1 pc = 12 pt
jpt 1 jpt = 0.3514 mm
q 1 q = 0.25 mm

Return Value

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 because –v is not specified, the return value is 0.

How to specify the Printer Name

The followings parameter settings apply only to the Windows version.

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 "Acrobat Distiller"
-p "EPSON LP-2500"

[Printer and FAX]