Server Command Reference

The following server commands are defined for Corda® Embedder. For a list of the server commands, see Server Command Summary.

 

command

 

@_AUTO

Syntax

 

@_AUTO

Description

 

Instructs Corda Server™ to generate a PNG image if the client supports PNG; otherwise, it generates a JPEG image.

 

command

 

@_BGCOLOR

Syntax

 

@_BGCOLORFFFFFF

Description

 

Specifies the background color for the image.

The argument should be in six-digit hexadecimal (RRGGBB) format. Do not include a pound sign (#) before the number. The default value is FFFFFF (white).

 

command

 

@_DOC_LOAD

Syntax

 

@_DOC_LOAD

Description

 

Specifies which document Corda Server should load as input.

The specified document should be an HTML- or XHTML-compliant file. For more information, see Highwire™ Specific Tags. This document is converted to a Corda image (i.e., a PDF file).

The specified document may be stored in the Corda Server file system or at a URL accessible to the Corda Server. Corda Server must have permission to read from the specified document's folder or domain. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

 

command

 

@_DOC_ORIENTATION

Syntax

 

@_DOC_ORIENTATION{portrait|landscape}

Description

 

Specifies the page orientation for the generated Corda image.

By default, the page orientation for all Corda images is portrait. Use this command to override the page orientation.

Note: Change Highwire's default page orientation using the page_defaults.txt configuration file.

 

command

 

@_DOC_PAGEMARGINS

Syntax

 

@_DOC_PAGEMARGINSmarginstring

Description

 

Specifies the size of page margins in the generated Corda image.

By default, all page margins are set to.25 inches. Use this command to override all four margins in a page.

Pass to this command a string consisting of four comma-separated margin values representing (in order) the top, right, bottom, and left margins of the page.

If the margin value is a number only (e.g., 12), Corda Server assumes that the value represents a size in pixels. Specify a different unit of measurement by using one of the following abbreviations after the number: in, cm, mm, px, pc, pt, em, or ex.

Note: Change Highwire's default page margins using the page_defaults.txt configuration file.

The example below shows how to use @_DOC_PAGEMARGINS:

@_DOC_PAGEMARGINS50mm,2cm,20pt,50px

 

command

 

@_DOC_PAGESIZE

Syntax

 

@_DOC_PAGESIZE{11x17|A3|A4|A5|B4|B5|halfletter|ledger|legal|letter|note}

Description

 

Specifies the page size for the generated Corda image.

The default page size for all Corda images is Letter. Highwire automatically resizes the page if it cannot fit the entire width of the document in the default page size. However, if you want to explicitly specify the page size, do so with this command.

Note: Change Highwire's default page size using the page_defaults.txt configuration file.

 

command

 

@_DONTCACHE

Syntax

 

@_DONTCACHE

Description

 

This command serves two purposes. First, it instructs the Web browser to not cache the image, even if caching is enabled on the browser. This is useful when graphing data from a database where the data changes frequently.

Second, it instructs Corda Server to not cache the image on the server side, even if caching is enabled.

Note: Only Corda 7 Enterprise has server-side caching.

 

command

 

@_DONTGZIPSVG

Syntax

 

@_DONTGZIPSVG

Description

 

Instructs Corda Server to not gzip an SVG* image. This increases the size of the SVG image, but is necessary in certain environments for parsing or examining the contents of the SVG image returned by Corda Server.

This command only affects SVG images.

 

command

 

@_ECH

Syntax

 

@_ECH

Description

 

Indicates that the document should be encoded with 128-bit encryption as opposed to 40-bit encryption.

This command only works if a lock code has been set using @_LOCK.

 

command

 

@_ENCLOADREQUEST

Syntax

 

@_ENCLOADREQUESTutf-8,commands/request.txt

@_ENCLOADREQUESTeuc-jp,http://myserver.com/pccommands?month=2

Description

 

Allows you to specify the character encoding of the file you want to load. This command works exactly like @_LOADREQUEST.

To use @_ENCLOADREQUEST, first specify the file encoding; then, after a comma, specify the server command file.. For example, to load the file request.txt which is encoded in unicode, use the following command:

@_ENCLOADREQUESTunicode,request.txt

Valid encoding values include euc-jp, utf-8, shift_jis and unicode. These values are case sensitive and must be entered exactly as shown.

 

command

 

@_ENCSHOWTABLESFROMURL

Syntax

 

@_SHOWTABLESFROMURLshift_jis,http://myserver.mycomp.com/may.html

Description

 

Allows you to specify the character encoding of the Web page you want to output a list of tables for. This command works exactly like @_SHOWTABLESFROMURL.

To use @_ENCSHOWTABLESFROMURL, specify the file encoding followed by a comma and the Web page. For example, to load the Web page stats.html which is encoded in unicode, use the following command:

@_ENCSHOWTABLESFROMURLunicode,stats.html

Valid encoding values include: euc-jp, utf-8, shift_jis, and unicode. These values are case sensitive and must be entered exactly as shown.

Note: @_ENCSHOWTABLESFROMURL cannot read files on the Internet through a proxy server.

 

command

 

@_EMF

Available only in Corda 7 Enterprise.

Syntax

 

@_EMF

Description

 

Instructs Corda Server to generate an EMF image.

 

command

 

@_EPS

Available only in Corda 7 Enterprise.

Syntax

 

@_EPS

Description

 

Instructs Corda Server to generate an EPS image.

 

command

 

@_EPS_CF

Available only in Corda 7 Enterprise.

Syntax

 

@_EPS_CF

Description

 

Instructs Corda Server to generate an EPS image using the font-drawing algorithm. This option draws fonts instead of referencing them, in case they aren't embedded on the intended output device or client. Use this command instead of @_EPS in publishing processes where there is no guarantee that a system has the Times, Courier, or Helvetica fonts.

 

command

 

@_FILE

Syntax

 

@_FILEexamples/bar.itxml

Description

 

Specifies the path and name of the Image Template file. It is required for all Corda Server requests except those using the @_LOAD, @_SHOWTABLESFROMURL or @_DOC_LOAD commands.

The argument to this command should be the location of an Image Template file. By default, the file path is relative to Corda Server's <document_root>\image_templates, but absolute paths, or URLs, also work.

Important: Path.xml must grant Corda Server permission to read files from the specified location in order to load the data. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

 

command

 

@_FLASH

Syntax

 

@_FLASH

Description

 

Instructs Corda Server to generate a FLASH image.

 

command

 

@_FLUSH

Available only in Corda 7 Enterprise.

Syntax

 

@_FLUSH@_PWpasswd

Description

 

Deletes everything that is in the Corda Server image cache. Specify a password using the @_PW command in order to execute @_FLUSH.

Important: The @_FLUSH command cannot be used in HTTP requests. It can only be used in scheduled tasks.

 

command

 

@_GIF

Syntax

 

@_GIF

Description

 

This is a deprecated command that functions like @_AUTO. Corda Server does not generate GIF images.

 

command

 

@_GRADCOLOR

Syntax

 

@_GRADCOLORFFFFFF

Description

 

Specifies the gradient color for the image. This color is used in conjunction with the background color (set in the Image Template file or with @_BGCOLOR) to create a gradient background for the Corda image.

The argument is a six-digit hexadecimal number (RRGGBB). Do not include a pound sign (#) before the number. The default value is FFFFFF (white). Specify NONE if you do not want a gradient.

 

command

 

@_GRADDIRECTION

Syntax

 

@_GRADDIRECTION{TB|BT|LR|RL}

Description

 

Allows you to specify the direction of the background gradient. The available settings are: TB (top-to-bottom), BT (bottom-to-top), LR (left-to-right) and RL (right-to-left).

These settings specify movement from the background color to the gradient color. For example, TB creates a gradient with the background color at the top and the gradient color at the bottom.

@_GRADDIRECTION has no effect if a gradient color has not been specified either in the Image Template file or with the @_GRADCOLOR command.

 

command

 

@_HEIGHT

Syntax

 

@_HEIGHT300

Description

 

Specifies the height of the image to be generated. If none is provided, Corda Server uses the height of the Image Template file.

@_HEIGHT takes as its argument an integer, representing the height of the generated image in pixels.

 

command

 

@_ITXML

Syntax

 

@_ITXMLitxmlString

Description

 

Note: Use this command only within a server command file loaded by @_LOADREQUEST or by the loadCommandFile Corda Embedder method.

Specifies ITXML to send to Corda Server. The ITXML is appended to the Image Template file, overriding any identical values contained in the file. Corda Server supports multiple @_ITXML statements.

@_ITXML works much like Corda Embedder's addITXML method.

The example below illustrates several ways to use @_ITXML.

Using @_ITXML

@_ITXML<?xml ... ?><cit:image-template version="1.0" ... >xml data</cit:image-template>

@_ITXML<cit:bar-graph name="graph"></cit:bar-graph>

@_ITXML<cit:map name="US"><cit:map-shape name="CO" value="13"/></cit:map>

@_BGCOLORCCCC00

@_ITXML<cit:textbox name="title"><cit:text content="Bar Chart Textbox Text"/></cit:textbox>

@_PCSCRIPTgraph.setseries(...)

@_END

 

command

 

@_JPEG

Syntax

 

@_JPEG

Description

 

Instructs Corda Server to generate a JPEG image.

 

command

 

@_LOAD

This is a deprecated command that is disabled by default. Enable @_LOAD in <product_root>\server\config\server_config.txt by adding the following line:

Server.enable.deprecated.commands=true

Syntax

 

@_LOADimages/myimage.swf

Description

 

This is a deprecated command that is disabled by default. Enable @_LOAD in the config file, if necessary.

This command instructs Corda Server to return the specified image. It does not generate any images; any commands that pertain to image generation are ignored.

The command argument is the path to and name of the image file that Corda Server returns. By default, the path is relative to <document_root>\image_templates, but absolute paths also work.

Important: Path.xml must grant Corda Server permission to read files from the specified location, or Corda Server can't load the data. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

 

command

 

@_LOADITXML

Syntax

 

@_LOADitxmlpath

Description

 

Loads the specified ITXML file from a local path (relative to <document_root>), an absolute path, or from a URL.

The ITXML in this file is appended to the ITXML from the Image Template file and from any previous @_LOADITXML commands. If no Image Template file is currently open, this command creates a new Image Template file and inserts the specified object into the empty Image Template file.

Loading a new image object with the same name as an existing image object in the Image Template file replaces the existing image object with the new image object.

Important: Path.xml must grant Corda Server permission to read files from the specified location, or Corda Server can't load the data. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

For more information about ITXML, see ITXML.

 

command

 

@_LOADREQUEST

Syntax

 

@_LOADREQUESTcommands/request.txt

@_LOADREQUESThttp://myserver.com/pccommands?month=2

Description

 

Loads the specified server command file from a local path (relative to <document_root>), an absolute path, or from a URL. The commands in this file are appended to the command string. The file should contain a command string in the proper format.

If one of the following commands is included both in the HTTP request to Corda Server and in the server command file, the command in the server command file is ignored.

Otherwise, any commands in the HTTP request to Corda Server are ignored.

Important: Path.xml must grant Corda Server permission to read files from the specified location, or Corda Server can't load the data. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

 

command

 

@_LOCK

Syntax

 

@_LOCKcode

Description

 

Encrypts the Corda image and specifies a locking code. The locking code specifies what a user can do with the document, such as print, view, or modify it.

The locking code for the Corda image should be an integer value computed by using the bitwise or operator on the PDF locking attributes you want this document to have. The codes for various locking attributes can be found in PDF Locking Codes.

If you're not sure which locking attributes you want for the Corda image, set this value to the AllowDefaults setting, 2580. For example:

@_LOCK2580

Using this command automatically encodes the document with 40-bit encryption. Use @_ECH to raise the encryption level.

 

command

 

@_LOG

Syntax

 

@_LOG@_PWpasswd

Description

 

Returns a text-only Web page displaying the Corda Server log.

For security reasons, specify a password using the @_PW command in order to view the log.

This log is exactly what you see when you look at the Server Settings > Statistics page in the Corda Server Administrator. It keeps track of several statistics, such as how many hits Corda Server has handled. If you enable transaction logging, it also displays Corda Server's most recent transactions. For more information, see Using the Server Log and Console Output in the Corda 7 Install and Administration manual.

Important: The @_LOG command cannot be used in HTTP requests. It can only be used in scheduled tasks.

 

command

 

@_LOGGRAPH

Syntax

 

@_LOGGRAPH@_PWpasswd

Description

 

Feeds hourly or daily usage data to Corda Server. Corda Server Administrator automatically graphs this data in its Charts Served page, but @_LOGGRAPH lets you track this data outside of Corda Server Administrator.

Important: The @_LOGGRAPH command cannot be used in HTTP requests. It can only be used in scheduled tasks.

For security reasons, use the @_PW command to specify a password when accessing @_LOGGRAPH data.

Corda Server keeps statistics on hourly hits over the past seven days. It also tracks daily hits for the past 90 days. This data is kept in <product_root>\Server\logs. Deleting the \logs folder effectively disables usage tracking.

In order for Corda Server to graph this data, specify an Image Template file using the @_FILE command in the server command string. The data is formatted for Time Line graphs, so the Image Template file must contain at least one Time Line graph. You also need to properly specify PCScript commands for the graph and data.

The data is available inside of PCScript via three macros:

  • PCIS.totalHits (total number of hits)

  • PCIS.hitsByHourSeries (list of data indicating hourly hits)

  • PCIS.hitsByDaySeries (list of data indicating daily hits)

The data lists are formatted for Time Line graphs (i.e., in the format time, hits, time, hits, etc.). These macros can be included anywhere in the PCScript, but Corda recommends placing the data lists as the second argument to a SetSeries command. For example, the following PCScript statement sends the hourly usage data to the series called Hour for the graph named graph:

graph.series(Daily Hits, PCScript.hitsByDaySeries)

Time is in the format %Y/%m/%d:%H (e.g., 1999/06/23:6) for both PCIS.hitsByHourSeries and PCIS.hitsByDaySeries. Thus, you must set the date input format appropriately. This can be done with the following graph.dateInputFormat PCScript command:

graph.dateInputFormat(%Y/%m/%d:%H)

 

command

 

@_OPW

Syntax

 

@_OPWpassword

Description

 

Specifies an owner password for a locked document. Users that want to edit the generated Corda image must first enter this password.

This command only works if a lock code has been set using @_LOCK.

 

command

 

@_PCSCRIPT

Syntax

 

@_PCSCRIPTpcscriptCommandString

Description

 

Specifies the PCScript commands for the Corda image. PCScript is used to send information such as data and formatting options to the graphs, maps, shapes, legends, and textbox objects within a Corda image. The PCScript Reference contains a complete list of PCScript commands.

The argument to the @_PCSCRIPT command is a string containing all of the PCScript commands that you want to use.

In a URL, there should be nothing separating the PCScript commands from each other. The example below illustrates the proper format for a @_PCSCRIPT command in a URL.

@_PCSCRIPTtextbox.settext("Hello World")graph.addHoverText(3,2,High)graph.addHoverText(1,4,Low)

In other situations (e.g., server command files), there can be white space between PCScript commands.

 

command

 

@_PDF

Available only in Corda 7 Enterprise.

Syntax

 

@_PDF

Description

 

Instructs Corda Server to generate a PDF image.

 

command

 

@_PDFEMBEDFONTS

Available only in Corda 7 Enterprise.

Syntax

 

@_PDFEMBEDFONTSno

Description

 

Instructs Corda Server not to embed fonts in its PDF output.

 

command

 

@_PNG

Syntax

 

@_PNG

Description

 

Instructs Corda Server to generate a PNG image.

 

command

 

@_PW

Syntax

 

@_PWpasswd

Description

 

Specifies the Corda Server password. For security reasons, certain server commands always require a password. These include:

Enter the password as the argument to the @_PW command.

To turn off this security feature, use the Server.noPWForSave configuration setting, entered in the configuration file.

Important: The @_PW command cannot be used in HTTP requests. It can only be used in scheduled tasks.

 

command

 

@_RUNWEBAPP

Syntax

 

@_RUNWEBAPPhttp://www.myservser.com/myWebapp

Description

 

Instructs Corda Server to "hit" the specified URL.

This command facilitates scheduled graph or map generation tasks. Its sole purpose is to provide a method for administrators to schedule a certain Web application to run prior to running graph- or map-generation tasks. This is useful when a Web application gathers or processes data, saving it to a location that is then accessed by Corda Server during a scheduled graph or map generation task.

@_RUNWebAPP cannot be used with any other commands. If Corda Server sees this command, it ignores any other commands sent to it.

For more information about scheduled tasks, see Scheduling Corda Image Generation.

Important: The @_RUNWEBAPP command cannot be used in HTTP requests. It can only be used in scheduled tasks.

 

command

 

@_SAVE

Syntax

 

@_SAVEimages/myimage.swf @_PWpassword

Description

 

Directs Corda Server to save the generated image to the specified location. The image is still returned to the Web browser. This command is only available for use on Corda Server's internal port, not on the external port.

After an image has been saved, use @_LOAD command to load it. This keeps you from having to generate it again. Using @_SAVE and @_LOAD can greatly improve Corda Server's performance if it is serving the same image over and over again.

For security reasons, specify a password using the @_PW command in order to use the @_SAVE command. Or, if you don't want to specify a password, set the <Server.noPWForSave> configuration setting.

Important: The @_SAVE command cannot be used in HTTP requests. It can only be used in scheduled tasks.

Important: Make sure that path.xml grants Corda Server permission to save to the specified location, or Corda Server can't save the file. By default, Corda Server can only save to <document_root>\image_templates . For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

The argument to this command is the file that you want to save the image to. By default, the file name is relative to <document_root>\image_templates, but an absolute path also works.

 

command

 

@_SHOWTABLESFROMURL

Syntax

 

@_SHOWTABLESFROMURLhttp://sports.yahoo.com/oly/medals.html

Description

 

Outputs a list of all tables in a Web page with their corresponding table numbers. The output helps you determine the table number to send to Corda Server when importing data from an HTML table using the Corda Embedder loadData() method or the PCScript loadFile() method.

note: @_SHOWTABLESFROMURL cannot read files on the Internet through a proxy server.

note: Using this command overrides all other server commands, so use it only in the development process when determining which specific HTML tables to target.

When you use the @_SHOWTABLESFROMURL command, Corda Server returns a Web page similar to the following.

In this situation, table 17 is the only one that contains useful data.

Important: In order for Corda Server to list the tables in a Web page, it must be given permission to read data from the specified path or domain. For more information, see Setting Path Permissions in the Corda 7 Install and Administration manual.

 

command

 

@_SI

Syntax

 

@_SIfilename

Description

 

Prompts users to the save the document to their computers using the specified file name. This happens instead of normal Corda image behavior, which is to open the document directly in a Web browser (assuming it has the appropriate plug-in).

 

command

 

@_SVG

Syntax

 

@_SVG

Description

 

Instructs Corda Server to generate an SVG image.

 

command

 

@_SVGFOP

Available only in Corda 7 Enterprise.

Syntax

 

@_SVGFOP

Description

 

Instructs Corda Server to generate an SVG image in a format accepted by Apache's FOP (Formatted Object Processor).

 

command

 

@_TABLE

Available only in Corda 7 Enterprise.

Syntax

 

@_TABLE

Description

 

Instructs Corda Server to return a table of data. A table is not an image—treat it as its own separate Web page.

 

command

 

@_TEXTDESCRIPTION

Syntax

 

@_TEXTDESCRIPTIONEN

Description

 

Instructs Corda Server to return a text description of the Corda image. It accepts as its argument a two character language code, which tells Corda Server which language settings to use. For more information about descriptive text, see Descriptive Text Settings.

Currently, the only language available in the standard Corda Server installation is English (EN), but Corda Server lets you create custom language settings. For more information, see Adding Support for Additional Languages.

A text description is not an image—treat it as its own separate Web page.

 

command

 

@_TIFF

Available only in Corda 7 Enterprise.

Syntax

 

@_TIFF

Description

 

Instructs Corda Server to generate a TIFF image.

 

command

 

@_UPW

Syntax

 

@_UPW

Description

 

Specifies a user password for a locked document. Users that want to view the generated Corda image must first enter this password.

This command only works if a lock code has been set using @_LOCK.

 

command

 

@_USESVGTEMPLATE

Syntax

 

@_USESVGTEMPLATEsvg_templates\grow.svg

Description

 

Specifies the location of an SVG template to apply to the Corda image. By default, this location is <document_root>\examples\svg_templates, but an absolute path or URL also works.

SVG templates are SVG files that specify a transformation or special effect for a Corda image. Examples of such effects include fading, rotating, and sliding. The effect or transformation is applied after the Corda image has been generated.

Several popular templates are located in the <document_root>\examples\svg_templates directory. For consistency, we recommend that you also put any other SVG templates in this directory.

Important: Make sure that path.xml grants Corda Server permission to read from the location where the SVG Template is located, or Corda Server can't read the file (see Setting Path Permissions in the Corda 7 Install and Administration manual).

 

command

 

@_WIDTH

Syntax

 

@_WIDTH500

Description

 

Specifies the width of the image to be generated. If none is provided, Corda Server uses the width of the Image Template file.

@_WIDTH takes as its argument an integer, representing the width of the generated image in pixels.