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 Linux / Macintosh shell script.

Antenna House Formatter V7.4 can be executed from the Command-line Interface by:

  • Specifying an FO (XSL Formatting Objects) files to be formatted and the destination of the formatted file.
  • Specifying an XML and XSL file which automatically starts transformation with XSLT, then formatting and finally outputting.
  • As a filter that reads FO from standard in and writes PDF to standard out.

Executable File Name

The executable file names are as follows:

WindowsAHFCmd.exe
Linux / MacintoshAHFCmd

Environment Variables have to be set in order to execute these files. In Windows versions, these are automatically set by the installer. In non-Windows versions, they have to be set. See Environment Variables.

Running on Windows

To run the command-line program of Antenna House Formatter V7.4 Windows, enter the following command:

> cd [Install directory]
> AHFCmd -d samples\sample.fo -o \tmp\sample.pdf

If Antenna House Formatter V7.4 Windows is successfully installed, the following message will be displayed:

AHFCmd : Antenna House Formatter V7.4 XX Windows : 7.4.X.XXXX (XXXX-XX-XXTXX:XX:XX+09)
         Copyright (c) 1999-2024 Antenna House, Inc.
AHFCmd : Formatting finished normally.

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

Running from a Shell Script

In Antenna House Formatter V7.4 for non-Windows, 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 AHFCmd. This script sets the necessary environment variables in the shell, and runs AHFCmd. To run the command-line program of Antenna House Formatter V7.4 for non-Windows using this script, enter the following command from your terminal window:

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

If Antenna House Formatter V7.4 for non-Windows is successfully installed, the following message will be displayed, then you can get sample.pdf in /​tmp directory:

AHFCmd : Antenna House Formatter V7.4 XX Xxxxxx : 7.4.X.XXXX (XXXX-XX-XXTXX:XX:XX+09)
         Copyright (c) 1999-2024 Antenna House, Inc.
AHFCmd : Formatting finished normally.

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

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. For example, -nomultivol cancels to output PDF in separate volume.

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.

The default parameter can be specified with the environment variable. The setting with the environment variable is compensated before the parameter specified here and being evaluated. This feature does not function with Antenna House Formatter V7.4 Lite.

ParameterDefaultFunctions
-d Document Specifies the URI of the target XML/FO/HTML document to be formatted.
  • When -d @STDIN is specified, FO document is loaded from standard in. The document loaded from standard in is supposed to be an FO file.
If this parameter is omitted, a brief description of the Command-line interface parameters appear just like when -h is specified and processing stops without formatting.
-s Stylesheet Specifies the URI of the target XSL/CSS document. If the specified XML document is FO, or the XML file contains the processing instruction <?xml-stylesheet ...?> and the stylesheet is specified, or the specified document is HTML, there is no need to specify a stylesheet.
An XSLT Processor is necessary to use XSL stylesheets. In Windows versions, MSXML is used as the standard XSLT Processor. If you want to use another XSLT Processor or in non-Windows versions, you need to set which XSLT Processor you are going to use. Setting the XSLT Processor is performed by “Environment Variables” or “Option Setting File”.
If the specified document is CSS, it will be the last user stylesheet. It is applied posterior to the stylesheet added by -css and the Option Setting File specified by -i.
-f Formatter-Type AUTO Specifies the formatter type from the following:
  • AUTO
  • HTML
  • XHTML
  • XMLCSS
  • XSLFO
If this parameter is omitted or invalid, it is considered AUTO.
-css User-Stylesheet Specifies the CSS user stylesheet you want to add. -css can be specified any number of times. It is applied by specified order prior to the stylesheet specified by -s.
-htmlcs Default-HTML-Charset UTF-8Specifies the default encoding of HTML. This setting is applied to HTML whose encoding is unknown. If this parameter is omitted, UTF-8 is considered default.
-o Output-File @STDOUT 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 formatted result will be stored in the file using the printer driver.
  • When -p @PDF or -p @TEXT or etc. is specified, the resulting PDF or text will be stored in the file specified by this 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 Antenna House Formatter V7.4 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.
