.NET Interface

The .NET Interface makes it possible for AH Formatter V6.5 to function through .NET applications developed using Visual Basic.NET, Visual C#.NET and similar programs.

The .NET Interface has been tried and tested in the Microsoft .NET Framework 4.0 environments.

CAUTION:

You cannot have both AH Formatter V6.5 and another version of AH Formatter or XSL Formatter installed on your machine when the NET interface is used. It is necessary to uninstall one version, or only set the path of AH Formatter or XSL Formatter you want to use by deleting the unwanted path from the environment variables.
32-bit Windows version can be installed on Windows x64 Edition. In that case, please specify /platform:x86 when you use .NET interface.

Component Registration

AH Formatter .NET component is not registered automatically to the global assembly cache (GAC). It is necessary to create the path either by putting the .NET component in the current folder of the application, or by creating an application configuration file.

.NET Component File Name

for .NET Framework 4.0

XfoDotNet40Ctl65.dll

Please confirm the necessary redistributable package for .NET Framework at System Requirements.

Properties

Indicates the level of the error that occurred during the formatting process.

1.

Information

2.

Warning

3.

Recoverable Error

4.

Fatal Error

ErrorCode

Int32

R

Indicates the code of the exception error that occurred during the formatting process.
Zero means no error. Non-zero indicates any error occurred.

Message

String

R

Get the message of the exception error that occurred during the formatting process.

XfoObj Class includes the following properties.

Name

Type

R/W

Functions

Version

String

R

Get the version string of AH Formatter V6.5.

DocumentURI

String

R/W

Specifies the URI of the XML/FO/HTML documents you will format.

If DocumentURI is omitted or "@STDIN" is specified, XML documents are loaded from stdin.

The documents loaded from stdin are supposed to be FO files.

StylesheetURI

String

R/W

Specifies the URI of XSL/CSS stylesheets for formatting.
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.
If the specified document is CSS, it will be the last user stylesheet. It is applied posterior to the stylesheet added by AddUserStylesheetURI and the Option Setting File specified by AddOptionFileURI.

StylesheetTitle

String

R/W

Specify the title of the processing instruction of the preferred stylesheet <?xml-stylesheet title="..."?>.

FormatterType

Int32

R/W

Specify formatter type. Use one of the following values to specify the formatter type. If this parameter is omitted or invalid, it is considered as AUTO.

0.

AUTO

1.

HTML

2.

XHTML

3.

XML+CSS

4.

XSL-FO

HtmlDefaultCharset

String

R/W

Specifies the default encoding of HTML. This setting is applied to HTML whose encoding is unknown.

OptionFileURI

String

R/W

Specifies the URI of the XML-format Option Setting File which describes AH Formatter V6.5 options. The contents of the Option Setting File are evaluated immediately. When you set a property that is contrary to an already set property, the existing setting will be overwritten. URI added by AddOptionFileURI will be canceled.

Specifies the output file path of the formatted result.
When a printer is specified as an output format by PrinterName,
a printing result is saved to the specified file by the printer driver.
When an output format other than a printer is specified, it is saved as the specified file with the specified output format. When omitted, or when "@STDOUT" is specified, it goes to standard output.

OutputFOPath

String

R/W

Specifies the output FO (or HTML etc.) file as the result of XSLT when the input files are an XML document and XSL stylesheet.

If the input file is FO, no file is outputted.

When "@STDOUT" is specified, it is considered as stdout.

If the setting is omitted, nothing outputs.

ExternalXSLT

String

R/W

Command-line of External XSLT Processor. If this is omitted, default MSXML will be used. For example:

xslt %param -o %3 %1 %2

These meanings are as follows.

%1 : XML document

%2 : XSL stylesheet

%3 : XSLT output file

%param : xsl:param

%1 to %3 are used to express only parameter positions. Do not replace them with actual file names. In case you use XSL:param for external XSLT Processor, set the parameter in XSLTParamFormat and SetXSLTParam.

XSLTParamFormat

String

R/W

Specifies the parameter format of xsl:param when using External XSLT Processor. For example:

-p %p %v

These meanings are as follows.

%p : Parameter Name

%v : Parameter Value

BaseURI

String

R/W

Specifies the default base URI.

FormattedPages

Int32

R

Get the formatted total pages.

TwoPassFormatting

Boolean

R/W

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