-ixImports AHFSettings.xml (AHFSettings(x86).xml for Windows x86 version) in the application data directory indicated as the environment variable APPDATA as the Option Setting File. This parameter is equivalent to
-i "[APPDATA]\​AntennaHouse\​Antenna House Formatter\​7.4\​AHFSettings.xml"
or
-i "[APPDATA]\​AntennaHouse\​Antenna House Formatter\​7.4\​AHFSettings(x86).xml"
Effective only with Windows versions.
-p Printer-Name @PDF Specifies the printer name where the formatted result is outputted If this parameter is omitted, -p @PDF is automatically specified.
  • When -p @STDPRN is specified, the standard printer is used.
  • When -p @PDF is specified, the formatted result is output as PDF.  PDF Output
  • When -p @SVG is specified, the formatted result is output as SVG.  SVG Output
  • When -p @PS is specified, the formatted result is output as PostScript.  PostScript® Output
  • When -p @XPS is specified, the formatted result is output as XPS.  XPS Output
  • When -p @DOCX is specified, the formatted result is output as Word(docx). no-LT  Word(docx) Output
  • When -p @TEXT is specified, the formatted result will be outputted to the file as text format. no-LT  TEXT Output
  • When -p @AreaTree is specified, the AreaTree will be outputted. no-LT
  • when -p @CSSDebugTree is specified, CSS Debug Tree will be outputted. V7.4 no-LT
In non-Windows versions, only the above printer names can be specified except @STDPRN. For printer names other than those listed above, see "Printer Name".
@DOCX, @TEXT, @AreaTree and @CSSDebugTree are not effective with Antenna House Formatter V7.4 Lite.
-start Start-Page1Specifies 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. When -multivol parameter is specified, the value does not mean the page number but the separate volume number. For example -start 3 outputs the third separate volume.
-end End-Page0
-page string Specifies the page to output as follows:
  • 3 : Outputs 3 pages.
  • 3- : Outputs the 3rd page onwards.
  • 3-7 : Outputs pages 3-7.
  • -7 : Outputs pages 1-7.
You can specify any number of these settings by separating them with commas, such as 3-7,15,30-. If -start -end are specified, the page range is output accordingly. If neither -start -end -page is specified, all pages are output. -page is invalid for separate volume output.
-addbp [Number-Pages] * Outputs a blank page at the end of the output. A blank page is the same size as the last output page. You can also specify how many pages to output like -addbp 2. It is invalid for separate volume output. no-LT
-2pass *When formatting a huge document with a large amount of unresolved <fo:page-number-citation>, a large amount of memories are consumed because the cancellation of the page information is impossible. Therefore, the limit is caused in the number of pages to format. This parameter solves that problem by making the formatting two passes. Although its processing time may be increased, only the page number information which should be solved will consume the memory and the memory consumption will be extremely decreased. See “Formatting Large Document”. This setting is invalid with CSS formatting. no-LT
-dpw Length210mmSpecifies the default page width with a numerical value and its unit.
-dph Length297mmSpecifies the default page height with a numerical value and its unit.
-base BaseURISpecifies the default base URI.
-hypdic DirectorySpecifies the directory where the hyphenation dictionary exists.
-msxmlver version6Specifies the maximum version of MSXML used internally when msxml="true" is specified. Any version from 6 to 3 can be specified. For example, when 5 is specified, Antenna House Formatter V7.4 searches MSXML in order of MSXML5 → MSXML4 → MSXML3 and adopts the first found MSXML. If nothing is specified or the specified value is outside the range, the version will be considered 6. This setting is effective only with Windows versions.
-param name=value Specifies the parameter name and the value of xsl:param used with the XSLT transformation. If the value contains a white space, specify “name=value”. -param can be specified multiply.
-fontalias name=substname Specifies font substitutions. If the option -fontalias A=B is specified, all of font family-name A in the FO 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.
-afc *Specifies whether the use of <axf:formatter-config> is permitted. It's permitted by default. When -noafc is specified, <axf:formatter-config> will be ignored. no-LT
-x Error-Level 2 Permits setting the error level at which Antenna House Formatter V7.4 will stop formatting and abort the job.
  1. Information
  2. Warning
  3. Recoverable Error
  4. Fatal Error