MultiVolume

Boolean

R/W

Specifies to output PDF in separate volume. The error occurs when FO doesn't include the axf:output-volume-info extension property. When the value false is specified, the StartVolume/EndVolume parameter is invalid, instead the parameter StartPage/EndPage is effective. When the value 'true' is specified, the parameter StartPage/EndPage is invalid, instead the parameter StartVolume/EndVolumeis effective.
no-LT

StartVolumeEndVolume

Int32

R/W

Effective when MultiVolume=true is specified. Specifies the start and the end of separate volume to output. If the setting of start for separate volume is omitted or the value 'true' is less than or equal to 0, the start volume is accounted as the first volume. If the setting of start for separate volume is omitted or the value 'true' is greater than actual number of separate volume, the end volume is accounted as the last volume. If the setting is conflicted, an error occurs. (e.g. StartVolume=5 EndVolume=3)
no-LT

TotalVolumeCount

Int32

R

Gets the number of all the separate volumes when outputting PDF to multiple separate volumes.
no-LT

OutputVolumeCount

Int32

R

Gets the number of the actual separate volumes when outputting PDF to multiple separate volumes.
no-LT

StartPageEndPage

Int32

R/W

Specifies the start page or the end page of the 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 0, or the specified value exceeds the actual number of pages, the end page is considered as the last page. If the setting is inconsistent (for example, StartPage=5 EndPage=3), an error occurs.

ExitLevel

Int32

R/W

Specifies at which error level to abort the formatting process. AH Formatter V6.5 will stop formatting when the detected error level is equal to or higher than the ExitLevel property. The default value is 2 (Warning). Thus if a level 2 or higher error occurs and error level is 2 (Warning) or higher, the formatting process will be aborted. Acceptable values are from 1 to 4. When a value of 5 or higher is specified, it is considered to be a value of 4. If an error-level:4 (Fatal error) occurs, the formatting process will be aborted unconditionally.
The ExitLevel does not cause an error message to be displayed no matter what value may be specified for this property.

ErrorLevel

Int32

R

Indicates the error level that occurred during the formatting process.

1.

Information

2.

Warning

3.

Recoverable Error

4.

Fatal Error

ErrorCode

Int32

R

Indicates the code of the error that occurred during the formatting process.
Zero means no error. Non-zero indicates an error occurred.

ErrorMessage

String

R

Indicates the Error Messages of the error that occurred during the formatting process.

ErrorStreamType

Int32

R/W

Outputs the Error Messages to standard output or to standard error when the error level is less than the specified error level allowed while formatting. The error message is not outputted in default.

0.

Not output

1.

Standard output

2.

Standard error output

XmlDomDocument

System.Xml.XmlDocument

W

Specifies the target XML document by the System.Xml.XmlDocument class object.

XmlDomStylesheet

System.Xml.XmlDocument

W

Specifies the target XSL stylesheet by the System.Xml.XmlDocument class object.

Specifies the user password for PDF. The password must be 32 bytes or less.

PdfMasterPassword

String

W

Specifies the master password for PDF. The password must be 32 bytes or less.

PdfOwnerPassword

String

W

Specifies the owner password for PDF. The password must be 32 bytes or less.

PdfNoPrinting

Boolean

R/W

Prohibits printing the PDF file.
It is necessary to specify PdfOwnerPassword so that this parameter is effective.

PdfNoChanging

Boolean

R/W

Prohibits making changes to the PDF file.
It is necessary to specify PdfOwnerPassword so that this parameter is effective.

PdfNoContentCopying

Boolean

R/W

Prohibits copying the content of the PDF file.
It is necessary to specify PdfOwnerPassword so that this parameter is effective.

PdfNoAddingOrChangingComments

Boolean

R/W

Prohibits adding comments and form fields to the PDF file.
It is necessary to specify PdfOwnerPassword so that this parameter is effective.

PdfNoFillForm

Boolean

R/W

Prohibits filling in of form fields and signing of the PDF file. This parameter is effective only when you specify PDF1.4 or later.
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.

PdfNoAccessibility

Boolean

R/W

Prohibits text access for screen reader devices of the PDF file. This parameter is effective only when you specify PDF1.4 or later.

PdfNoAssembleDoc

Boolean

R/W

Prohibits inserting, deleting and rotating the PDF pages. This parameter is effective only when you specify PDF1.4 or later for the PdfVersion.

PdfEmbedAllFontsEx

Int32

R/W

Specifies whether or not to embed all embeddable fonts in the PDF output file.
However, even if embed all fonts is specified, fonts which restrict embedding or fonts are unable to be embedded to PDF will not be embedded.

0.

Specified font

1.

All fonts excluding Base14 font

2.

All fonts including Base14 font

PdfEmbedFonts

String

R/W

Embeds the specified font in the created PDF. To specify multiple fonts, put commas between each font.

PdfEmbedSubsetFontPercentage

Int32

R/W

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. If nothing is specified, it is considered as 100 and embedded fonts are always subset.

PdfErrorOnEmbedFault

Boolean

R/W

When true is specified, an error is issued when font embedding fails.

PdfErrorOnMissingGlyph

Boolean

R/W

When true is specified, an error is issued when there is a missing glyph.

PdfPrintingAllowed

Int32

R/W

Specifies whether and how to permit printing of the PDF. This parameter is effective only when you specify PDF1.4 or later.

0.

Not Allowed

1.

Low Resolution Printing

2.

High Resolution Printing

PdfImageCompression

Int32

R/W

When a color image format cannot be stored directly in the PDF, the image is stored after being transformed into a bitmap format that is compatible with PDF. Use one of the following values to specify the compression method of the data stored in a PDF file. When Auto is selected, the process is automatically done and creates the image data according to the setting of PdfJPEGQuality and PdfRasterizeResolution. Whichever has the smaller compressed size, JPEG or ZLIB, is selected. These are the settings for color images. Specify PdfGrayscaleImageCompression for grayscale images and PdfMonochromeImageCompression for monochrome images.

0.

Auto

1.

JPEG compression

2.

ZLIB compression

3.

JPEG2000 compression (it is effective only when PdfVersion is PDF1.5 or later)

4.

Keep LZW

PdfJPEGQuality

Int32

R/W

With color image formats that cannot be stored directly in a PDF, if JPEG compression is specified for PdfImageCompression the image quality can be specified with a numeric value of 1-100. Higher values are proportional to increased image quality. However the file size also becomes larger. This is the setting for color images. PdfGrayscaleJPEGQuality can also be specified for grayscale images.

CAUTION:

This is not for changing the quality of a JPEG formatted image.

PdfPutImageColorProfile

Boolean

R/W

Specifies whether to embed the ICC profile (of the embedded color image) in the PDF.

PdfImageDownSampling

Int32

R/W

Specifies one of the following methods to downsample the raster color image in a PDF. When a value other than None is specified, an image that has a resolution of greater than or equal to the one specified in PdfImageDownSamplingDPI will be downsampled to the resolution specified by PdfImageDownSamplingTarget.
These are the settings for color images. Specify PdfGrayscaleImageDownSampling for grayscale images, and PdfMonochromeImageDownSampling for monochrome images.

0.

None

1.

Average

2.

Bicubic

3.

Subsampling

PdfImageDownSamplingTarget

Int32

R/W

Sets the target resolution when a raster color image is downsampled.

PdfImageDownSamplingDPI

Int32

R/W

Sets the resolution for the downsampled raster color image.

PdfGrayscaleImageCompression

Int32

R/W

When a grayscale image format cannot be stored directly in the PDF, the image is transformed into a bitmap format that is compatible with PDF. Use one of the following values to specify the compression method of the data stored in a PDF file. When Auto is selected, the process is automatically done and creates the image data according to the setting of PdfGrayscaleJPEGQuality and PdfRasterizeResolution. Whichever has the smaller compressed size, JPEG or ZLIB, is selected. These are the settings for grayscale images. Specify PdfImageCompression for color images, and PdfMonochromeImageCompression for monochrome images.

0.

Auto

1.

JPEG compression

2.

ZLIB compression

3.

JPEG2000 compression (it is effective only when PdfVersion is PDF1.5 or later)

4.

Keep LZW

PdfGrayscaleJPEGQuality

Int32

R/W

For grayscale image formats that cannot be stored directly in the PDF, if JPEG compression is specified in PdfGrayscaleImageCompression the image quality can be specified by a numerical value of 1-100. Higher values are proportional to increased image quality, however the file size also becomes larger. Specify PdfJPEGQuality for color images.

CAUTION:

This is not for changing the quality of a JPEG formatted image.

PdfGrayscaleImageDownSampling

Int32

R/W

Specifies one of the following methods to downsample raster grayscale images in a PDF. When a value other than None is specified, an image that has a resolution of greater than or equal to the one specified in PdfGrayscaleImageDownSamplingDPI will be downsampled to the resolution specified by PdfGrayscaleImageDownSamplingTarget.
These are the settings for grayscale images. Specify PdfImageDownSampling for color images, and PdfMonochromeImageDownSampling for monochrome images.

0.

None

1.

Average

2.

Bicubic

3.

Subsampling

PdfGrayscaleImageDownSamplingTarget

Int32

R/W

Sets the target resolution when a raster grayscale image is downsampled.

PdfGrayscaleImageDownSamplingDPI

Int32

R/W

Sets the resolution for raster grayscale image.

PdfMonochromeImageCompression

Int32

R/W

When monochrome image formats cannot be stored directly in the PDF, the image is transformed and stored in a bitmap format compatible with PDF. Use one of the following values to specify the compression method of data stored in a PDF file. These are the settings for monochrome images. Specify PdfGrayscaleImageCompression for grayscale images, and PdfImageCompression for color images.

0.

CCITT Group4

1.

CCITT Group3

2.

Run Length compression

3.

ZLIB compression

4.

None

PdfMonochromeImageDownSampling

Int32

R/W

Specifies one of the following methods to downsample raster monochrome images in a PDF. When a value other than None is specified, an image that has a resolution of greater than or equal to the one specified in PdfMonochromeImageDownSamplingDPI will be downsampled into the resolution specified by PdfMonochromeImageDownSamplingTarget.
These are the settings for monochrome images. Specify PdfImageDownSampling for color images, and PdfGrayscaleImageDownSampling for grayscale images.

0.

None

1.

Average

2.

Bicubic

3.

Subsampling

PdfMonochromeImageDownSamplingTarget

Int32

R/W

Sets the target resolution when a raster monochrome image is downsampled.

PdfMonochromeImageDownSamplingDPI

Int32

R/W

Sets the resolution for the downsampled raster monochrome image.

PdfLinearize

Boolean

R/W

Specifies whether to output linearized PDF or not.
no-LT

PdfCompressContentStream

Boolean

R/W

Specifies whether the text and line art in a PDF are compressed in order to reduce the size of PDF.

PdfUseLaunchForRelativeURI

Boolean

R/W

Specifies whether external links specified by the local file are transformed into 'Open the file' or into a 'World Wide Web link' in the PDF link properties. If the value is set as true, it becomes 'Open the file'. If the value is false, it becomes 'World Wide Web link'

PdfRGBConversion

Int32

R/W

Specifies how to convert the RGB color space (DeviceRGB) to DeviceGray.

Specifies the rasterize-resolution value of the transformed raster images from 70 to 500(DPI). SVG, EMF and WMF are rendered in PDF as vectors without being changed to raster images.

PdfImport3DAnnotation

Boolean

R/W

Imports 3D object.
no-LT

PdfOutputScale

String

W

Specifies the scaling ratio of the output PDF. A unit or % value can be specified.

PdfOutputHeight

String

R/W

Scales the height of the output PDF. A unit or % value can be specified.

PdfOutputWidth

String

R/W

Scales the width of the output PDF. A unit or % value can be specified.

PdfErrorOnPDFXFault

Boolean

R/W

Prevents PDF/X, PDF/A and PDF/UA outputs from being cancelled even when an error occurs while outputting them.

Properties – SVG Settings

Name

Type

R/W

Functions

SvgVersion

Int32

R/W

Specifies the SVG version:

0.

SVG 1.1

1.

SVG Basic

2.

SVG Tiny

SvgImageProcessingType

Int32

R/W

Specifies how to treat images contained in the output SVG.

0.

Embeds all image files.

1.

Copies all image files to the destination specified by SvgImageCopyPath, 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 SvgImageCopyPath, and links.
The embedded image are embedded.

If this parameter is omitted, the default is 0 and all images are embedded.

SvgImageCopyPath

String

R/W

Specifies the destination for the copied images if 1 or 3is specified for SvgImageProcessingType.

SvgGzipCompression

Boolean

R/W

Specifies whether to compress the outputted SVG into gzip format.

SvgSingleFile