If a fatal error occurs, the formatting process will always be aborted.
-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.
-xmlerr *Outputs error messages in XML format. The namespace URL is http://www.antennahouse.com/names/Error. The output XML is as simple as follows:
<!ELEMENT errors (error|info)*>
<!ATTLIST errors application CDATA #IMPLIED>
<!ATTLIST errors version     CDATA #IMPLIED>
<!ATTLIST errors copyright   CDATA #IMPLIED>
<!ELEMENT error #PCDATA>
<!ATTLIST error level  CDATA #REQUIRED>
<!ATTLIST error code   CDATA #REQUIRED>
<!ATTLIST error line   CDATA #IMPLIED>
<!ATTLIST error column CDATA #IMPLIED>
<!ATTLIST error source CDATA #IMPLIED>
<!ELEMENT info  #PCDATA>
no-LT
-analyze *Analyzes the area tree for stylistic problems, such consecutive lines that all end with the same word. Requires “-p @AreaTree”. Settings for automated analysis of the area tree are performed in the Option Setting File. For more details about the operation, see Automated Analysis. no-LT
-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.

Parameters for Printer

ParameterDefaultFunctions
-ps Printer-Setting-File Specifies the path name of the Printer Setting file. See “Printer Setting File”.
-copies Copies1Specifies 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.
-gdismooth Value 0Specifies whether anti-aliasing is performed or not when printing. The sum of the following values can be specified:
  1. Text
  2. Line-Art
  3. Image

Parameters for PDF Output

ParameterDefaultFunctions
-pdfver Version PDF1.5Specifies the PDF version from the following:
  • PDF1.3
  • PDF1.4
  • PDF1.5
  • PDF1.6
  • PDF1.7
  • PDF2.0
  • PDF/X-1a:2001 no-LT
  • PDF/X-3:2002 no-LT
  • PDF/X-1a:2003 no-LT
  • PDF/X-2:2003 no-LT
  • PDF/X-3:2003 no-LT
  • PDF/X-4:2010 no-LT
  • PDF/X-4p:2010 no-LT
  • PDF/A-1a:2005 no-LT
  • PDF/A-1b:2005 no-LT
  • PDF1.4/A-2a:2011 no-LT
  • PDF1.5/A-2a:2011 no-LT
  • PDF1.6/A-2a:2011 no-LT
  • PDF1.7/A-2a:2011 no-LT
  • PDF1.4/A-2b:2011 no-LT
  • PDF1.5/A-2b:2011 no-LT
  • PDF1.6/A-2b:2011 no-LT
  • PDF1.7/A-2b:2011 no-LT
  • PDF1.4/A-2u:2011 no-LT
  • PDF1.5/A-2u:2011 no-LT
  • PDF1.6/A-2u:2011 no-LT
  • PDF1.7/A-2u:2011 no-LT
  • PDF1.4/A-3a:2012 no-LT
  • PDF1.5/A-3a:2012 no-LT
  • PDF1.6/A-3a:2012 no-LT
  • PDF1.7/A-3a:2012 no-LT
  • PDF1.4/A-3b:2012 no-LT
  • PDF1.5/A-3b:2012 no-LT
  • PDF1.6/A-3b:2012 no-LT
  • PDF1.7/A-3b:2012 no-LT
  • PDF1.4/A-3u:2012 no-LT
  • PDF1.5/A-3u:2012 no-LT
  • PDF1.6/A-3u:2012 no-LT
  • PDF1.7/A-3u:2012 no-LT
  • PDF1.5/UA-1:2014 no-LT
  • PDF1.6/UA-1:2014 no-LT
  • PDF1.7/UA-1:2014 no-LT
Impossible to specify PDF/X, PDF/A or PDF/UA with Antenna House Formatter V7.4 Lite.
-tpdf *Generates Tagged PDF. Ignored if PDF cannot be tagged depending on the PDF versions. no-LT
-lpdf * Generates linearized PDF optimized for the display on the Web. no-LT
-prevp *Outputs pages in reverse order.
-multivol * Specifies to output PDF in separate volume. The error occurs when FO doesn't include the <axf:output-volume-info> extension element. When this parameter is specified, -start/-end can be specified as the unit of separate volume.
-encrypt Key-Length128rc4 Specifies the key length when encrypting the PDF file. The key length can be specified from the following:
  • 40rc4
  • 128rc4
  • 128aes
  • 256aes