Boolean

R/W

Specifies whether a formatted result composed of multiple pages is output as a single SVG file or as multiple SVG files.
If the value is true, output is as a single SVG file. If the value is false, output is as multiple SVG files. When multiple files are output, the files are named as specified in SvgFormat. This takes effect only when outputting to a file and is not valid when output is without a file name such as when streaming.

SvgImageRename

Boolean

R/W

When images are copied to the directory specified by SvgImageCopyPath etc., specifies whether to rename all file names to the prefix specified in SvgImagePrefix, or use the original name. When the file name is duplicated, a sequential number is added. When true is specified, all files are renamed.

SvgImagePrefix

String

R/W

When images are copied to the directory specified by SvgImageCopyPath, specifies the prefix of the file name. The file name will be prefixed followed by a sequential numbers only if the Default is empty.

SvgSinglePageNumber

Boolean

R/W

When SvgSingleFile=false is specified, specifies whether to add sequential number to the output SVG even if it has only one-page. If false it is not added to the output SVG.

SvgFormat

String

R/W

When the original document has multiple pages and false is specified in SvgSingleFile, 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, by specifying "-01" for SvgFormat the output files will be document-01.svg, document-02.svg and so on.
If this parameter is omitted, "1" is considered to have been specified.

SvgImageConversion

Int32

R/W

Selects how to convert the images embedded in the output SVG to the following.

0.

Auto

1.

JPEG conversion

2.

PNG conversion

SvgJPEGQuality

Int32

R/W

For image formats which cannot be stored directly in SVG, if JPEG conversion is specified in SvgImageConversion, specifies the quality of the image from 1-100. Higher values are proportional to increased image quality, however the file size also increases. The initial value is set at 80.

SvgRasterizeResolution

Int32

R/W

Specifies the rasterize-resolution value of the raster image (Changed from a vector image) from 70 to 500(DPI). SVG, EMF and WMF are rendered in SVG as vectors without being changed to raster images.

SvgSingleFileMaxHeight

Int32

R/W

Specifies the maximum value of the height when assigning two or more pages to a single page when SvgSingleFile=true is specified. A unit must be assigned and specified. When SvgSingleFileMaxPages or SvgSingleFileMaxHeight is specified, (or both are specified), and the page exceeds either the maximum size (SvgSingleFileMaxHeight) or the maximum number of pages (SvgSingleFileMaxPages), AH Formatter V6.5 will stop converting and abort the job as an error. If this parameter is omitted, there is no limitation in the value of height.

SvgSingleFileMaxPages

Int32

R/W

Specifies the maximum number of pages outputted when SvgSingleFile=true is specified. If this parameter is omitted If this parameter is omitted, "5000" is considered as specified.
When either SvgSingleFileMaxPages or SvgSingleFileMaxHeight is specified, or both are specified, and the page exceeds either the maximum size (SvgSingleFileMaxHeight) or the maximum number of pages (SvgSingleFileMaxPages), AH Formatter V6.5 will stop converting and abort the job as an error.

SvgImageDownsamplingDPI

Int32

R/W

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.

SvgImageDownsamplingMethod

Int32

R/W

Specifies the method of compression when down sampled. If this parameter is omitted, "IMGDOWNSAMPLING_AVERAGE" is considered as specified.

1.

biliner

2.

bicubic

3.

nearest neighbor

Properties – INX Settings

Name

Type

R/W

Functions

InxOutputMode

Int32

R/W

Specifies the INX output mode.

0.

Text area output mode

1.

Line area output mode

2.

Block area output mode

Properties – MIF Settings

Name

Type

R/W

Functions

MifOutputMode

Int32

R/W

Specifies the MIF output mode.

0.

Text area output mode

1.

Line area output mode

2.

Block area output mode

MifIpMode

Int32

R/W

Specifies the MIF image processing mode.

0.

Embeds all images in MIF.

1.

Links images as external files.

Properties – Printer Settings

Name

Type

R/W

Functions

PrnCopies

Int32

R/W

Specifies the number of copies when outputting to a printer. If nothing is specified, the value is considered as 1.

PrnCollate

Boolean

R/W

Indicates collation of multiple copies when outputting to a printer. If it is not specified or the value 'false' is specified, the same page is multi-copied continuously.
If 'true' is specified, the pages specified from start to end are printed repeatedly.

BatchPrint