When the specified key length is not applicable with the version of the created PDF, the key length is adjusted to be applicable one. 128aes is effective with PDF1.6 or later, 256aes is effective with PDF1.7 or later.
-nemd *Prevents metadata from being encrypted when encrypting a PDF to be created.
-userpwd Password Specifies the user password to be set for the PDF. Specify up to 32 ASCII characters for PDF1.3 to 1.7 and 127 ASCII characters for PDF2.0 or later.
-ownerpwd Password Specifies the owner password to be set for the PDF. Specify up to 32 ASCII characters for PDF1.3 to 1.7 and 127 ASCII characters for PDF2.0 or later.
-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 ISO 32000-1 or ISO 32000-2.
-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 Value2 Specifies whether to permit printing of the created PDF with one of the following values:
0.Not Allowed
1.Low Resolution Printing
2.High Resolution Printing
Use -npt when you specify PDF version 1.3 or -encrypt 40rc4. It is necessary to specify -ownerpwd so that this parameter is effective.
-peb Value1 Specifies whether to embed the 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.
-pesub Percent100%Embeds all fonts when the percent of characters used is greater than or equal to specified value, subsets embedded fonts when the percent of characters used is less than the specified value. The value without unit or % value can be specified (1.0 = 100%). If nothing is specified, it is considered 100% and embedded fonts are always subset.
-pef * An error is not issued when font embedding fails.
-peg * An error is not issued when glyphs are missing.
-pex * Prevents PDF/X, PDF/A and PDF/UA outputs from being cancelled even when an error occurs while outputting them. no-LT
-pt Valueall Specifies whether to embed the image in PDF as is (pass-through). If both pass-through and downsampling are specified, downsampling will precede pass-through. This does not apply when it is not possible to embed the image as is for a certain reason. The following strings can be enumerated by separating with a white space to specify the image type.
  • all
  • gif
  • tiff
  • png
  • jpeg
  • jpeg2000
  • jbig2
  • none
Excludes an image type by placing a hyphen “-” before the image type. For instance, when specifying “all -gif”, only GIF can be excluded. no-LT
-picc Value0 Selects how to compress the color images embedded in PDF.
0.Auto
1.JPEG compression
2.ZLIB compression
3.JPEG 2000 compression
4.Keep LZW
This parameter is effective with images that cannot be directly embedded into a PDF or -pidc value is not 0. JPEG 2000 is effective only with PDF1.5 or later.
-picg Value0 Selects how to compress the grayscale images embedded in PDF.
0.Auto
1.JPEG compression
2.ZLIB compression
3.JPEG 2000 compression
4.Keep LZW
This parameter is effective with images that cannot be directly embedded into a PDF or -pidg value is not 0. JPEG 2000 is effective only with PDF1.5 or later.
-picm Value1 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 with images that cannot be directly embedded into a PDF or -pidm value is not 0.
-pidc Value0 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.
-pidca dpi450
-pidct dpi300
-pidg Value0 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.
-pidga dpi450
-pidgt dpi300
-pidm Value0 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 greater than the -pidma dpi will be downsampled to the -pidmt dpi resolution.
-pidma dpi1800
-pidmt dpi1200
-pjq Percent80 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 local file 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 Value0 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
-pcics *Converts RGB images automatically into CMYK when outputting PDF/X and PDF/A. no-LT
-prr dpi108 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.
-p3da *Imports 3D object. no-LT
-psbkm *Suppresses the output of the bookmark. no-LT
-pdfscale scale100%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 length100%Scales the output height of PDF. Height values can be specified as a unit or a % value.
-pdfwidth length100%Scales the output width of PDF. Width values can be specified as a unit or a % value.
-createdate date Specifies /CreationDate, /ModDate in PDF. See also createdate, modifydate in <axf:document-info> for the default and specifiable dates. This setting overrides the setting of <axf:document-info>.
-modifydate date

Parameters for SVG Output

ParameterDefaultFunctions
-svgver ProfileSVG2.0 Specifies the SVG profile:
  • SVG2.0 (default)
  • SVG1.1
  • SVGBasic
  • SVGTiny
If this parameter is omitted, SVG 2.0 is outputted.
-svgip Method 0 Specifies how to treat images within the SVG file.
0.Embeds all image files.
1. Copies all image files to the destination that is specified by -svgicp, and then links.
2. Links images that can be linked and embeds images that have to be embedded. Raster images other than JPEG and PNG are always embedded.
3. Copies images that have been linked to the destination that is specified by -svgicp and links.
If this parameter is omitted, it is considered 0 and all images are embedded. For more details about the operation, see Image Output in SVG Output.
-svgicp Directory Specifies the destination for images when “1” or “3” 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. V7.4
-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 1 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.
-svgic Value0 Selects how to convert the raster images which may not be directly embedded in the SVG.
0.Auto
1.JPEG conversion
2.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. See Image Output in SVG Output for information on embeddable images.
-svgjq Percent80 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 dpi108 Specifies the rasterize-resolution value of the transformed raster images from 70 to 500(dpi). This parameter is effective only with Windows versions.

Parameters for TEXT Output

ParameterDefaultFunctions
-tenc EncodingUTF-8Specifies the encoding for TEXT Output. If this parameter is omitted, UTF-8 is adopted. For more details, see also TEXT Output Setting.
-teol EOL-markCRLF or LFSpecifies the end-of-line code for TEXT Output. If this parameter is omitted, CRLF is adopted in Windows versions, and LF is adopted in non-Windows versions. See also TEXT Output Setting for more detail.

Text Output cannot be performed with Antenna House Formatter V7.4 Lite.

Values can be added using one of the following units:

RepresentationMeanings
cmcentimeter
mmmillimeter. 1mm = 0.1cm
ininch. 1in = 2.54cm
ptpoint. 1pt = 1in/72
pcpica. 1pc = 12pt
jpt1jpt = 0.3514mm
q1q = 0.25mm

The following sample illustrates formatting sample.xml using XSL stylesheet sample.xsl and outputting the formatted result to sample.pdf.

AHFCmd -d "sample.xml" -s "sample.xsl" -p @PDF -o "sample.pdf"

In order to use the stylesheet in a non-Windows environment, it's necessary to specify external XSLT processor in the Option Setting File using -i parameter.

The following sample illustrates how to load the Option Setting File options.xml, format sample.fo and send the formatted result to a printer.

AHFCmd -d "sample.fo" -i "option.xml" -p "Antenna House Print"

Return Value

When executing formatting with a Command-line Interface, if the formatting is successful, it finishes the process with the return value of 0. If the formatting is not successful, the program finishes the process with a return value of 1. If the formatting is not performed by specifying -v, etc., the return value is 0.

Printer Name

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 "Antenna House Print"

[Printer and FAX]

Printer Setting File

The following are effective only with Windows versions.

In the Windows environment, applications use the DEVMODE structure to exchange information about the printer settings. Also Windows printer drivers initialize themselves according to the information of the DEVMODE structure. Antenna House Formatter V7.4 provides AHFDev.exe as a utility to save the DEVMODE structure to a file.

AHFDev.exe can be downloaded in 32-bit or 64-bit versions. After downloading, unzip the ZIP and get AHFDev.exe. AHFDev.exe is an executable file. It can be executed anywhere.

When this program is run, the “Print Setup” dialog will be displayed. You can choose printers from “Name” combo box or you can set various printer properties by clicking the “Properties” button. After you set up printer properties, click “save” button, the “Save As” dialog will be displayed. Specify a file name to save the print setup to. This will then modify DEVMODE structure as a “data file that records printer setup”. You can specify this file name for the PrinterSetting property of the .NET/COM Interface or -ps Parameter of the command line interface or other interfaces. To quit this application, click “close” button.

[PrinterSetting dialog]

When a printer setting file is specified, a document is printed unless -p option is specified. The following shows how it operates.

  • AHFCmd -p printer-name -ps setting-file -d ...

    Prints a document by applying DEVMODE specified in the setting-file to the printer-name.

  • AHFCmd -p @PDF -ps setting-file -d ...

    Outputs a document to PDF disregarding the -ps option.

  • AHFCmd -ps setting-file -d ...

    Prints a document using the DEVMODE specified in the setting-file. If the printer-name is not specified in DEVMODE, the default printer is used.

When -collate or -copies is specified, the content of DEVMODE is overwritten.

Restrictions

See also Restrictions in Graphical User Interface to know more about restrictions on printing.