Boolean

R/W

When the value false is specified, the print dialog box is displayed when printing. If the setting is omitted or the value 'true' is specified, the print dialog is not displayed.

Properties – Smoothing Settings

Name

Type

R/W

Functions

GdiTextAntialias

Boolean

R/W

Performs the smoothing processing to text when true is specified.

GdiLineartSmoothing

Boolean

R/W

Performs the smoothing processing to borders when true is specified.

GdiImageSmoothing

Boolean

R/W

Performs the smoothing processing to images when true is specified.

Properties – Watermark-Text Settings

Name

Type

R/W

Functions

WatermarkText

String

R/W

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.

WatermarkFontFamily

String

R/W

Specifies the font family to the character string which you set to watermark-text.

WatermarkFontWeight

String

R/W

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.

WatermarkFontStyle

String

R/W

Specifies the font style to the character string which you set to watermark-text.

WatermarkOpacity

String

R/W

Specifies the opacity to the character string which you set to watermark-text.

Values can be added using 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

Methods

XfoObj Class provides the following methods.

Name

Return Value

Arguments

Functions

Dispose

None

None

Releases the resource. Please call this method when you exit the object.

Execute

None

None

Execute formatting and outputs to a PDF specified in OutputFilePath or the printer specified in PrinterName.

Render

None

inputStream : StreamoutputStream : StreamoutDevice : String

Executes the formatting of XSL-FO document specified for inputStream, and outputs it to outputStream in the output form specified for outDevice. If the outDevice parameter is omitted, @PDF is automatically specified.

Render

None

inputDoc : XmlDocumentoutputStream : StreamoutDevice : String

Executes the formatting of XSL-FO document specified for inputDoc, and outputs it to outputStream in the output form specified for outDevice. If the outDevice parameter is omitted, @PDF is automatically specified.

Transforms an XML document specified to xmlSrc using an XSL stylesheet specified to xslSrc, then executes the formatting of XSL-FO document and outputs it to outputStream in the output form specified for outDevice. If the outDevice parameter is omitted, @PDF is automatically specified. A standard XSLT Processor of .NET Framework is used for the XSLT conversion. The ExternalXSLT property and the setting of XSLT Processor in the Option Setting File is disregarded.

Clear

None

None

Initializes formatting engine.

SetXSLTParam

None

name : Stringvalue : String

Sets parameter name and value for xsl:param.

ClearXSLTParam

None

None

Clears all parameter name and value for xsl:param.

SetFontAlias

None

fontName : String aliasName : String

Sets the substitution of font name. This substitution acts on the font names existing in FO. The font name 'fontName' is replaced to 'aliasName'.

EraseFontAlias

None

fontName : String

Erases the substitution of font name 'fontName'.

ClearFontAlias

None

None

Clears all substitutions of font name.

GetFormattingError

None

errlist : Collections.ArrayList

After the formatting finishes, collects the error information and stores it as an argument in Collections.ArrayList provided the error is not an exit level (fatal) error. ErrorLevel, ErrorCode and ErrorMessage are the XfoErrorInformation classes reported.

Adds the URL of the XML-based Option Setting File that indicates the options for AH Formatter V6.5. The contents of Option Setting File are evaluated and if new properties are set, the former setting will be overwritten.

AddUserStylesheetURI

None

fileURI : String

Specifies the CSS user stylesheet you want to add. AddUserStylesheetURI can be specified any number of times. It is applied by specified order prior to the stylesheet specified by StylesheetURI.

Events

XfoObj provides the following events.

Name

Return Value

Arguments

Functions

OnFormatPage

None

pageNum : Int32

The page number that has already been outputted during the formatting process can be received as an event. A value cannot be specified when you use ASP.NET application.

Greater than or equal to 1: Page number that has already been outputted.

0 : All page has been outputted.

-1 : Start of the first pass of 2 pass formatting.

-2 : Start of the second pass of 2 pass formatting.

OnRenderPage

None

pageNum : Int32

The page number that has already been outputted during the formatting process can be received as an event. A value cannot be specified when you use ASP.NET application.

Greater than or equal to 1: Page number that has already been outputted.

0 : All page has been outputted.

PDF Output to the Web Browser

It's possible to directly output PDF to the Web Browser, when you use ASP.NET application on a server and output the formatted result in PDF.
The following is its sample of program.