A Guide to QuarkXPress Server 2018

Using QuarkXPress Server

The xml namespace deconstructs a project according to the Modifier schema. The construct namespace lets the server turn an XML representation of a QuarkXPress project back into an actual project. With these namespaces, you can deconstruct a project into an XML representation, change the XML in accordance with the Modifier schema, and then have the server generate an updated version of the QuarkXPress project. You can even create new QuarkXPress projects from scratch using XML.

In addition, you can use the construct namespace to:

  • Create a page based on master page

  • Create a project from XML, using a Job Jackets™ file as the basis for the project

  • Modify text font and style, including OpenType® styles

  • Apply style sheets and local formatting to text

  • Create and populate tables

  • Import pictures into picture boxes and specify picture attributes

The schema used for XML construction and deconstruction is completely Unicode®-compliant, making it ideal for use in international publishing. Furthermore, the use of this schema ensures that the schema of XML output created by Constructor does not change when server preferences change. This DTschema is provided in the QuarkXPress Server application folder and fully documented in "Modifier schema (annotated)."

Deconstructor XTensions software and the deconstruct namespace are no longer supported.

Creating URL requests

You can use URL requests to make QuarkXPress Server render projects in a variety of formats, to use the features of server XTensions modules, and to control the server. The topics below provide an overview of how to construct server requests and use URL parameters.

This chapter also lists functions that let you control the server.

Understanding URL requests

QuarkXPress Server URL requests should use the following format:

http://server:port/namespace/path/projectname?parameter=value

  • server: Indicates the name or IP address of the QuarkXPress Server computer.

  • port: Indicates the QuarkXPress Server application's port number. The default port number is 8080.

  • namespace: Sets the render type (or indicates another server functionality to access). For more information, see "Understanding QuarkXPress Server namespaces."

  • path: Indicates the path to the directory where the target project file is stored. The project to be rendered can either be located in the document pool (in which case paths are evaluated relative to the document pool directory), or can be streamed as part of a multipart HTTP Post request. When the project is streamed as part of the request, the project name will correspond to the name given to the HTTP request part which contains the project data.

  • projectname: Identifies the project to be rendered.

  • parameter=value: Optional parameters that provide more detailed control over how the target project should be rendered. Multiple parameter/value pairs, separated by the "&" character, can be included.

For example, the following URL asks the QuarkXPress Server application named "QXPServer" to return the file "MyProject.qxp" as a PDF file with hyperlinks and all fonts embedded:

http://QXPServer:8080/pdf/MyProject.qxp?includehyperlinks=1&embedallfonts=1

Some URL parameters require Boolean arguments. For such parameters, valid values include 1 or 0, true or false, y or n, and yes or no.

You can also send requests to QuarkXPress Server using the HTTP GET and POST protocols and using XML with XSLT.

Understanding QuarkXPress Server namespaces

QuarkXPress Server namespaces differentiate among types of requests that are otherwise identical. For example, consider the following three URLs:

http://QXPServer:8080/project1.qxp

http://QXPServer:8080/pdf/project1.qxp

http://QXPServer:8080/postscript/project1.qxp

These requests are identical, except each uses a different namespace (in italic). (The first request does not specify a namespace, but this simply means the project is to be rendered using the server's default render type.)

Namespaces can be used to determine the format in which a rendered project is returned, as indicated above, but they can also be used to direct a request to XTensions software that performs other functions. For example, if you use Modifier XTensions software's xml namespace, Modifier XTensions software can return an XML representation of the project.

Looking up a namespace

This guide lists the namespaces for every QuarkXPress Server function. There is no single list of namespaces because some functions do not require a particular namespace or are available in multiple namespaces. To determine which namespace you want to use:

  1. In this Guide, go to the page that documents the render type you want to use. (For more information, see "Understanding render types.")

  2. Locate the Namespace row. If the render type or function has an associated namespace, that namespace is listed here.

Third-party XTensions can add their own namespaces. For information about a third-party namespace, see the documentation for the XTensions module that adds that namespace.

Understanding QuarkXPress Server parameters

Parameters let you control the details of how a request is executed. For example, you can use the page parameter to create a request that returns only the third page of a project:

http://QXPServer:8080/jpeg/project1.qxp?page=3

You can include multiple parameters in the same request; simply separate them with an ampersand (&). For example, here's a new version of the above URL that returns page three at a scale of 50%:

http://QXPServer:8080/jpeg/project1.qxp?page=3&scale=.5

Looking up a parameter

This Guide lists the parameters that are available for every QuarkXPress Server function. To determine which parameters you can use with a request:

  1. In this Guide, go to the page that documents the render type you want or the function you want to use. (For more information, see "Understanding render types" and "Understanding render modifiers.")

  2. Locate the Parameters row. This row lists all available parameters, and includes a description and a list of valid values for each parameter.

Supported interfaces

The following interfaces are available in QuarkXPress Server:

  • HTTP: Lets you interact with the server using URLs that contain calls or point to XML files that contain calls. You can write client applications in any language that supports HTTP requests. For more information, see "Getting started: HTTP".

  • HTTPS: Provides secure HTTP access.

  • Web services: Lets you interact with the server via Web services using the QuarkXPress Server Manager object model. You can write client applications in Java, .NET, or any other programming language that can consume SOAP-based Web services. For more information, see "Getting started: Web services".

To develop a custom load balancer or a custom application in Java, you must have version 1.5 or 1.6 of the JDK.

The Dynamic Publishing Process (DPP)

The Dynamic Publishing Process (DPP) has several stages. You may not need to use all of these stages every time, but this the order in which they occur:

  • Pre-Processing Stage: During this stage, QuarkXPress Server performs any necessary initial steps, such as creating style sheets, colors, and H&J rules for a new QuarkXPress project.

  • Content Loading Stage: During this stage, QuarkXPress Server loads dynamic content into boxes in the project.

  • Layout Modification Stage: During this stage, QuarkXPress Server modifies the layout of the project.

  • Post-Processing Stage: During this stage, QuarkXPress Server examines the project and performs maintenance tasks.

Getting started

The topics below describe how to create requests for the QuarkXPress Server Web interface.

For information about the options available in such requests, see "Using the Web interface."

Getting started: HTTP and HTTPS

You can submit HTTP and HTTPS requests to QuarkXPress Server as URLs, either manually from a  browser or automatically from an HTTP client application. QuarkXPress Server processes such requests and returns rendered content in the HTTP or HTTP responses. Depending on the type of request, the QuarkXPress Server preferences, and the type of content returned, the rendered content may be downloaded by the end user, displayed in the end-user's browser, or saved to a file system location accessible to QuarkXPress Server.

You can write a QuarkXPress Server client application in almost any language that can generate HTTP GET/POST requests. A QuarkXPress Server HTTP-based solution typically consists of QuarkXPress Server (running on a server computer connected to a network) plus a front-end application (usually Web-based) that provides a graphical user interface (GUI) for end users. The front-end application translates end users' input into HTTP or HTTPS requests and sends the requests to QuarkXPress Server or QuarkXPress Server Manager, which processes the requests and returns rendered content.

Dissecting a QXP Server URL

To interact with QuarkXPress Server from a Web browser, use a URL like the following:

http://[server]:[port]/[namespace]/[directory]/[DocumentName]?[parameter]=Value
  • [server]: The name or IP address of the computer for QuarkXPress Server or QuarkXPress Server Manager.

  • [port]: The port number on which to contact QuarkXPress Server or QuarkXPress Server Manager. The default port is 8080 for QuarkXPress Server and 8090 for QuarkXPress Server Manager.

  • [namespace]: Defines what the URL action will be and any parameters and conditions available to that namespace.

  • [directory]: The path in the document pool where the project is stored, relative to the QuarkXPress Server document pool. To access the root level, no directory path is necessary. (Note that you can also supply assets as part of a multipart HTTP request. For more information, see "Using HTTP POST with QXP Server.")

  • [DocumentName]: The name of the QuarkXPress project to be processed.

  • [parameter]: Further defines the URL action with attributes and values allowed for the namespace or general call. Pass parameters in the form attribute=value, with parameters separated by the "&" character.

For QuarkXPress Server Manager, use a URL like the following:

http://[server]:[port]/qxpsm/request/[namespace]/[directory]/
[DocumentName]?[parameter]=Value

Prior to QuarkXPress Server 9.0, you had to use different URL constructions when sending requests to an instance of QuarkXPress Server Manager in a QPS installation than you did when sending requests to a free-standing instance of QuarkXPress Server Manager. In versions 9.0 and later, both can use /qxpsm/request/ after [port]/ .

You can now use both absolute and relative paths when you modify a project with SDK objects or classes. Relative paths are almost always relative to the document pool. If you use multiple QuarkXPress Server instances, you should use a common document pool.

Interpreting the QXP Server Manager response

When QuarkXPress Server Manager successfully processes a request through the HTTP interface, the response is the same as QuarkXPress Server's response unless the user has supplied additional parameters to QuarkXPress Manager. For more information, see "Working with QuarkXPress Server Manager" in A Guide to QuarkXPress Server.

If an error occurs, QuarkXPress Server Manager retries the request, either on the same QuarkXPress server instance or a different one (depending on the error and global settings established in the QuarkXPress Server Manager client). If QuarkXPress Server Manager cannot process the request, it returns an XML response describing the error, plus any header error codes returned by QuarkXPress Server. For example:

<?xml version="1.0" encoding="UTF-8" ?>
<error>
  <httpresponsecode>500</httpresponsecode>
  <xpressservererrorcode>-43</xpressservererrorcode>
  <xpressservererrormessage>File not found.</xpressservererrormessage>
  <xpressserverextendedmessage> <![CDATA[ Error #-43 - File not found. ]]>
    </xpressserverextendedmessage>
  <xpressservermanagererrorcode>M8000001</xpressservermanagererrorcode>
  <xpressservermanagererrormessage>The server could not locate the specified file.
    </xpressservermanagererrormessage>
</error>
HTTP GET and POST Requests

The topics below describe how you can use HTML to interact with QuarkXPress Server.

QuarkXPress Server supports both the GET and POST HTML methods. When you use the GET method, the browser encodes form data into a URL. When you use the POST method, form data is passed within the message body. Use the GET method only when the form processing is idempotent. In short: GET is for retrieving data, whereas POST can involve storing or updating data, ordering a product, or sending an e-mail.

Using HTTP GET with QXP Server

Use HTML like the following to specify a server and port where you want to send a request. You can specify the name of the target project, the output type, and a scaling value. You can specify the name of a box and the path of a text or picture files to import into that box, as long as the file's path is on the server's file system. You can also use HTML like the following to specify the page number and layout number of the project.

The form section of the HTML should begin with the following line of code:

<form id = form1 method="GET" enctype="application/x-www-form-urlencoded">

For both GET and POST, the browser constructs a form data set and encodes it according to the ENCTYPE attribute (you can use multipart/form-data for POST and application/x-www-form-urlencoded (the default) for both POST and GET).

To create fields that let the user specify the server IP address, the port, and the project name, use HTML like the following:

<TABLE cellSpacing=1 cellPadding=1 border=1 id=TABLE1 >
  <TBODY>
  <TR>
    <TD>
    <INPUT id=ServerTxt name=ServerTxt value="Server ID"
      readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px">
    </TD>
    <TD>
    <INPUT id=Server maxLength=50 size=16 value=localhost name=Server
      style="WIDTH: 170px; HEIGHT: 22px">
    </TD>
  </TR>
  <TR>
    <TD>
    <INPUT id=PortTxt name=PortTxt value="Port Number"
      readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px">
    </TD>
    <TD>
    <INPUT id=Port maxLength=50 size=17 value=8080 name=Port
      style="WIDTH: 170px; HEIGHT: 22px">
    </TD>
  </TR>
  <TR>
  <TBODY>
</TABLE>
<TR>
  <p></p>
  <TD>
  <INPUT id=DocTxt name=DocTxt value="Document Name"
    readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px">
  </TD>
  <TD>
  <INPUT id=Doc maxLength=50 size=18 name=Doc style=
    "WIDTH: 170px; HEIGHT: 22px">
  </TD>
</TR>

To create a drop-down menu that lets the end user specify a render format, use HTML like the following:

<SELECT id="select1" name="returntype">
  <OPTION value="jpeg">JPEG</OPTION>
  <OPTION value="pdf">PDF</OPTION>
  <OPTION value="qxpdoc">QuarkXPress document</OPTION>
  <OPTION value="eps">EPS Document</OPTION>
  <OPTION value="postscript">POSTSCRIPT</OPTION>
  <OPTION value="png">PNG</OPTION>
</SELECT><td/>

To create a drop-down menu that lets the end user specify a rendering scale, use HTML like the following:

<SELECT id="select2" name="scale">
  <OPTION value="1">100%</OPTION>
  <OPTION value="2">200%</OPTION>
  <OPTION value="3">300%</OPTION>
  <OPTION value="5">500%</OPTION>
  <OPTION value=".5">50%</OPTION>
</SELECT><p/>

To create input fields that let the end user specify a box name and the name of a file to be imported into that box, use HTML like the following:

<TD>
<INPUT id=box1Txt value="Box Name"
  readOnly style="WIDTH: 181px; HEIGHT: 22px" size=16>
</TD>
 
<TD>
<INPUT id=box1 maxLength=256 size=43 style="
  WIDTH: 293px; HEIGHT: 22px"></TD>
</TR>
 
<TR>
<TR>
<TD>
<INPUT id=box1FileTxt value="File on Server"
  readOnly style="WIDTH: 181px; HEIGHT: 22px" >
</TD>
 
<TD>
<INPUT id=box1File maxLength=256 size=43 style="
  WIDTH: 293px; HEIGHT: 22px">
</TD>
</TR>

To create fields that let the end user enter a page number a layout number, use HTML like the following:

<TABLE cellSpacing=1 cellPadding=1 border=1 style="WIDTH: 188px; HEIGHT: 61px">
  <TR>
    <TD>
    <INPUT id=PageTxt value = "Page"
      readOnly style="WIDTH: 50px; HEIGHT: 22px" size=3>
    </TD>
    <TD>
    <input id=Page size="16" maxlength="256"
      style="WIDTH: 147px; HEIGHT: 22px">
    </TD>
  </TR>
  <TR>
    <TD>
    <INPUT id=LayoutTxt value = "Layout"
      readOnly style  ="WIDTH: 50px; HEIGHT: 22px" size=4>
    </TD>
    <TD>
    <input id=Layout size="16" maxlength="256"
      style="WIDTH: 147px; HEIGHT: 22px">
    </TD>
  </TR>
</TABLE>

To create a button that lets the end user submit the request, use HTML like the following:

<input type="submit" value="Render document"
    name="Submit" LANGUAGE="javascript"
    onclick="return Submit_onclick()"/>

The above HTML calls a function named Submit_onclick(). You can add such a function to the <HEAD> section of the HTML. For example:

<head>
<TITLE>Quark Stream</TITLE>
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
  function Submit_onclick() {
  var prefix;
  var renderer;
  var file;
  var url;
  var box1Name;
  var dataImportStamp = "@dataimport";
  prefix = "http://" + document.getElementById("Server").value + ":";
  port = document.getElementById("Port").value + "/";
  renderer = document.getElementById("select1").value + "/";
  file = document.getElementById("Doc").value;
  box1Name = document.getElementById("box1").value;
  if (box1Name != "") {
    document.getElementById("box1File").name = box1Name + dataImportStamp;
    } else {
    document.getElementById("box1File").name = "";
    }
  document.getElementById("Page").name = "Page";
  document.getElementById("Layout").name = "Layout";
  url = prefix + port + renderer + file;
  document.getElementById("form1").action = url;
}
</script>
</head>

The Submit_onclick() function reads the values from the formand builds a request URL using the server, port, and render type.

If the end user specifies a file name in the "File on Server" text box, he or she must add file: to the beginning of the file path (for example, file:C:\data.txt).

The code above adds @dataimport to the end of the box name to accommodate data import.

The action of the form is defined by this line:

document.getElementById("form1").action = url;

This form's method is GET. The user agent gets the value (the URL) of the action, appends a ? to it, adds the form data set, and submits the URL.

In this scenario, form data must be in ASCII.

Using HTTP GET with QXP Server Manager

HTTP GET with QuarkXPress Server Manager works the same way as HTTP GET with QuarkXPress Server (see "Using HTTP GET with QXP Server"), except that Quark does not recommend using GET if you are working with non-ASCII characters. The behavior of GET requests with characters is highly browser-dependent, and there is no standard that all browsers follow. Instead, use POST.

Using HTTP POST with QXP Server

Use HTML like the HTML in "Using HTTP GET with QXP Server" to specify a server and port where you want to send a request. You can specify the name of the target project, the output type, and a scaling value. You can specify the name of a box and the path of a text or picture files to import into that box, as long as the file's path is on the server's file system. You can also use HTML like the HTML in "Using HTTP GET with QXP Server" to specify the page number and layout number of the project. Differences between the GET method and the POST method are described below.

The form section of the HTML should begin with the following line of code:

<form id = form1 method="post" enctype="multipart/form-data">

The following HTML creates input fields that let the end user specify the name of a file to be imported into a box:

<TD><INPUT id=box1FileTxt value="File on Client"
    readOnly style="WIDTH: 180px; HEIGHT: 22px" ></TD>
<TD><input id=box1File type="file"
  size="32" maxlength="256" style="WIDTH: 293px;
  HEIGHT: 22px">
</TD></TR>

The action of the form is defined by this line:

document.getElementById("form1").action = url;

The form's method is POST. The user agent conducts an HTTP post transaction using the value of the action attribute (the URL), and a message is created according to the content type specified by the enctype attribute.

When you use a multipart HTTP post request, you can include in the request any files which are required by the rendering process, including QuarkXPress templates, picture files, modifier XML, and digital publishing assets. For more information, see "Using the Streaming Document Provider."

Using HTTP POST with QXP Server Manager

HTTP POST with QuarkXPress Server Manager works the same way as HTTP POST with QuarkXPress Server (see "Using HTTP POSTwith QXP Server"), except that with QuarkXPress Server Manager, you must use UTF-8.

Getting started: Web services

The Web services interface is a collection of request classes. You can download the SDK WSDL class definitions from http://[server]:[port]/qxpsm/services/RequestService?wsdl (replace [server] with the QuarkXPress Server Manager computer's IP address and [port] with the QuarkXPress Server Manager port number.

These classes can be chained together to form compound QuarkXPress Server requests. The sample applications (see "Sample Applications") show how to use these classes to invoke a QuarkXPress Server command and manipulate the response.

For more information, see "Functions." In addition to the classes listed there, the Web services interface includes the following:

  • RequestService processes QuarkXPress Server requests. This object's generic processRequest() method takes a QRequestContext argument and returns a QContentData object containing the response. For more information, see the sample applications and "Functions."

  • QRequestContext is the argument you pass to RequestService's generic processRequest() method.This object contains settings which must be set once per request. Set all chained requests inside the request context.

  • QRequest is the base class for all request objects (such as PDFRenderRequest). Consequently, all request objects share some common data members.

  • RequestParameters is a generic class for executing any request and for adding dynamic properties to a request.

  • NameValueParam is a generic class for adding dynamic properties to a request. This class is specifically for requests that take a box's name and/or ID as the parameter name and the box's content as the value.

  • QContentData is the response returned when a request is executed. QContentData is a hyperlink that follows the same pattern as the classes above.

  • QException is the exception class for QuarkXPress Server Manager. Web services returns a QException object if an error occurs with any Web service method. You can use try/catch blocks to handle QException objects.

If you've written a Server XTensions module, you can extend the XML interface to include any changes it makes to the Modifier schema by simply modifying an XML file and regenerating the stubs.

To exclude empty tags in the request HTML, set the value of the appropriate variable to null.

For Javadocs, WSDL schemas, and JSP samples, see the Welcome page that displays when you launch QuarkXPress Server Manager.

The following topics describe the general Web services classes.

QRequestContext

Description

An argument passed to RequestService. Contains settings that must be set once per request. All chained requests must be set inside the request context.

Type

Web service data object

Members

Name

Types

Description

documentName

String

File or object name on which the command will be rendered.

serverName

String

Server name. Default is NULL. Load balancer searches for the host itself in this case.

serverPort

Integer

Port at which the desired server is listening.

userName

String

Server admin username.

userPassword

String

Server admin password.

maxRetries

Integer

Max number of times to try executing the command before returning failure.

requestTimeout

Integer

Max time out in milliseconds.

useCache

Boolean

Indicates whether the cache should be checked for an existing result or if the command should be executed again.

responseAsURL

Boolean

This value indicates whether the server should send the response as-is (text or binary) or store the response on the server and return its location as a URL. Because the object model works on SOAP, which can be slow when transferring large binary files, you might choose to set this value to "true" if you suspect that the response is going to be several megabytes or larger.

bypassFileInfo

Boolean

Indicates whether file info should be fetched before executing the command.

context

String

Context in which the command is being executed.

request

QRequest

QuarkXPress Server request is instances of request objects chained together.

Example, object model

com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); rc.documentName = this.DocumentSettings1.documentName.Text; rc.responseAsURL = this.DocumentSettings1.responseAsURL.Checked; rc.useCache = this.DocumentSettings1.useCache.Checked; rc.bypassFileInfo = this.DocumentSettings1.bypassFileInfo.Checked; //Create the service and call it QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

RequestService

Description

Web service called to process the QuarkXPress Server request. RequestService has a generic method named processRequest() that takes QRequestContext as an argument and returns QContentData as the QuarkXPress Server response.

Type

Web service

Methods

processRequest

Processes the request context and returns the result.

Parameter

Type

Description

requestCmd

QRequestContext

Argument passed to RequestService. Contains settings that must be set once per request. All chained requests are set inside the request context.

createSession

Creates a new session and returns a session ID.

Parameter

Type

Description

timeout

Long

Timeout for the session in milliseconds. If no call is executed in that time, session is expired and all the open documents in that session are closed without saving. If 0 is passed as value of timeout, default timeout is used. If a negative value is passed as timeout, the session never expires.

closeAlldocs

Closes all open documents in the session without saving them. If the session does not exist, an error is returned. If an error occurs while closing the document, it is logged and the document is marked closed in the internal cache. No error is returned.

Parameter

Type

Description

sessionId

String

Session whose documents are to be closed.

closeDoc

Closes the specified document without saving it. If the session does not exist, an error is returned. If the document is not open, and error is returned. If the document is open in another session, an error is returned. If an error occurs while closing the document, it is logged and the document is marked closed in the internal cache. No error is returned.

Parameter

Type

Description

docName

String

Document to be closed.

sessionId

String

Session in which document was opened.

closeSession

Closes the specified session. If the session does not exist, an error is returned. If any documents are still open in the session, an error is returned.

Parameter

Type

Description

sessionId

String

Session to be closed.

getOpenDocs

Gets all the open documents in the session. If the session does not exist, an error is returned.

Parameter

Type

Description

sessionId

String

Session whose open documents are sought.

getOpenSessions

Gets all open sessions.

getPreferences

Gets QuarkXPress Server preferences.

setPreferences

Sets QuarkXPress Server preferences.

getXPressDOM

Creates a DOM for the specified document.

newDoc

Creates a new document for modification and keeps it open until further notice. The document is created with a single layout. To create a more complex document, use the processRequestEx API. If a document with the same name is already open, an error is returned. If the session does not exist, an error is returned.

Parameter

Type

Description

docName

String

Document to be opened for modification. Provide the name only. You can provide a relative path when you save the document.

jobJacketName

String

Name of the Job Jackets file to be used. The Job Jackets file is assumed to be already available on the QuarkXPress server computer.

jobTicketName

String

Name of the Job Ticket to be used.

host

String

The QuarkXPress Server instance that should be used for this document modification. If null, this value is supplied by the load balancer. If the indicated server is not an active registered server, an error is thrown.

port

Integer

The port for the server specified in the host parameter.

sessionId

String

Session in which the document should be opened.

openDoc

Opens the specified document and keeps it open until further notice. If the document is already open, an error is returned. If the session does not exist, an error is returned.

Parameter

Type

Description

docName

String

Document (along with relative path if required) to be opened for modification.

host

String

QuarkXPress Server instance which should be used for this document modification. If null, this value is supplied by the load balancer. If the indicated server is not an active registered server, an error is thrown.

port

Integer

The port for the server specified in the host parameter.

sessionId

String

Session in which the document should be opened.

processRequestEx

Executes the request context. If a session ID is specified, the document is kept open after the request is executed. If no session ID is specified, the request is executed normally without keeping the document open. If the document is open in another session, an error is returned. If the document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).

Parameter

Type

Description

reqContextObj

QRequestContext

Request to be executed.

sessionId

String

Session in which the request should be executed. This value may be null. If a session ID is provided, the document is kept open. If no session ID is provided, the request is executed normally, as if processRequest had been called.

saveAllDocs

Saves all open documents in the session. The documents are saved one by one. If error occurs while saving a document, an error is returned immediately and the rest of the documents remain unsaved. If a document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).

Parameter

Type

Description

relativePath

String

Relative path where open documents should be saved. If this value is provided, copies of open documents with changes made so far are saved in the new location. The open documents are not saved but have all of the changes made so far.

sessionId

String

Session in which the document exists.

saveDoc

Saves the open document. If a document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).

Parameter

Type

Description

docName

String

Document to be saved. Must be the same name that was used when opening or creating the document.

newName

String

New name of the document. If null, the document is saved with the old name.

relativePath

String

Relative path where the document should be saved. The relative path can also contain the new name of the document. If this is provided, a copy of the open document with changes made so far is saved in the new location. The open document is not saved but has all of the changes made so far.

sessionId

String

Session in which the document exists.

getXPressDOMEx

Lets you create a DOM of a particular layout or portion of a layout.

getXMLFromXPressDOM

Creates an XML string out of the DOM.

getXPressDOMFromXML

Takes a raw XML representation of a project as a string and returns an object model representing that project, with Project as the root class.

Example, object model

QRequestContext rc = new QRequestContext(); rc.documentName = "test.qxp"; rc.responseAsURL = false;   JPEGRenderRequest jpegRequest = new JPEGRenderRequest(); rc.request = jpegRequest;   RequestService svc = new RequestService(); QContextData response = svc.processRequest(rc);

QRequest

Description

Base class for all request objects (such as PDFRenderRequest). All request objects share some common data members, which are described below.

Type

Web service data object

Members

Name

Types

Description

request

QRequest

QuarkXPress Server request that includes instances of request objects chained together.

RequestParameters

Description

Generic class for executing any request and for adding dynamic properties to a request.

Type

Web service data object

Members

Name

Type

Description

requestNamespace

String

Namespace of the request (for example, jpeg).

params

NameValueParam[]

Parameter array for the specified request (for example, jpegquality).

Additional comments

You can use this class to send any request for which a specific class does not exist. When this request exists in the chain, its namespace is concatenated with the namespaces of other requests. That means the namespace provided here can be null. The parameters of this class can be used to parameterize a request being sent to the server.

Example, object model

QRequestContext rc = new QRequestContext(); RequestParameters request = new RequestParameters(); request.setRequestNamespace("jpeg"); rc.setRequest = request; NameValueParam p1 = new NameValueParam(); p1.setParamName = "jpegquality"; p1.setTextValue = "4"; request.setParams(new NameValueParam[]{p1});

NameValueParam

Description

Generic class for adding dynamic properties to a request. This class is specifically for requests that take a box name/id as the parameter name and the box content as the parameter value.

Type

Web service data object

Members

Name

Type

Description

paramName

String

Name of the parameter. In most cases this will be the name/ID of the box.

textValue

String

Text value of the box. (You can set either textValue or streamValue.)

streamValue

byte[]

Stream value of the box. (You can set either textValue or streamValue.)

contentType

String

The MIME content type of the parameter.

QContentData

Description

A response to a Web Services call to QuarkXPress Server.

Type

Web service data object

Members

Name

Types

Description

contentType

String

The type of the response. For example, "text/xml" or "text/plain."

textData

String

If the response type is text, this contains the text. Otherwise, this value is null.

responseURL

String

If the responseAsURL parameter was set to "true" in the request, this contains the URL of the response. Otherwise, this value is null.

streamValue

binary

If the response type is binary, this contains the byte array. Otherwise, this value is null.

encodingType

String

If the response type is text, this value indicates the encoding of the text (for example,  UTF-8 or ANSI).

actualServerPortUsed

String

Identifies the server port.

actualServerUsed

String

Identifies the server.

headers

String

If the response returned by the server is a set of headers, this array contains the header response.

multipartResponse

String

If the response returned by the server is multipart, this array contains the multipart response parts.

Example, object model

QRequestContext context = new QRequestContext(); context.setDocumentName("sample.qxp"); context.setResponseAsURL(true); JPEGRenderRequest request = new JPEGRenderRequest(); request.setJPEGQuality("4"); context.setRequest(request); RequestService requestService = new RequestServiceStub(); QContentData response = requestService.processRequest(context); System.out.println(response.getResponseURL());

QException

Description

Exception class for QuarkXPress Manager.

Type

Exception

Members

Name

Types

Description

httpResponseCode

String

HTTP response code.

managerErrorCode

String

QuarkXPress Server Manager error code.

managerErrorMessage

String

QuarkXPress Server Manager localized error message.

serverErrorCode

String

QuarkXPress Server error code.

serverErrorMessage

String

QuarkXPress Server response message.

serverExtendedMessage

String

QuarkXPress Server extended error message.

Example, object model

String docName = "notexisting.qxp"; try {   QRequestContext ctx = getRequestContext(docName);   QRequest request = getJPEGRequest();   ctx.setRequest(ctx);   QContentData response = getService().processRequest(ctx);   System.out.println(response.getResponseURL()); } catch (QException ex) { // QuarkXPress Manager threw an QException and it is not // a runtime exception. QException object will be returned. System.out.println(ex.getServerErrorCode()); }

QXP Server Manager

The following topics are for people who want to enhance QuarkXPress Server Manager or integrate it with other software.

Please refer to http://localhost:8090/qxpsmdocs/apidocs/index.html for manager API documentation. (Note that the port number used to retrieve the API documentation is 8090 by default, but you should use whatever port number you specified when installing QuarkXPress Server Manager.)

QuarkXPress Server Manager was developed using interface-based programming and uses the Spring Framework to instantiate pluggable objects. When QuarkXPress Server Manager starts up, it reads the contents of a Spring context definition file named "ManagerContainerConfig.xml" and instantiates all of the beans listed in the file. QuarkXPress Server Manager then initializes by reading various configuration options from a file named "ManagerConfig.xml."

You can deploy QuarkXPress Server Manager in its own Tomcat container, in an external Tomcat container, or in a shared Spring context. For more information, see "Deploying QuarkXPress Server Manager" in the QuarkXPress Server ReadMe.

Using the Web interface

The topics below describe the features available via the QuarkXPress Server Web interface. The topics covered here include the following:

  • Render types are namespaces you can use to return a QuarkXPress project in a specified file format.

  • Render modifiers let you control which parts of a project are rendered and set the scale of the returned renderings.

  • Content modifiers let you alter the content and formatting of boxes in layouts without using the XML modify parameter.

  • XML modify lets you modify QuarkXPress projects using XML.

  • The xml namespace deconstructs a project according to the Modifier schema. The construct namespace lets you turn an XML representation of a QuarkXPress project back into a QuarkXPress project.

  • Administrative request handlers let you change the behavior of QuarkXPress Server.

QuarkXPress Server uses case-sensitive XML.

Understanding rendering

Rendering is the process in which QuarkXPress Server opens a QuarkXPress project, transforms it into a different format (the render type), and then sends a response to the requestor. Depending on the type of rendering operation, the response may be a message or a rendered file.

For information on how to submit a render request, see "Getting Started."

Alerts

Cannot open this document type. Please select a QuarkXPress document or template.

HTTP Error #500 This alert displays if you try to render a file that is not a QuarkXPress project.

File not found

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you try to render a project that does not exist.

I/O error trying to read or write to disk.

HTTP Error #500 QuarkXPress Server Error #–36 This alert displays if QuarkXPress Server is running on Windows and a shared network folder was selected as the document pool, but the folder is no longer shared. What to do: In the QuarkXPress Server administration interface, choose Administration > Preferences > General and set Document Root Folder to a shared folder.

Cannot find required volume or folder.

HTTP Error #404 QuarkXPress Server Error #–35 This alert displays if QuarkXPress Server is running on macOS and a shared network volume was selected as the document pool, but the volume is no longer shared. What to do: In the QuarkXPress Server administration interface, choose Administration > Preferences > General and set Document Root Folder to a shared folder.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/sample.qxp

Notes

There are two ways to specify a render format:1. Enter the render type directly in the browser address field:http://localhost:8080/pdf/project.qxp.2. In the QuarkXPress Server administration interface, choose Administration > Preferences > General and choose the default render type from the Default Renderer Type drop-down menu.

Understanding logging

If a request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the transaction ID, date, time, request type, project name, response type, response size in bytes, and client IP address. For example:

07/03/2011 14:37:47 - RequestURI = /xml/sample.qxp TransactionUUID = afb6f457-80ae-4d5d-a434-ce9f3e089761  Client = 10.91.30.216  Type = text/xml  Size = 4846

If an alert is displayed, an error message is written to the QuarkXPress Server transaction log file. The transaction entry contains the date and time of the request, the error code, and the error message. The following is a sample of an error log transaction entry:

09/03/2011 13:54:33 - RequestURI = /sample.qcd TransactionUUID = dffc3a7e-11fd-4d97-b3fe-8f2129353d58  Client = 10.91.30.216  Error #10120 - Cannot open this document type. Please select a QuarkXPress document or template.

The "QuarkXPress Server Log.log" file also contains system-level log information. For example, if a request makes a renderer stop working, you can figure out which request it was using the transaction ID and the transaction log.

09/03/2011 014:00:07 ERROR [com.quark.qxps.core.server.ServerRendererMonitor][pool-1-thread-1] - The QuarkXPress Server Renderer with processId 2620 had quit while processing the transaction 87212dae-6ba3-4b3f-97bb-ea8f0c255bf9.

To download all logs to a non-server computer, click Show Transaction Log in the QuarkXPress Server Web interface, then click Download Logs on the upper right.

Understanding render types

Render types are namespaces you can use to return a QuarkXPress project in a specified file format. The topics covered here include the following:

Function

Description

QuarkXPress Server Manager object model classes

appstudio

Returns a .zip file containing an App Studio article rendered from the App Studio layout(s) in the source project.

AppStudioRenderRequest

ave

Returns a .zip file containing an AVE issue file and its corresponding manifest.

AVERenderRequest

eps

Returns an EPS file.

EPSRenderRequest

epub

Returns an ePUB file.

EPubRenderRequest

jpeg

Returns a JPEG image.

JPEGRenderRequest

PDF

Returns a PDF file.

PDFRenderRequest

png

Returns a PNG image.

PNGRenderRequest

postscript

Returns a PostScript file.

PostScriptRenderRequest

qcddoc

Returns a QuarkCopyDesk article.

CopyDeskDocRequest

qxpdoc

Returns a QuarkXPress project file.

QuarkXPressRenderRequest

qxpr

Returns an RLE Raw Custom format image.

RLERawCustomRenderRequest

raw

Returns a project in a QuarkXPress internal format.

RawCustomRenderRequest

screenpdf

Returns a low-resolution PDF file.

ScreenPDFRenderRequest

swf

Returns a SWF file.

SWFRenderRequest

html5

Returns a .zip file containing HTML5 output.

HTML5RenderRequest

The default render type is JPEG.

Developers can implement additional rendering formats through server XTensions software.

appstudio

The appstudio render type returns a .zip file containing an App Studio article rendered from the App Studio layout(s) in the source project. It also includes mechanisms for uploading an article to the App Studio Publishing Portal, retrieving and updating server settings, and presenting and clearing App Studio Publishing Portal credentials.

 

Namespace

appstudio

Parameters

upload

String

Lets you generate an HTML5 article and upload it to the App Studio Publishing Portal. For example:http://localhost:8080/ appstudio/upload/template.qxp? organization=XXX& publication=YYY&issue=ZZZ& article=AAA

html

String

Lets you generate an HTML5 article and returns it as a .zip file. For example:http://localhost:8080/ appstudio/html/template.qxp

setcredential

String

Lets you log in to the App Studio Publishing Portal. For example:http://localhost:8080/ appstudio/setcredential? username=XXX&password=YYY

clearcredential

String

Lets you log out of the App Studio Publishing Portal. For example:http://localhost:8080/ appstudio/clearcredential

config

String

Lets you retrieve the current publication hierarchy from the App Studio Publishing Portal. For example:http://qxpserver:port/ appstudio/config

Render modifier parameters

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

page

Integer

Lets you specify a page.

pages

String (page range)

Lets you specify a range of pages.

Response

A .zip file containing an HTML5 article.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the box parameter.

Cannot open this document type. Please select a QuarkXPress document or template.

HTTP Error #10120This alert displays if you submit an appstudio request for a QuarkCopyDesk article.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/appstudio/sample.qxp

Example, object model

Request object name: AppStudioRenderRequest // STEP 1: Create the QuarkXPress Server Request // Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP 2 (SPECIFIC TO REQUESTS): // Create the App Studio renderer // request and embed it in the request context. AppstudioRenderRequest req = new AppstudioRenderRequest(); req.setAppStudioData(request.getParameter("AppStudioData")); requestCtx.setRequest(req); // STEP 3: Create the service and call the // processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx);

ave

The ave render type returns a .zip file containing an AVE issue file and its corresponding manifest.

Namespace

AVE

Parameters

outputstyle

stylename

Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localhost:8080/ave/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Export AVE for iPad dialog box, use document. For example:http://localhost:8080/ave/ sample.qxp?outputstyle=document

Render modifier parameters

format

String

Lets you specify an output format. Use avemag for AVE-Mag or avedoc for AVE-Doc. The default is avemag.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

page

Integer

Lets you specify a page.

pages

String (page range)

Lets you specify a range of pages.

Response

A .zip file containing an AVE issue file and its corresponding manifest.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the box parameter.

This Output Style does not exist.

This alert displays if you specify a nonexistent output style.

This Output Style cannot be used with this render type.

This alert displays if you specify an output style that is incompatible with this render type.

Cannot open this document type. Please select a QuarkXPress document or template.

HTTP Error #10120This alert displays if you submit an ave request for a QuarkCopyDesk article.

AVE-Doc for an App Studio layout is not supported.

HTTP Error #10545This alert displays if you submit an ave request with format=avedoc for an App Studio layout.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/ave/sample.qxp? format=avemag&layout=2

Example, object model

Request object name: AVERenderRequest //STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); //STEP 2(SPECIFIC TO REQUESTS): //Create the AVE renderer //request and embed it in the request context. AVERenderRequest avereq = new AVERenderRequest(); avereq.setAVEData(request.getParameter("AVEData")); avereq.setFormat(request.getParameter( "Format")); avereq.setLayout(request.getParameter( "Layout")); requestCtx.setRequest(avereq); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

Notes

The default AVE output style is used.

eps

The eps render type returns an EPS rendering of a page or spread.

Namespace

EPS

Parameters

outputstyle

stylename

Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localhost:8080/pdf/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example:http://localhost:8080/pdf/ sample.qxp?outputstyle=document

epsformat

color

Lets you specify an EPS format. The default value is color.

epspreview

tiff | none

Lets you include or omit a TIFF preview. The default value is tiff.

epsdata

ascii | binary | clean8bit

Lets you specify a data type for the EPS file. The default value is clean8bit.

epstransparent

1 | 0 | true | false | yes | no

Lets you specify whether the EPS can include transparent areas.

updateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

Render modifier parameters

page

Integer

Lets you specify a page.

produceblankpages

1 | 0 | true | false | yes | no

Lets you specify whether to render blank pages.

scale

Float  .1 to 6.92 for Windows  .1 to 8 on macOS

Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on macOS or 6.92 (692%) on Windows.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

downloadlayoutFonts

1 | 0 | true | false | yes | no

Lets you specify whether to download all fonts used in the layout and all system fonts.

downloadImportedPdfEpsFonts

1 | 0 | true | false | yes | no

Lets you specify whether to download all fonts required by imported PDF and EPS files.

Response

An EPS file.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the pages or box parameter.

This Output Style does not exist.

This alert displays if you specify a nonexistent output style.

This Output Style cannot be used with this render type.

This alert displays if you specify an output style that is incompatible with this render type.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/eps/sample.qxp?epsformat= color&epsdata=clean8bit&epspreview=tiff&epsbleed= 0&epstransparent=0

Example, object model

Request object name: EPSRenderRequest //STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); //STEP 2(SPECIFIC TO REQUESTS): //Create the EPS renderer //request and embed it in the request context. EPSRenderRequest epsreq = new EPSRenderRequest(); epsreq.setEPSData(request.getParameter("EPSData")); epsreq.setEPSFormat(request.getParameter( "EPSFormat")); epsreq.setEPSPreview(request.getParameter( "EPSPreview")); requestCtx.setRequest(epsreq); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

Notes

You can specify an output style and set additional local parameters of that output style. For example, if no bleed setting is specified in the output style named "mystylename", you can specify a bleed setting with a URL like the following:http://localhost:8080/eps/sample.qxp? outputstyle=mystylename?bleed=symmetric You can override settings in an output style. For example, if an asymmetric bleed is specified in the output style named "mystylename," you could override it with the same URL.If you do not specify an EPS output style, the default EPS output style is used.

epub

The epub render type returns an ePUB rendering of a layout.

Namespace

ePUB

Render modifier parameters

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

outputstyle

String

Lets you specify an ePUB output style by name or ID.

Response

An ePUB (.epub) file.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the pages or box parameter.

ePub not created. There is no reflow layout in the document.

HTTP Error #10543This error appears if there is no reflow layout.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/epub/sample.qxp? outputstyle=epub1&layout=2

Example, object model

Request object name: EPubRenderRequest //STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); //STEP 2(SPECIFIC TO REQUESTS): //Create the ePUB renderer //request and embed it in the request context. EPubRenderRequest epubreq = new EPubRenderRequest(); epubreq.setEPubData(request.getParameter("EPubData")); epubreq.setCreateTOC(request.getParameter( "CreateTOC")); epubreq.setLayout(request.getParameter( "Layout")); requestCtx.setRequest(epubreq); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

Notes

You can only create an ePUB file from a project that includes a reflow article.

jpeg

The jpeg render type returns a JPEG rendering of a page or spread.

Namespace

JPEG

Parameters

jpegquality

1 | 2 | 3 | 4  

Lets you specify the image quality of a rendered JPEG image. The valid values are: 1 (highest quality), 2 (high quality), 3 (medium quality), and 4 (lowest quality). The default value is 1.

upadateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

pasteboard

true | false

Lets you specify whether to display pasteboard items. Works only with spread parameter. The default value is true. For example:http://localhost:8080/jpeg/document.qxp? spread=1&pasteboard=true

showboxoutline

true | false

Lets you specify whether to include bounding box outlines in the response JPEG image even if the boxes have no content.. The default value is false.

download

true | false

Renders the images in a Zip package for download.

pages

true | false

Lets you specify a range of pages for request. (5-8,1-3 etc.)

Render modifier parameters

boxes

String

Lets you request multiple boxes.

page

Integer

Lets you request a single page.

scale

Float  .1 to 6.92 for Windows  .1 to 8 on macOS)

Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on macOS or 6.92 (692%) on Windows.

box

String

Lets you request a single box.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

Response

A JPEG file.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/jpeg/sample.qxp?jpegquality=1

Example, object model

Request object name: JPEGRenderRequest // STEP1: Create the QuarkXPress Server Request // Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP2: Create the JPEG renderer request and attach it // to the request context. JPEGRenderRequest jpreq = new JPEGRenderRequest(); jpreq.setJPEGQuality(request.getParameter("jpegQuality")); jpreq.setLayout(request.getParameter("Layout")); requestCtx.setRequest(jpreq); // STEP3: Create the service and // call the processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

kindle

The kindle render type returns a rendering of a layout that can be viewed on Amazon Kindle readers.

Namespace

kindle

Render modifier parameters

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

outputstyle

String

Lets you specify a Kindle output style by name or ID.

Response

A Kindle (.mobi) file.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the pages or box parameter.

Kindle not created. There is no reflow layout in the document.

HTTP Error #10543This error appears if there is no reflow layout.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/kindle/sample.qxp? outputstyle=kindle&layout=2

Example, object model

Request object name: KindleRenderRequest //STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); //STEP 2(SPECIFIC TO REQUESTS): //Create the Kindle renderer //request and embed it in the request context. KindleRenderRequest kindlereq = new KindleRenderRequest(); kindlereq.setKindleData(request.getParameter("KindleData")); kindlereq.setCreateTOC(request.getParameter( "CreateTOC")); kindlereq.setLayout(request.getParameter( "Layout")); requestCtx.setRequest(kindlereq); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

Notes

You can only create a Kindle file from a project that includes a reflow article.

literal

The literal render type returns the contents of a file without any attempt to process it as a template. Depending on the file's MIME type, the requested project can be displayed within the browser (for example, if the response is a JPEG file) or saved to disk (for example, if the response is a Microsoft Word document).

Namespace

literal

Response

The requested file returned in the HTTP response.

Alerts

Incorrect administration realm username and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password.What to do: Use the user name and password set in the Authentication pane of the General Preferences dialog box (Administration > Preferences > General) in the QuarkXPress Server Web interface.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/literal/Story.doc

Example, object model

Request object name: LiteralRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(""))  rc.documentName = this.DocumentSettings1.documentName.Text; rc.request = new LiteralRequest();   //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

pdf

The pdf render type returns a PDF rendering of a project.

Namespace

PDF

Parameters

outputstyle

stylename, document

Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localhost:8080/pdf/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Export as PDF dialog box, use document. For example:http://localhost:8080/pdf/ sample.qxp?outputstyle=document

title

String

Lets you specify the title of the PDF file.

subject

String

Lets you specify the subject of the PDF file.

author

String

Lets you specify the author of the PDF file.

keywords

String

Lets you specify keywords for the PDF file.

includehyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to include hyperlinks in the PDF file.

exportlistsashyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to export lists as hyperlinks. To use this parameter, you must set includehyperlinks to true.

exportindexesashyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to export the index as hyperlinks. To use this parameter, you must set includehyperlinks to true.

exportlistsasbookmarks

1 | 0 | true | false | yes | no

Lets you specify whether to export lists as bookmarks. To use this parameter, you must set includehyperlinks to true.

mode

composite or separations

Lets you specify whether the PDF file is a composite or includes separations.

printcolors

cmyk, rgb, grayscale, cmykandspot, asis

Lets you specify the color space of the PDF file. This option is available only when mode is set to composite.

plates

inripseps

Lets you specify a separation method. This option is available only when mode is set to separations.

produceblankpages

1 | 0 | true | false | yes | no

Lets you specify whether to include blank pages. This option is available only when mode is set to composite.

useopi

1 | 0 | true | false | yes | no

Lets you specify whether to use OPI.

images

includeimages, omittiff, omittiffandeps

Lets you specify whether to include TIFF and EPS images from an OPI server.

registration

off, centered, offcenter

Lets you include, omit, and configure registration marks.

offset

0–30 (in points)

Lets you specify the offset of registration marks.

bleed

pageitemsonly, symmetric

Lets you specify a bleed type.

offsetbleed

0–6 (in inches)

Lets you specify a bleed offset to use. This option is available only when bleed is set to symmetric.

spreads

1 | 0 | true | false | yes | no

Lets you specify whether to output spreads.

lowresolution

1 | 0 | true | false | yes | no

Lets you request a low-resolution (36 dpi) PDF.

colorimagedownsample

9–2400

Lets you specify the resolution of color images.

grayscaleimagedownsample

9–2400

Lets you specify the resolution of grayscale images.

monochromeimagedownsample

9–2400

Lets you specify the resolution of monochrome images.

colorcompression

true | false

Lets you specify whether medium-quality manual JPEG compression should be applied to color images.

grayscalecompression

true | false

Lets you specify whether medium-quality manual JPEG compression should be applied to grayscale images.

monochromecompression

true | false

Lets you specify whether ZIP compression should be applied to monochrome images.

pdffile

String

Lets you specify the PDF name. This option is available only when PDF to Folder is selected in QuarkXPress Server PDF preferences.

psfile

String

Lets you specify the PostScript file name. This option is available only when PostScript for later Distilling is selected in QuarkXPress Server PDF preferences.

thumbnail

bw | color

Lets you embed a thumbnail in the PDF file.

mode

composite | separations

Lets you specify the PDF file's color mode.

fontdownload

yes | no

Lets you turn font download on or off. You cannot specify which fonts are downloaded.

layers

String

Lets you specify which layers should be included, as a comma-separated list.

verification

pdfx1a | pdfx3

Lets you use PDF/X–1a or PDF/X–3 verification.

separate

yes | no

Lets you specify whether to output each page as a separate file.

produceblankplates

yes | no

Lets you specify whether to include blank plates.

download

1 | 0 | true | false

When download is true, the browser always displays a dialog box that lets the end user save the returned file, even if the browser can display it.When download is false, the browser attempts to display the returned file. If the browser cannot display the file, it lets the end user save the returned file. The default value is false.

layoutstart

1 | 0 | true | false | yes | no

Lets you specify the number of the first layout to render when you render multiple layouts as separate PDF files. PDF files are saved at the location specified in QuarkXPress Server preferences (Administration > Preference > General > Server > Document Root Folder). The first layout in a project is layout 0. For example:http://localhost:8080/pdf/multilayout.qxp? layoutstart=0&layoutend=3

layoutend

Integer

Lets you specify the number of the last layout to render when you render multiple layouts as separate PDF files. PDF files are saved at the location specified in QuarkXPress Server preferences (Administration > Preference > General > Server > Document Root Folder). The first layout in a project is layout 0. For example:http://localhost:8080/pdf/multilayout.qxp? layoutstart=0&layoutend=3

updateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

Render modifier parameters

page

Integer

Lets you specify a single page.

pages

String (page range)

Lets you specify a range of pages.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

spreads

Boolean 1 | 0 | true | false | yes | no

Lets you specify that the output use spreads.

Response

A PDF file.

Alerts

This page range is invalid

HTTP Error #500QuarkXPress Server Error #147This alert displays if you try to render an invalid page range.

No file produced. The project requested contains only blank pages.

HTTP Error #500This alert displays if you try to render a a project that contains only blank pages.

This Output Style does not exist.

This alert displays if you specify a nonexistent output style.

This Output Style cannot be used with this render type.

This alert displays if you specify an output style that is incompatible with this render type.

Logs

See "Understanding logging."

Example, GET URL

This URL renders "sample.qxp" as a PDF with a symmetric bleed: http://localhost:8080/pdf/sample.qxp? bleed=symmetric&offsetbleed=2 This URL renders a PDF in which color images are downsampled to a resolution of 300 dpi and manual medium-quality JPEG compression is applied: http://localhost:8080/pdf/sample.qxp? colorimagedownsample=300&colorcompression=true

Example, object model

Request object name: PDFRenderRequest // STEP1: Create the QuarkXPress Server Request Context // and set the nescessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP 2(SPECIFIC TO REQUESTS): // Create the PDF renderer request // and embed it in the request context. PDFRenderRequest pdfreq = new PDFRenderRequest(); pdfreq.setAuthor(request.getParameter("Author")); pdfreq.setTitle(request.getParameter("Title")); pdfreq.setLayout(request.getParameter("Layout")); pdfreq.setSpread(request.getParameter("Spread")); pdfreq.setPage(request.getParameter("mPage")); pdfreq.setPages(request.getParameter("Pages")); if( strLowResolution !=null && strLowResolution.equals("True"))     pdfreq.setLowResolution("true"); requestCtx.setRequest(pdfreq); // STEP3: Create the service and // call the processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx); For more information about the object model, see the samples.

Notes

There are three ways to generate PDF files with QuarkXPress Server. You can generate a PDF file in QuarkXPress Server and return it to the end user, generate the PDF in QuarkXPress server and save it to a folder on the server computer, or generate a PostScript file for later distilling and save it to a folder on the server computer. To choose one of these output methods in QuarkXPress Server, choose Administration > Preferences > Renderer > PDF) and then click DirectPDF, PDFtoFolder, or PS4D (PostScript for Later Distilling). If you choose either of the last two options, click Browse and navigate to the target folder, then choose an option from the Default Name drop-down menu.You can specify an output style and set additional local parameters of that output style. For example, if no bleed setting is specified in the output style named "mystylename", you can specify a bleed setting with a URL like the following:http://localhost:8080/pdf/sample.qxp? outputstyle=mystylename&bleed=symmetric You can override settings in an output style. For example, if an asymmetric bleed is specified in the output style named "mystylename," you could override it with the same URL. If you do not specify a PDF output style, the default PDF output style is used. The default PD output style is Screen - Low Quality/Low Resolution.You can still obtain a high resolution PDF by specifying the output style. Output style names are case-sensitive and should be precise. The following will return a list of output styles from the server: http://<server><port>/getserverinfo <OUTPUTSTYLES> <OUTPUTSTYLE TYPE = "PDF">Default PDF Output Style</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">Press - High Quality/High Resolution</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">Print - Medium Quality/Medium Resolution</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">Screen - Medium Quality/Low Resolution</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">Screen - Low Quality/Low Resolution</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">PDF/X-3:2002</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">PDF/X-1a:2001</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "Print">Default Print Output Style</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "EPS">Default EPS Output Style</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "ePub">Default ePub Output Style</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "Kindle">Default Kindle Output Style</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "PDF">Default PDF For AVE</OUTPUTSTYLE> <OUTPUTSTYLE TYPE = "AVE">Default AVE Output Style</OUTPUTSTYLE> </OUTPUTSTYLES >

png

The png render type returns a PNG rendering of a page or spread.

Namespace

PNG

Parameters

pngcompression

1 | 2 | 3 | 4

Lets you specify the compression of a PNG response. The valid values are: 1 (lowest compression), 2 (medium compression), 3 (high compression), and 4 (highest compression). The default value is 1.

transparentpng

true | false

Lets you specify whether to generate a PNG file that uses transparency.

upadateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

Render modifier parameters

boxes

String

Lets you request multiple boxes.

page

Integer

Lets you specify a single page.

scale

Float  .1 to 6.92 for Windows  .1 to 8 on macOS

Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on macOSmacOSor 6.92 (692%) on Windows.

box

String

Lets you request a single box.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

Response

A PNG file.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/png/sample.qxp?pngcompression=1

Example, object model

Request object name: PNGRenderRequest // STEP1: Create the QuarkXPress Server Request // Context and set the nescessary properties com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; rc.setDocumentName(docName); // STEP 2(SPECIFIC TO REQUESTS):Create the PNG renderer // request and embed it in the request context. PNGRenderRequest pngreq = new PNGRenderRequest(); pngreq.setPNGCompression(request.getParameter( "PNGCompression")); pngreq.setLayout(request.getParameter("Layout")); pngreq.setSpread(request.getParameter("Spread")); pngreq.setPage(request.getParameter("mPage")); rc.setRequest(pngreq); // STEP3: Create the service and // call the processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(rc);

postscript

The postscript render type returns a PostScript rendering of a project.

Namespace

PostScript

Parameters

prntbleed

Page | asym, clip<Boolean>, top<float>, bottom<float>, left<float>, right<float> | sym, clip<Boolean>, amount<float>

Lets you specify bleed values for a page.To specify an asymmetric bleed, use the following format:prntbleed=asym,clip,top,bottom, left, rightThe clip value is Boolean (yes/no). The top, bottom, left, and right values are float values. For example:http://localhost:8080/ postscript/Sample.qxp? prntbleed=asym,true,1,2,2,1 The above example results in an asymmetric bleed of 1 on the top, 2 on the bottom, 2 on the left, and 1 on the right. To specify a symmetric bleed, use the following format:prntbleed=sym,clip,amount The clip value is Boolean (yes/no). The amount value is a float value. For example:http://localhost:8080/ postscript/Sample.qxp? prntbleed=sym,true,1 The above example results in a symmetric bleed of 1 on all sides. Default: prntbleed=sym,yes,0

outputstyle

stylename, document

Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localhost:8080/ postscript/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example:http://localhost:8080/ postscript/ sample.qxp?outputstyle=document

updateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

Render modifier parameters

page

Integer

Lets you specify a single page.

pages

String (page range)

Lets you specify a range of pages.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

Response

A PostScript file.

Alerts

This page range is invalid.

HTTP Error #500 QuarkXPress Server Error #147 This alert displays if you try to render an invalid page range.

No file produced. The document requested contains only blank pages.

HTTP Error #500 This alert displays if you try to render a a project that contains only blank pages.

PostScript printer mapped to file not found

HTTP Error #500 This alert displays if the PostScript printer or driver is not set to Print to File.

This Output Style does not exist.

This alert displays if you specify a nonexistent output style.

This Output Style cannot be used with this render type.

This alert displays if you specify an output style that is incompatible with this render type.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/postscript/Sample.qxp

Example, object model

Request object name: PostScriptRenderRequest // STEP1: Create the QuarkXPress Server Request // Context and set the nescessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP 2(SPECIFIC TO REQUESTS): // Create the Post Script renderer // request and embed it in the request context. PostScriptRenderRequest pscreq = new PostScriptRenderRequest(); pscreq.setPrintBleed(request.getParameter("PrintBleed")); pscreq.setPrintPPD(request.getParameter("PrintPPD")); pscreq.setPages(request.getParameter("Pages")); requestCtx.setRequest(pscreq); // STEP3: Create the service and call the // processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

Notes

To create a PostScript file, you must have a PostScript driver on the server computer.You can specify an output style and set additional local parameters of that output style. For example, if no bleed setting is specified in the output style named "mystylename", you can specify a bleed setting with a URL like the following:http://localhost:8080/eps/sample.qxp? outputstyle=mystylename&bleed=symmetric You can override settings in an output style. For example, if an asymmetric bleed is specified in the output style named "mystylename," you could override it with the same URL.If you do not specify a PostScript-compatible output style, the default PostScript-compatible output style is used.

qcddoc

The qcddoc render type returns a QuarkCopyDesk article.

Namespace

qcddoc

Parameters  

article

 String

Lets you specify which article in a project to render. For example:http://localhost:8080/qcddoc/ abc.qxp?article=article1

component

 String

Lets you specify which component in an article to render. For example:http://localhost:8080/copydesk/ abc.qcd?component=comp1

format

lightweight | fullfeatured  

Lets you render an article in lightweight or full-featured format. For example:http://localhost:8080/qcddoc/ abc.qxp?article=article1& format=fullfeatured

saveastemplate

true | false

Lets you save a copy of an article that was created in QuarkCopyDesk as a template. The default value is true. For example:http://QXPServer8:8080/saveas/ qcddoc/article.qcd?saveastemplate=trueYou can also use this parameter to save a copy of a template as an article. For example:http://QXPServer8:8080/saveas/ qcddoc/template.qct?saveastemplate=false

includepagepicture

true | false | 1 | 0

Lets you include a page picture when you export an article from a QuarkXPress layout. Valid options are:picformat (embedded or separate)quality (blackandwhite or color)picdpi (72, 144, or 200)spreadrange (all or first)For example:http://localhost:8080/saveas/qcddoc/ 4.qxp?includepagepicture=1& quality=blackandwhite&picdpi=144& spreadrange=firsthttp://localhost:8080/saveas/qcddoc/ PagePicture.qxp?includepagepicture=true

Render modifier parameters

modify

XML

Lets you modify the article with XML. For more information, see "XML modify."

Response

A QuarkCopyDesk article.

Alerts

There is no box with the specified identifier.

This alert displays if the box corresoponding to a referenced component does not exist.

The number of characters in the article name can't be greater than max limit.

This alert displays if an article name is longer than 32 characters.

The article/component name is not unique.

This alert displays if you create or change the name of an article or component so that it is the same as the name of an existing article or component.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/qcddoc/copydesk/sample.qcd

Example, object model

Request object name: CopyDeskDocRequest

qxpdoc

The qxpdoc render type returns a QuarkXPress project.

Namespace

qxpdoc

Parameters

qxpdocver

8 | 9

Indicates the QuarkXPress version format to use. For example:http://localhost:8080/qxpdoc/ construct/project1.qxp?qxpdocver=8

upadateimage

true | false

Lets you specify whether to return modified pictures in the response or not. If set to false, modified pictures are not returned. If set to true, modified pictures are returned. The default value is true.

saveastemplate

true | false

Lets you save a copy of a project as a template. The default value is true. For example:http://localhost:8080/saveas/ qxpdoc/project.qxp?saveastemplate=trueYou can also use this parameter to save a copy of a template as a project. For example:http://localhost:8080/saveas/ qxpdoc/template.qpt?saveastemplate=false

Render modifier parameters

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

Response

A QuarkXPress project.

Alerts

QuarkXPress document return is disabled.

HTTP Error #500 This alert displays if Disable QXD Return is checked in the QuarkXPress Server administration interface (Administration > Preferences > General > Server).

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a qxpdoc render request with the page, pages, box, or spread parameter.

Cannot save a QuarkXPress Project down to an earlier version.

HTTP Error #500 This alert displays if you attempt to save a QuarkXPress 6.x project to an earlier version of QuarkXPress with the qxpdocver parameter.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/qxpdoc/sample.qxp

Example, object model

Request object name: QuarkXPressRenderRequest // STEP1: Create the QuarkXPress Server Request // Context and set the nescessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP 2(SPECIFIC TO REQUESTS):Create the QuarkXPress // renderer request and embed it in the request context. QuarkXPressRenderRequest qxpreq = new QuarkXPressRenderRequest(); qxpreq.setDocumentVersion(request.getParameter( "XpressDocVersion")); qxpreq.setLayout(request.getParameter("Layout")); requestCtx.setRequest(qxpreq); // STEP3: Create the service and call the processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data =  service.processRequest(requestCtx);

screenpdf

The screenpdf render type returns a low-resolution PDF rendering of a project. This render type overrides the PDF Workflow setting in the QuarkXPress Server administration interface (Administration > Preferences > Renderer > PDF) and always sends the PDF file to the browser.

Namespace

Screenpdf

Parameters

outputstyle

stylename

Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localhost:8080/screenpdf/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example:http://localhost:8080/screenpdf/ sample.qxp?outputstyle=document

title

String

Lets you specify the title of the PDF file.

subject

String

Lets you specify the subject of the PDF file.

author

String

Lets you specify the author of the PDF file.

keywords

String

Lets you specify keywords of the PDF file.

includehyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to include hyperlinks in the PDF file.

exportlistsashyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to export lists as hyperlinks. To use this parameter, you must set includehyperlinks to true.

exportindexesashyperlinks

1 | 0 | true | false | yes | no

Lets you specify whether to export the index as hyperlinks. To use this parameter, you must set includehyperlinks to true.

exportlistsasbookmarks

1 | 0 | true | false | yes | no

Lets you specify whether to export lists as bookmarks. To use this parameter, you must set includehyperlinks to true.

mode

composite or separations

Lets you specify whether the PDF file is a composite or includes separations.

printcolors

cmyk, rgb, grayscale, cmykandspot, asis

Lets you specify the color space of the PDF file. This option is available only when mode is set to composite.

plates

inripseps

Lets you specify a separation method. This option is available only when mode is set to separations.

produceblankpages

1 | 0 | true | false | yes | no

Lets you specify whether to include blank pages. This option is available only when mode is set to composite.

useopi

1 | 0 | true | false | yes | no

Lets you specify whether to use OPI.

images

includeimages, omittiff, omittiffandeps

Lets you specify whether to include TIFF and EPS images from an OPI server.

registration

off, centered, offcenter

Lets you include, omit, and configure registration marks.

offset

0–30 (in points)

Lets you specify the offset of registration marks.

bleed

pageitemsonly, symmetric

Lets you specify a bleed type.

offsetbleed

0–6 (in inches)

Lets you specify a bleed offset to use. This option is available only when bleed is set to symmetric.

spreads

1 | 0 | true | false | yes | no

Lets you specify whether to output spreads.

lowresolution

1 | 0 | true | false | yes | no

Lets you request a low-resolution (36 dpi) PDF.

colorimagedownsample

9–2400

Lets you specify the resolution of color images.

grayscaleimagedownsample

9–2400

Lets you specify the resolution of grayscale images.

monochromeimagedownsample

9–2400

Lets you specify the resolution of monochrome images.

colorcompression

true | false

Lets you specify whether medium-quality manual JPEG compression should be applied to color images.

grayscalecompression

true | false

Lets you specify whether medium-quality manual JPEG compression should be applied to grayscale images.

monochromecompression

true | false

Lets you specify whether ZIP compression should be applied to monochrome images.

pdffile

String

Lets you specify the PDF name. This option is available only when PDF to Folder is selected in QuarkXPress Server PDF preferences.

psfile

String

Lets you specify the PostScript file name. This option is available only when PostScript for later Distilling is selected in QuarkXPress Server PDF preferences.

thumbnail

bw | color

Lets you embed a thumbnail in the PDF file.

mode

composite | separations

Lets you specify the PDF file's color mode.

fontdownload

yes | no

Lets you turn font download on or off. You cannot specify which fonts are downloaded.

layers

String

Lets you specify which layers should be included, as a comma-separated list.

transparencyres

Integer value from 36 to 3600

Lets you specify the resolution for flattened content.

verification

pdfx1a | pdfx3

Lets you use PDF/X–1a or PDF/X–3 verification.

separate

yes | no

Lets you specify whether to output each page as a separate file.

produceblankplates

yes | no

Lets you specify whether to include blank plates.

updateimage

true | false

Lets you specify whether to update imported pictures.

updateflow

true | false

Lets you specify whether to update the text flow version of a project to the current version.

Render modifier parameters

page

Integer

Lets you specify a single page.

pages

String (page range)

Lets you specify a range of pages.

spread

Integer

Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

spreads

Boolean (1 | 0 | true | false | yes | no)

Lets you specify that the output use spreads.

Response

A screen-resolution PDF file

Alerts

This page range is invalid.

HTTP Error #500QuarkXPress Server Error #147This alert displays if you try to render an invalid page range.

No file produced. The document requested contains only blank pages.

HTTP Error #500This alert displays if you try to render a a project that contains only blank pages.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/screenpdf/sample.qxp? colorimagedownsample=72&colorcompression=0

Example, object model

Request object name: ScreenPDFRenderRequest // STEP1: Create the QuarkXPress Server Request Context // and set the nescessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); String docName = request.getParameter("documentName") ;   requestCtx.setDocumentName(docName);   // STEP 2(SPECIFIC TO REQUESTS): // Create the QuarkXPress renderer // request and embed it in the request context.   ScreenPDFRenderRequest screenpdfRequest = new ScreenPDFRenderRequest(); screenpdfRequest.setColorImageDownSample( request.getParameter("ColorImageDownSample")); screenpdfRequest.setCompression(request.getParameter( "Compression")); requestCtx.setRequest(screenpdfRequest);   // STEP3: Create the service and // call the processRequest() API   RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx);

html5

To Export as responsive HTML5 publication(Multi Device Output): 

  • Create/Duplicate different layouts in a QXP project where each layout corresponds to a digital device/orientation.

  • Optionally create an HTML5 output style.

  • Optionally specify a name for the section to be exported as a Table of Contents.

  • While exporting as HTML5 Publication, select layouts to be included in the publication and select the HTML5 output style to be applied.

To Create Multiple Layouts in a QXP Project,one for each device/orientation please refer to the "HTML5 Publication output styles" section in 'A Guide to QuarkXPress 2017' , found here: "http://files.quark.com/download/documentation/QuarkXPress/2017/English/QXP-2017-User-Guide-EN.pdf"   

The html5 render type returns a .zip file containing HTML5 output.

Modifier XML Markup: 

Use the Markup for the respective layout type ( iPad(V), iPhone5 (V), iPhone6 (V), Android (V)) as shownin the following figure:

HTML5 Modifier XML Markup

The following table pertains to HTML5 publications:

Namespace

html5

Parameters

html

String

Lets you generate an HTML5 article and returns it as a .zip file. For example:http://localhost:8080/ appstudio/html/template.qxp

Render modifier parameters

layout

String

Lets you specify a layout by name or ID. The first layout is Layout 1.

page

Integer

Lets you specify a page.

pages

String (page range)

Lets you specify a range of pages.

Response

A .zip file containing an HTML5 article.

Alerts

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you submit a render request with the box parameter.

Cannot open this document type. Please select a QuarkXPress document or template.

HTTP Error #10120 This alert displays if you submit an appstudio request for a QuarkCopyDesk article.

Logs

See "Understanding logging."

URL Request to export as HTML5 Multi Device Output

http://<QXPS Server>:<port>/html5/<QXP Template>.qxp?modify=file:<Modifier File>&layouts=iPad (V),iPad (H),iPhone5 (V),iPhone5 (H)

Example, object model

Request object name: html5RenderRequest

If you want to use a custom HTML5 output style, then it must be specified in the URL request: http://<QXPS Server>:<port>/html5/<QXP Template>?modify=file:<Modifier File>&layouts=iPad (V),iPad (H),iPhone5 (V),iPhone5 (H)&outputstyle=<MyHTML5Style>

Understanding render modifiers

Render modifiers let you control which parts of a project are rendered and set the scale of the returned renderings. The topics covered here include the following:

Property

Description

box

The box render modifier lets you render a single box.

boxes

The boxes render modifier lets you render multiple boxes.

layer

The layer render modifier lets you show and hide layers prior to rendering. This render modifier also lets you add and remove layers from a project on the server.

layout

The layout render modifier lets you render a particular layout.

movepages

The movepages render modifier lets you move pages prior to rendering.

page

The page render modifier lets you render a single page.

pages

The pages render modifier lets you render multiple pages.

scale

The scale render modifier lets you specify the scale at which content is rendered.

spread

The spread render modifier lets you render a single spread.

spreads

The spreads render modifier lets you render multiple spreads.

Additional render-type-specific parameters are listed on each render type's page.

In the QuarkXPress Server Manager API, render modifiers are properties of render request classes.

Render modifier names are not case-sensitive.

annotateerrors

The annotateerrors render modifier lets you include descriptions of rendering errors as notes in the layout itself. In rendered QuarkXPress files, errors are displayed as notes. In rendered PDFs, errors are displayed as comments. In XML output, errors are displayed as notes XML markup.

Parameters

annotateerrors

String

Includes descriptions of rendering errors as notes in the layout.

Compatible with

pdf, qxpdoc, xml, postscript

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/png/sample.qxp?box=annotateerrors

Notes

Descriptions of rendering errors are formatted with the default character style sheet.

appenderrors

The appenderrors render modifier lets you include descriptions of rendering errors after the last page in the layout. Descriptions of rendering errors are formatted in 10-point magenta Arial.

Parameters

appenderrors

String

Includes descriptions of rendering errors after the last page in the layout.

Compatible with

pdf, qxpdoc, xml, postscript

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/png/sample.qxp?box=appenderrors

Notes

Descriptions of rendering errors are formatted in 10-point magenta Arial.

box

The box render modifier lets you render a single box.

Parameters

box

String

Lets you specify which box to render.

overlap

String

Lets you specify whether to show the area overlapped by the specified box.

Compatible with

jpeg, png, raw

Alerts

There is no box with the specified identifier.

HTTP Error #500 This alert displays if you request a box that does not exist.

Cannot render box. The box must be within the page boundaries.

HTTP Error #500 This alert displays if you request a box that is outside the page boundary.

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you try to use the box parameter with the eps, pdf, or qxpdoc render types.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/png/sample.qxp?box=pictbox

Notes

To render a box in a particular layout, use a URL like the following:http://localhost:8080/png/sample.qxp? layout=2&page=3&box=textboxWhen you render using the box parameter, the box ID has a higher priority than the box name.

boxes

The boxes render modifier lets you render multiple boxes.

Parameters

boxes

String

Lets you specify which boxes to render.

overlap

String

Lets you specify whether to show the area overlapped by the specified boxes.

Compatible with

jpeg, png, raw

Alerts

There is no box with the specified identifier.

HTTP Error #500 This alert displays if you request a box that does not exist.

Cannot render box. The box must be within the page boundaries.

HTTP Error #500 This alert displays if you request a box that is outside the page boundary. .

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you try to use the boxes parameter with the eps, pdf, or qxpdoc render types.

Logs

See "Understanding logging."

Example GET URL

http://server:port/jpeg/doc.qxp?boxes=box1,box2

Notes

To render boxes in a particular layout, use a URL like the following:http://localhost:8080/png/sample.qxp? layout=2&page=3&box=textboxWhen you render using the box parameter, the box ID has a higher priority than the box name.

compositionzone

The compositionzone parameter lets you return an XML representation of one or more Composition Zones items.

Parameters

compositionzone

String

Lets you specify which Composition Zones item to return. For example:http://localhost:8080/xml/sample.qxp? compositionzone=czbox

compositionzones

String

Lets you specify which Composition Zones items to return. For example:http://localhost:8080/xml/sample.qxp? compoxitionzones=czbox1, czbox2

Compatible with

xml

Alerts

Invalid box given in Box Param.

Error #10401 This alert displays if you request a box that is not a Composition Zones item.

Logs

See "Understanding logging."

layer

The layer render modifier lets you show and hide layers prior to rendering. This render modifier also lets you add and remove layers from a project on the server.

Parameters

layer

String

Lets you specify which layer to render. You can specify multiple layer names in one request.

addlayer

String

Lets you add a new layer. You can add one layer per request.

deletelayer

String

Lets you delete a layer and the items on that layer. You can delete one layer per request.

alllayers

Boolean (1 | 0 | true | false | yes | no)

Lets you render every layer in the project, including hidden and suppressed layers.

layerattribute

String

Lets you modify the attributes of a layer. You can modify one layer per request.

name

String

Lets you specify a new name for a layer. You must use this parameter in conjunction with the layerattribute parameter.

visible

Boolean (1 | 0 | true | false | yes | no)

Lets you make a layer visible or invisible. You can use this parameter in conjunction with the addlayer and layerattribute parameters. This parameter overrides QuarkXPress layer visibility preferences.

suppressoutput

Boolean (1 | 0 | true | false | yes | no)

Lets you suppress or allow the output of a layer. You can use this parameter in conjunction with the addlayer and layerattribute parameters. This parameter overrides QuarkXPress suppress output preferences.

locked

Boolean (1 | 0 | true | false | yes | no)

Lets you lock or unlock a layer. You can use this parameter in conjunction with the addlayer and layerattribute parameters. This parameter overrides QuarkXPress layer locking preferences.

keeprunaround

Boolean (1 | 0 | true | false | yes | no)

Lets you set or change a layer's Keep Runaround setting. You can use this parameter in conjunction with the addlayer and layerattribute parameters. This parameter overrides QuarkXPress Keep Runaround preferences.

Compatible with

eps, jpeg, png, postscript, qcddoc, qxpdoc, raw, pdf, screenpdf, swf, xml

Alerts

This layer does not exist. Please verify the layer name.

HTTP Error #500 This alert displays if you specify an invalid layer name with the layer, layerattribute, or deletelayer parameter.

Specify a layer name.

HTTP Error #500 This alert displays if you do not specify a layer name with the layer, layerattribute, addlayer, or deletelayer parameter.

A layer with the same name already exists.

HTTP Error #500 This alert displays if you try to add a layer that already exists or change the name of a layer to a name is already used in the project.

Cannot change the name of the default layer.

HTTP Error #500 This alert displays if you try to change the name of the default layer.

Cannot delete the default layer.

HTTP Error #500 This alert displays if you try to delete the default layer.

Invalid parameter value.

HTTP Error #500 This alert displays if you do not specify additional attributes or specify attributes with invalid values in an addlayer or layerattribute request.

This layer has been locked and cannot be modified.

HTTP Error #500 This alert displays if you try to add or modify an item on a locked layer.

Logs

See "Understanding logging."

Example GET URL

To render a single layer, use a URL like the following:http://localhost:8080/doc.qxp?layer=layer1 To add a layer, use a URL like the following:http://localhost:8080/qxpdoc/doc.qxp?addlayer= NewLayer&visible=yes&suppressoutput=yes&locked=no To delete a layer, use a URL like the following: http://localhost:8080/qxpdoc/doc.qxp?deletelayer=Layer1 To render all layers in a project, use a URL like the following: http://localhost:8080/qxpdoc/doc.qxp?alllayers=true To set layer attributes, use a URL like the following:http://localhost:8080/qxpdoc/doc.qxp?layerattribute= Layer1&name=Layer2&visible=true&keeprunaround=true

Example, object model

To add a new layer to a project, use code like the following:Layer layer = new Layer(); layer.name = "New Layer"; layer.operation = "CREATE"; RGBColor rgbcolor = new RGBColor(); layer.RGBColor = rgbcolor; layout.layer = new Layer[]{layer};To edit the properties of an existing layer, use the following object hierarchy:ModifierRequest < Project < Layout < LayerTo delete a layer, set its operation attribute to "DELETE".

Notes

You cannot add, modify, or delete multiple layers in a single request.You cannot print layers whose visible and suppressoutput properties are set to false.You can render a hidden or suppressed layer by referencing it with the layer parameter. Suppressed layers are rendered for the jpeg, png, and qxpdoc render types, but not for the pdf, postscript, and eps render types.You can use the deconstruct and getdocinfo request handlers to view information about the layers in a project.When you add a layer using addlayer, any unspecified attributes use the settings in the QuarkXPress Server layer preferences (Administration > Preferences > Renderer > Layers).If the visible property is set to false, the suppressoutput property is automatically set to true.

layout

The layout render modifier lets you render a specific layout.

Parameters

layout

String

Lets you specify which layout to render. The first layout is layout 1.

Compatible with

eps, jpeg, png, postscript, raw, pdf, screenpdf

Alerts

The requested layout does not exist.

HTTP Error #500This alert displays if you supply an invalid layout value.

Logs

See "Understanding logging."

Example GET URL

To render a layout by its layer ID, use a URL like the following:http://localhost:8080/png/sample.qxp?layout=2 To render a layout by its name, use a URL like the following:http://localhost:8080/png/sample.qxp?layout=Layout 2

movepages

The movepages render modifier lets you move pages prior to rendering.

Parameters

movepages

String

Lets you specify which pages to move. You can use a single page number (for example, 2) or a range of pages with the starting and ending page numbers separated by a hyphen (for example, 2–5).

afterpage

String

Lets you specify the page after which the page or pages should be moved. To move pages to the beginning of a layout, use afterpage=start. To move pages to the end of a layout, use afterpage=end.

Compatible with

eps, jpeg, png, postscript, qcddoc, qxpdoc, raw, pdf, screenpdf, xml

Alerts

This page does not exist.

QuarkXPress Server Error #61

Invalid page range.

QuarkXPress Server Error #62

The specified page range cannot be moved there.

QuarkXPress Server Error #51

This page range is invalid.

QuarkXPress Server Error #146

Invalid parameter value.

QuarkXPress Server Error #10108

Logs

See "Understanding logging."

Example GET URL

To move pages 2–3 to after page 5, use a URL like the following:http://localhost:8080/abc.qxp?movepages=2–3&afterpage=5 To move page 7 to the beginning of a layout, use a URL like the following:http://localhost:8080/abc.qxp?movepages=7&afterpage= start

Example, object model

To move pages before rendering a layout, use code like the following:// STEP1: Create the QuarkXPress Server Request Context // and set the nescessary properties com.quark.qxpsm.QRequestContext requestCtx = new com.quark.qxpsm.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName); // STEP 2(SPECIFIC TO REQUESTS):Create the PDF // renderer request and embed it in the request context. the request context. PDFRenderRequest pdfreq = new PDFRenderRequest(); pdfreq.setMovePages("2-4"); pdfreq.setAfterPage("7"); requestCtx.setRequest(pdfreq); // STEP3: Create the service and call the // processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest( requestCtx);

Notes

The movepages operation executes only after all other modifications are complete. For example, if you use movepages in a modify request, the pages are moved only after the modify request is complete.

page

The page render modifier lets you render a single page.

Parameters

page

Integer

Lets you specify which page to render.

Compatible with

eps, jpeg, png, postscript, qcddoc, raw, pdf, screenpdf

Alerts

The requested page does not exist.

HTTP Error #500 This alert displays if you attempt to render a page that does not exist.

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you use a page parameter with the qxpdoc render type.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/png/sample.qxp?page=2

Example, object model

To add a new page to an existing spread in a project, use code like the following:Spread spread = new Spread(); Page page = new Page(); page.UID = "5"; page.operation = "CREATE"; spread.page = new Page[]{page}; To edit the properties of an existing page, use the following object hierarchy:ModifierRequest < Project < Layout < Spread < PageTo delete a page, set its operation attribute to "DELETE".

Notes

To render a page in a particular layout, use a URL like the following:http://localhost:8080/png/sample.qxp?layout=2&page=3

pages

The pages render modifier lets you render multiple pages. The pdf and postscript namespaces support this parameter.

Parameters

pages

String (page range)

Lets you specify which pages to render.

Compatible with

eps, jpeg, png, postscript, raw, pdf, screenpdf

Alerts

This page range is invalid.

HTTP Error #500 QuarkXPress Server Error #147 This alert displays if you try to render a page range that exceeds the number of pages in the project.

The renderer for this image type has no way of rendering the desired objects.

HTTP Error #406 This alert displays if you use the pages parameter with the jpeg, eps, png, or qxpdoc render type.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/pdf/sample.qxp?pages=2–4

Notes

To render pages in a particular layout, use a URL like the following:http://localhost:8080/pdf/sample.qxp?layout=2&pages=2,3

scale

The scale render modifier lets you specify the scale at which content is rendered.

Parameters

scale

Float

Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on macOS or 6.92 (692%) on Windows.

Compatible with

eps, jpeg, png, raw

Alerts

Invalid scale parameter.

HTTP Error #500 This alert displays if an invalid scale value is provided. What to do: Enter a valid scale value.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/png/sample.qxp?scale=2

spread

The spread render modifier lets you render a single spread.

Parameters

spread

Integer

Lets you specify which spread to render. Spread numbers start with 1. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.

Compatible with

eps, jpeg, png, postscript, raw, pdf, screenpdf

Alerts

The requested spread does not exist.

HTTP Error #500 This alert displays if you specify an invalid spread.

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/png/sample.qxp?spread=2

Example, Object Model

To add a spread to a project, use code like the following:Spread spread = new Spread(); spread.UID = "5"; spread.operation = "CREATE"; layout.spread = new Spread[]{spread};Spread is located at the following place in the object hierarchy:ModifierRequest < Project < Layout < SpreadTo delete a spread, set its operation attribute to "DELETE".

spreads

The spreads render modifier lets you render layouts in spreads mode, so that pages in spreads are rendered side-by-side rather than as individual pages.

Parameters

spreads

Boolean (1 | 0 | true | false | yes | no)

Lets you specify whether to render spreads (true) or individual pages (false).

Compatible with

eps, jpeg, png, postscript, raw, pdf, screenpdf

Logs

See "Understanding logging."

Example, GET URL

http://localhost:8080/pdf/sample.qxp?spreads=true

suppresserrors

The suppresserrors render modifier forces QuarkXPress Server to render as much of a layout as it can, despite any errors that occur.

Parameters

suppresserrors

String

Forces the layout to render despite any errors that may occur.

Compatible with

pdf, qxpdoc, xml, postscript

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/png/sample.qxp?box=suppresserrors

Using content modifiers

Content modifiers let you alter the content and formatting of boxes in layouts without using the XML modify parameter.

Inserting text

This topic explains how to import text into a box. Any existing text in the box is replaced.

Parameters

[box name]

String

The name of the target box.Specify the name and location of the imported file with the file: prefix. The imported file must be available to QuarkXPress Server.To import a file that is in a subfolder of the document pool on macOS, use a path like the following: file:subfolder:MyFile.extTo import a file that is in a subfolder of the document pool on Windows, use a path like the following: file:subfolder\MyFile.ext

Response

A preview of the project with the imported text.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if the imported file is not available to QuarkXPress Server.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/10/2005 10:32:57 — Error — Error Code: –43 — File not found.

Example, GET URL

http://localhost:8080/sample.qxp?Author=NewText http://localhost:8080/sample.qxp?TopStory=file:TopStory.doc

Example, object model

Request object name: RequestParameterscom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();;      if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   // STEP 2 (SPECIFIC TO REQUESTS):Create the Box Param // renderer request and embed it in RequestParameters request = new RequestParameters(); NameValueParam nameValue1 = new NameValueParam(); nameValue1.paramName = this.boxname1.Text; if(!this.boxvalue1.Text.Equals(""))  nameValue1.textValue = this.boxvalue1.Text;       request.params = new NameValueParam[]{nameValue1}; rc.request = request; // Create the service and // call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

Box names are case-sensitive.Use "&" to change the contents of multiple boxes in one request. The general URL for the multiple-box request is:http://localhost:8080/sample.qxp?text1= NewText1&text2=NewText2 where text1 and text2 are the names of the two different boxes.You can use "&" to change the contents of multiple boxes in one request. For example:http://localhost:8080/sample.qxp? Headline=headline.txt&Story=file:Story.docYou can import an XTags file generated by QuarkXPress.

Applying a font at import

This topic explains how to apply a font to a new text flow. When you use this method, QuarkXPress Server ignores the original font of the target text box and inserts the new text with the font specified by the parameter.

Parameters

fontname

String

The name of the font to be applied.

Response

A preview of the project with the font applied to the imported text.

Alerts

The specified font is not available.

This alert displays if you specify a font that is unavailable.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:12/2/2005 16:24:13 — project2.qxp — Type: image/jpeg — Size: 11380 — Client: 127.0.0.1If an error occurs, the error message is written to the QuarkXPress Server Error Log. The transaction entry in the error log contains the date and time of the request, the error code, and the error message. The following is a sample of an error transaction log entry:12/2/2005 16:16:26 — Error — Error Code: –43 — File not found.

Example, GET URL  

To apply Comic Sans MS to text in the box named "HeadBox," use a URL like the following:http://localhost:8080/png/sample.qxp?HeadBox=Headline&fontname=Comic Sans MS

Example, object model

Request object name: RequestParameterscom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName =  this.DocumentSettings1.documentName.Text; // STEP 2(SPECIFIC TO REQUESTS):Create the fontname // renderer request and embed it in RequestParameters request = new RequestParameters(); NameValueParam nameValue1 = new NameValueParam(); nameValue1.paramName = this.boxname.Text; if(!this.boxvalue1.Text.Equals(""))   nameValue1.textValue = this.fontname.Text; request.params = new NameValueParam[]{nameValue1}; rc.request = request; // Create the service and // call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Inserting a picture

This topic explains how to import a picture into an empty box or replace an existing picture with a new one.

Parameters

[box name[

String

The name of the target box.Specify the name and location of the imported file with the file: prefix. The imported file must be available to QuarkXPress Server.To import a file that is in a subfolder of the document pool on macOS, use a path like the following: file:subfolder:MyFile.extTo import a file that is in a subfolder of the document pool on Windows, use a path like the following: file:subfolder\MyFile.ext

Response

A preview of the project with the imported picture.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if the imported file is not available to QuarkXPress Server.

The specified file failed to load in the picture box.

HTTP Error #500 This alert displays if you attempt to import an invalid picture file.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert is displayed, an error message is written to the QuarkXPress Server error log. The following is a sample of the error log entry:8/10/2005 10:39:07 — Error — Error Code: 10339 — The specified file failed to load in the picture box.

Example, GET URL

http://localhost:8080/sample.qxp? PictureBox=file:FrenchOpen.pdf

Example, object model

Request object name: RequestParameterscom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; //STEP 2(SPECIFIC TO REQUESTS):Create the Box Param //renderer request and embed it in RequestParameters request = new RequestParameters(); NameValueParam nameValue1 = new NameValueParam(); nameValue1.paramName = this.boxname1.Text; if(!this.boxvalue1.Text.Equals(""))   nameValue1.textValue = this.boxvalue1.Text;            request.params = new NameValueParam[]{nameValue1}; rc.request = request; //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

Box names are case-sensitive.You can use "&" to change the contents of multiple boxes in one request. For example:http://localhost:8080/sample.qxp? Logo=file:logo.jpeg&TopPicture=file:TopPicture.eps

Saving a projects with a new name

The saveas content modifier lets you save modified QuarkXPress projects in any supported format to the document pool or to any network location accessible to QuarkXPress Server.

If you send a saveas request to QuarkXPress Server Manager using HTTP or the Web services interface while the common doc pool switch is set to off in the QuarkXPress Server Manager client, the file is saved to all registered QuarkXPress Server instances. If the common doc pool is enabled, the file can be saved to any one registered QuarkXPress server instance.

Parameters

newname

String

Lets you specify a name for the saved-as project.

path

String

Lets you specify a location for the saved-as project (other than the document pool).

savetopool

true | false

Lets you specify whether the project should be saved to the document pool.The default value for this paramter is true. However, if you specify a path value, the default value changes to false, which means if you want the project saved to the document pool, you must explicitly set savetopool to true.

replace

true | false

Lets you specify whether the saved project should replace a project with the same name. The default value is true.

Response

The message "Document successfully saved."

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you supply an incorrect file name or the file is not available to QuarkXPress Server.

Bad filename/ pathname.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you supply an incorrect file name or the file is not available to QuarkXPress Server.

The file path is invalid.

HTTP Error #500 This alert displays if you supply an invalid path parameter. What to do: Specify the correct file path with the path parameter.

The specified folder is Read-Only.

HTTP Error #500 This alert displays if you try to save a project to a folder with read-only access.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 11/16/2005 15:41:42 — saveas/5mb.qxp — Type: — Size: 28 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:11/16/2005 15:42:12 — Error — Error Code: 10371 — The file path is invalid.

Example, GET URL

To save a PDF file named "Customer1.pdf" in the folder HDD:temp and also in the document pool, use a URL like the following. Note that this URL will cause the saved-as file to replace any existing file with the same name.http://localhost:8080/saveas/pdf/sample.qxp? newname=Customer1&path=HDD:temp&savetopool=true

Example, object model

Request object name: SaveAsRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();      if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   // STEP 2 (SPECIFIC TO REQUESTS): // Create the Save as request and chain it to the document context SaveAsRequest saveasreq = new SaveAsRequest(); saveasreq.newName = this.newname.Text; if((this.path.Text != null) && (!this.path.Text.Equals("")))    saveasreq.newFilePath = this.path.Text; saveasreq.replaceFile = this.replace.Checked.ToString(); saveasreq.saveToPool = this.savetopool.Checked.ToString(); rc.request = saveasreq;   // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Importing XML with placeholders

This topic explains how to import XML data into boxes using QuarkXPress placeholders.

To use this feature, you must have a QuarkXPress project that has been set up with placeholders that correspond to the element types in a source XML file. For more information, see A Guide to XML Import.

Parameters

thexmldoc

XML

Lets you specify the XML file containing the data to import. The path can be absolute or relative to the location of the XML file. You can also supply XML as a string.

layout

String

Lets you specify which layout to render. The first layout is layout 1. You can also specify a layout by name.

paginate

XML

Lets you specify the XML file containing the data to import. The paginate parameter reates enough pages in the target layout to accommodate the records in the XML.This parameter works only with the pdf, postscript, and qxp render types. If you use it with any other render type, the server returns only the first page of the paginated layout.If you do not supply an XML string or file (for example: http://localhost:8080/pdf/Sample.qxp?paginate), QuarkXPress Server attempts to use the XML file that was associated with the layout in QuarkXPress.

Response

The layout with the imported XML.

Alerts

Invalid XML String

HTTP Error #500 This alert displays if you supply an invalid XML string in the thexmldoc parameter.

Logs

If the project is successfully rendered, a transaction success message is written to the QuarkXPress Server transaction log file. The transaction entry consists of the date and time of the request, the render type, the project name, the type of response produced by the server, the size of the response returned in bytes, and the client IP address. The following is a sample of a transaction entry: 8/5/2005 18:11:54 — sample.qxp — Type: image/jpeg — Size: 65982 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/9/2005 12:38:42 — Error — Error Code: 10396 — Invalid XML String.

Example, GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/Sample.qxp?thexmldoc=<?xml version="1.0"?> <BookReview><Book><Title>C:\Autumn.jpg</Title> <Author> Brian Kernighan and Dennis Ritchie</Author> </Book></BookReview> When QuarkXPress Server is running on macOS, use a URL like the following: http://localhost:8080/Sample.qxp?thexmldoc=<?xml version= "1.0"?> <BookReview><Book><Title>/Volumes/MacHD/Pictures/abc.tiff</ Title> <Author> Brian Kernighan and Dennis Ritchie</Author> </Book></BookReview>Alternatively, you can specify a path to a file containing the XML: http://localhost:8080/Sample.qxp?paginate= file:MacHD:Sample.xml

Example, object model

Request object names: XMLImportRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();      if(!this.DocumentSettings1. documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; // STEP 2 (SPECIFIC TO REQUESTS): Create the XML Import request XMLImportRequest xmlimportreq = new XMLImportRequest(); xmlimportreq.XMLDocument = this.thexmldoc.Text; rc.request = xmlimportreq; // STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request JPEGRenderRequest jpreq = new JPEGRenderRequest(); xmlimportreq.request = jpreq; // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Updating article geometry and content

This topic explains how to update the geometry and contents of a QuarkCopyDesk article using another article file or an article in a QuarkXPress project.

Parameter

updategeometry

String

If you use this parameter with updatefromfile, this lets you specify the file in which you want to update the geometry. If you use this parameter with updatetofile, this lets you specify the QuarkXPress project with which you want to update the geometry of an article.

updatecontent

String

Lets you specify the file in which you want to update the content. Can be used only with updatefromfile.

Response

WHAT DOES THIS RETURN?

Alerts

WHAT ERRORS APPLY?

 

Logs

If the project is successfully rendered, a transaction success message is written to the QuarkXPress Server transaction log file. The transaction entry consists of the date and time of the request, the render type, the project name, the type of response produced by the server, the size of the response returned in bytes, and the client IP address. The following is a sample of a transaction entry: 8/5/2005 18:11:54 — sample.qxp — Type: image/jpeg — Size: 65982 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/9/2005 12:38:42 — Error — Error Code: 10396 — Invalid XML String.

Example, GET URL

To update the geometry of an article using the geometry of another article, use a URL like the following:http://localhost:8080/updategeometry/destination.qcd?updatefromfile=source.qcd To update the geometry of an article in a QuarkXPress file using the geometry of a QuarkCopyDesk article file, use a URL like the following:http://localhost:8080/updatecontent/destination.qxp?updatefromfile=source.qcd&articleid=1 To update the geometry of a QuarkCopyDesk article file using the geometry of an article in a QuarkXPress project, use a URL like the following:http://localhost:8080/updategeometry/source.qxp?updatetofile=destination.qcd&articleid=1

Example, object model

CAN YOU DO THIS WITH QXPSM? IF SO, HOW?Request object names: XMLImportRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();      if(!this.DocumentSettings1. documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; // STEP 2 (SPECIFIC TO REQUESTS): Create the XML Import request XMLImportRequest xmlimportreq = new XMLImportRequest(); xmlimportreq.XMLDocument = this.thexmldoc.Text; rc.request = xmlimportreq; // STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request JPEGRenderRequest jpreq = new JPEGRenderRequest(); xmlimportreq.request = jpreq; // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Highlighting text in rendered output

To apply highlighting to text in rendered output, use XML like the following.

<RICHTEXT BACKGROUNDCOLOR="Yellow">This text is highlighted.</RICHTEXT>

Highlighting is applied only to rendered output. It is not retained in the QuarkXPress project.

Using XML modify

The modify parameter lets you modify a QuarkXPress project using XML.

This topic covers the modify parameter when it is used without the construct namespace. You can also use the modify parameter to specify an XML file to use when constructing a project; for more information, see "Constructing a project".

The xml namespace takes two arguments: the name of the project to be modified, and a modify parameter with the string or the path of the XML file that describes how to create the project:

http://QXPServer8:8080/project1.qxp?modify=
file:path to XML file on server http://QXPServer8 :8080/
project1.qxp?modify=XML string

You can also modify QuarkCopyDesk articles. To modify a QuarkCopyDesk article:

http://localhost:8080/copydesk/abc.qcd?modify=
file:XMLfile.xml

schema

Modifier schema

Parameters

modify

String

Lets you specify an XML file or string that describes how to create a project. The path can be absolute or a relative path in the document pool. Use the file: indicator to specify the path.Note that you can also include an XML file as part of a multipart HTTP request.

Example GET URL

http://QXPServer8:8080/project1.qxp?modify=file:sample.xml

Example XML

This XML deletes page 2 of a QuarkXPress layout: <PROJECT>   <LAYOUT>     <ID NAME="Layout 1" />     <SPREAD>       <ID UID="1" />       <PAGE OPERATION="DELETE">         <ID UID="2" />       </PAGE>     </SPREAD>   </LAYOUT> </PROJECT>

Response

The updated QuarkXPress project.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert is displayed, an error message is written to the QuarkXPress Server error log. The following is a sample of the error log entry:8/10/2005 10:39:07 — Error — Error Code: 10339 — The specified file failed to load in the picture box.

Modifying box properties and content

To modify box properties and content, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<?xml version="1.0" encoding="UTF-8"?>
<PROJECT>
  <LAYOUT>
    <ID NAME="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>      
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="SERVICES"/>  
        <GEOMETRY>
          <MOVEUP>50</MOVEUP>
          <MOVELEFT>30</MOVELEFT>
          <ALLOWBOXONTOPASTEBOARD>true</ALLOWBOXONTOPASTEBOARD>
        </GEOMETRY>
        <CONTENT CONVERTQUOTES="true">
           HD:QuarkXPress:DocPool:Services.txt</CONTENT>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="FAMILY"/>
        <GEOMETRY>
          <MOVERIGHT>20</MOVERIGHT>
          <MOVEDOWN>30</MOVEDOWN>
          <ALLOWBOXONTOPASTEBOARD>true</ALLOWBOXONTOPASTEBOARD>
          <ALLOWBOXOFFPAGE>true</ALLOWBOXOFFPAGE>
        </GEOMETRY>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="PRODUCTS"/>
        <GEOMETRY>
          <GROWACROSS>44</GROWACROSS>
          <GROWDOWN>30</GROWDOWN>
          <ALLOWBOXONTOPASTEBOARD>false</ALLOWBOXONTOPASTEBOARD>
        </GEOMETRY>
      </BOX>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="MAP"/>
        <GEOMETRY>
          <SHRINKACROSS>30</SHRINKACROSS>
          <SHRINKDOWN>30</SHRINKDOWN>
        </GEOMETRY>
      </BOX>
      <BOX COLOR="Blue" BOXTYPE="CT_PICT">
        <ID NAME="CONTACT"/>
        <GEOMETRY>
          <STACKINGORDER>BRINGTOFRONT</STACKINGORDER>
          <RUNAROUND TYPE="ITEM" TOP="4" RIGHT="4"
            LEFT="4" BOTTOM="4"/>
          <ALLOWBOXOFFPAGE>false</ALLOWBOXOFFPAGE>
        </GEOMETRY>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

If you know the UID attribute of a <CONTENT> element, you can insert content into that <CONTENT> element without having to specify where it is. For example:

<PROJECT>
  <CONTENT UID="0">NewPicture.jpg</CONTENT>
</PROJECT>

You can also use a <CONTENT> element to insert additional text between two <RICHTEXT> elements, like so:

<PROJECT>
   <STORY>
     <ID UID="0"/>
     <PARAGRAPH PARASTYLE="Normal">
       <RICHTEXT>Text before external file</RICHTEXT>
       <CONTENT>file:NewText.doc<CONTENT>
       <RICHTEXT>Text after external file</RICHTEXT>
     </PARAGRAPH>
  </STORY>
</PROJECT>

Response

A preview of the QuarkXPress project with a new box created in the specified position.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

Bad filename/pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:

Example GET URL  

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\updateBox.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:updateBox.xml You can also supply a string that consists of valid XML commands. For example:http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID UID="Layout1"/><SPREAD><ID UID="1"/> <BOX BOXTYPE="CT_PICT" COLOR="Blue" SHADE="50" OPACITY="50"> <ID NAME="MOUNTAINS"/><CONTENT> file:Services.eps</CONTENT> </BOX></SPREAD></LAYOUT></PROJECT>

Example 1, object model

Request object names:ModifierRequest ModifierRequestContents Layout ID Box Geometry Runaround ModifierFileRequestFor ModifierFileRequest, the member contents are used to set the file path or send the XML itself. com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;    //STEP 2(SPECIFIC TO REQUESTS): //Create the BOX modifier renderer request and //embed it in request context ModifierRequest request = new ModifierRequest(); Project contents = new Project(); Geometry geo = new Geometry(); geo.moveUp = this.moveup.Text; geo.color = this.color.Text; geo.growDown = this.growdown.Text; geo.shrinkAcross = this.shrinkacross.Text; Box box = new Box(); box.UID = this.Boxid.Text; box.geometry = geo; Layout layout1 = new Layout(); layout1.name = this.layout.Text; layout1.boxes = new Box[]{box}; if(this.runaround.Checked == true) {   Runaround runaround = new Runaround();   runaround.type = this.runaroundtype.Text;   runaround.top = this.top.Text;   runaround.left = this.left.Text;   runaround.right = this.right.Text;   geo.runaround = runaround; } contents.layouts = new Layout[]{layout1}; request.project = contents; rc.request = request;   //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Example 2, object model

To edit the geometrical properties of an existing box in a QuarkXPress project, use the following object hierarchy:ModifierRequest < Project < Layout < Spread < Box < Geometry The Geometry object has the following properties:allowBoxOffPage allowBoxOnToPasteBoard angle growAcross growDown layer linestyle (of type 'Linestyle') moveDown moveLeft moveRight moveUp page position (of type 'Position') runaround (of type 'Runaround') shape shrinkAcross shrinkDown stackingOrder suppressOutput The Runaround object has the following properties:bottom edited invert left noise outset outsideOnly pathName restrictToBox right smoothness threshold top type

Creating boxes

To create a new box, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<PROJECT>
  <LAYOUT>
    <ID UID="layout 1"/>
    <SPREAD>
    <ID UID="1"/>
      <ID/>
      <BOX OPERATION="CREATE" BOXTYPE="CT_PICT">
        <ID NAME="PRODUCTS"/>
        <GEOMETRY PAGE="2" SHAPE="SH_RECT">
          <POSITION>
            <TOP>5</TOP>
            <LEFT>5</LEFT>
            <BOTTOM>10</BOTTOM>
            <RIGHT>10</RIGHT>
          </POSITION>
        </GEOMETRY>
      </BOX>
    </SPREAD>    
  </LAYOUT>
</PROJECT>

Response

A preview of the QuarkXPress project with new box created in specified position.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

Bad filename/ pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:The following is a sample of a transaction entry: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example: 4/12/2007 14:51:50 — Error — Error Code: 10207 — The XML document is not valid or well formed.   Project: /table.qxp

Example, GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\createBox.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:createBox.xml You can also supply a string that consists of valid XML commands. For example:http://localhost:8080/sample.qxp?modify=<PROJECT><LAYOUT> <ID UID="layout 1"/><SPREAD><ID UID="1"/><ID/> <BOX OPERATION="CREATE" BOXTYPE="CT_PICT"><ID NAME="PRODUCTS"/> <GEOMETRY PAGE="2" SHAPE="SH_RECT"><POSITION><TOP>5</TOP> <LEFT>5</LEFT><BOTTOM>10</BOTTOM><RIGHT>10</RIGHT></POSITION> </GEOMETRY></BOX></SPREAD></LAYOUT></PROJECT>

Example, object model

To create a new box, use code like the following:Spread spread = new Spread(); Box box = new Box(); box.name = "textbox1"; Geometry geometry = new Geometry(); Position position = new Position();   position.top = "110"; position.left = "89"; position.bottom = "220"; position.right = "300";   geometry.position = position; geometry.shape = "SH_RECT"; geometry.page = "1"; geometry.layer = "Default";   box.geometry = geometry; box.boxType = "CT_TEXT";   box.operation = "CREATE"; spread.box = new Box[]{box}; Use the following object hierarchy:ModifierRequest < Project < Layout < Spread < Box < Geometry

Deleting boxes

To delete a box, use the following parameters in the Modifier schema:

The following XML shows how these parameters work.

<PROJECT>
  <LAYOUT>
    <ID UID="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX OPERATION="DELETE">
        <ID NAME="SERVICES"/>
      </BOX>
    </SPREAD>    
  </LAYOUT>
</PROJECT>

Response

A preview of the QuarkXPress project with the box deleted.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

Bad filename/ pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:

Example GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\deleteBox.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:deleteBox.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID UID="Layout1"/><SPREAD> <ID UID="1"/><BOX OPERATION="DELETE"> <ID NAME="HISTORY"/></BOX></SPREAD> </LAYOUT></PROJECT>

Notes

You can use the xml namespace or Telegraph XTensions software to determine the ID or name of the box you want to delete.

Grouping and ungrouping items

To group boxes using XML modify, use XML like the following:

<BOX BOXTYPE="CT_TEXT" COLOR="White">
  <ID NAME="MainStoryText" UID="217"/>
</BOX>
 
<BOX BOXTYPE="CT_PICT">
  <ID NAME="MainStoryPhoto" UID="218"/>
</BOX>
 
<GROUP>
  <ID NAME="MainStoryGroup" UID="300" 
OPERATION="CREATE"
/>
  <BOXREF NAME="MainStoryText" UID="217"/>
  <BOXREF NAME="MainStoryPhoto" UID="218"/>
</GROUP>

To add a box to an existing group, use XML like the following:

<GROUP>
  <ID NAME="MainStoryGroup" UID="300"/>
  <BOXREF NAME="MainStoryText" UID="217"/>
  <BOXREF NAME="MainStoryPhoto" UID="218" 
OPERATION="CREATE"
/>
</GROUP>

To remove a box from an existing group, use XML like the following:

<GROUP>
  <ID NAME="MainStoryGroup" UID="300"/>
  <BOXREF NAME="MainStoryHead" UID="216"/>
  <BOXREF NAME="MainStoryText" UID="217"/>
  <BOXREF NAME="MainStoryPhoto" UID="218" OPERATION="DELETE" />
</GROUP>

To ungroup an existing group, use XML like the following:

<GROUP>
  <ID NAME="MainStoryGroup" UID="300" OPERATION="DELETE" />
</GROUP>

To proportionally scale all of the items in a group, add a <GEOMETRY> element that indicates the new size of the group, like so:

<GROUP>
  <ID NAME="MainStoryGroup" UID="300"/>
 
  <GEOMETRY>     <POSITION>       <TOP>10.0</TOP>       <LEFT>10.0</LEFT>       <BOTTOM>50.0</BOTTOM>       <RIGHT>70.0</RIGHT>     </POSITION>   </GEOMETRY>
 
</GROUP>

The order of the <BOXREF> elements in a <GROUP> indicates the order in which the boxes were selected prior to grouping. The z-order of boxes in the layout is determined by the order of the <BOX> elements in the XML, from rearmost to frontmost.

XML representations of groups created by versions of QuarkXPress Server prior to 8.1 are ignored during construct and modify calls, as they were in earlier versions of QuarkXPress Server.

Modifying text attributes

You can use the modify parameter to change the attributes of text in a QuarkXPress project. All modifications are done on a text box basis. To modify text properties, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<PROJECT>
  <LAYOUT>
    <ID UID="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="ABOUT"/>
        <TEXT>
          <STORY CLEAROLDTEXT="true" FITTEXTTOBOX="true"
            CONVERTQUOTES="true">
            <RICHTEXT FONT="Castellar" PLAIN="true"/>
          </STORY>
        </TEXT>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="HISTORY"/>
        <TEXT>
          <STORY>
            <PARAGRAPH>
              <FORMAT ALIGNMENT="RIGHT">
                <SHADINGSTYLE COLOR="Yellow"
                              SHADE="30%"
                              OPACITY="20%"
                              LENGTH="COLUMN"
                              CLIPTOBOX="true"
                              RIGHTPADDING="4pt"
                              BOTTOMPADDING="2pt"
                              LEFTPADDING="2pt"
                              TOPPADDING="1pt"/>
              </FORMAT>
              <RICHTEXT SIZE="12">This text is 12pt and right 
                justified.</RICHTEXT>
            </PARAGRAPH>
          </STORY>
        </TEXT>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="PRODUCTS"/>
        <TEXT>
          <STORY>
            <RICHTEXT BOLD="true">This is bold text.</RICHTEXT>
            <RICHTEXT BOLD="true" COLOR="Red" ITALIC="true"
              SIZE="20">This text is bold, red, italic, and 20pt.
            </RICHTEXT>
          </STORY>
        </TEXT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

Response

A preview of a QuarkXPress project with the values in the ModifierXT tags applied on text boxes.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

Bad filename/ pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

There is no box with the specified identifier.

HTTP Error #500 This alert displays if the box specified by the child text node of an <ID> element does not exist.

The text size value is outside the valid range.

HTTP Error #500 This alert displays if the value specified in a <SIZE> element is invalid. What to do: Specify a value between 2 and 720 points.

The specified color is not available to the document

HTTP Error #500 This alert displays if the value specified in a <COLOR> element is invalid.

The specified font is not available

HTTP Error #500 This alert displays if the value specified in a <FONT> element is invalid or the specified font is not present on the server.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

The specified box cannot be modified.

HTTP Error #500 This alert displays if you try to modify text properties on a box that is not a text box.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/5/2005 13:32:10 — Error — Error Code: 10006 — There is no box with the specified identifier.

Example GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\modifier.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:modifier.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID UID="1"/><SPREAD><ID UID="1"/> <BOX BOXTYPE="CT_TEXT"><ID NAME="BACKGROUND"/> <TEXT><STORY><RICHTEXT FONT="Castella" PLAIN="true"> This is text.</RICHTEXT></STORY></TEXT></BOX> </SPREAD></LAYOUT></PROJECT>

Example 1, object model

Request object names: ModifierRequest ModifierStreamRequest Project RichText Text ID Box Layout ModifierFileRequestFor ModifierFileRequest, the member contents are used to set the file path or send the XML itself. com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();      if(!this.DocumentSettings1.documentName.Text.Equals(""))  rc.documentName = this.DocumentSettings1.documentName.Text;   // STEP 2 (SPECIFIC TO REQUESTS):Create the Text Modifier // renderer request and embed it in request context ModifierRequest textReq = new ModifierRequest(); Project contents = new Project(); RichText richText1 = new RichText(); richText1.value = this.text1.Text; richText1.color = this.color1.Text; Text boxText1 = new Text(); Story story = new Story(); story.richText = new RichText[]{richText1}; boxText1.story = story; if(this.fittextbox1.Checked)  boxText1.fitTextToBox = "true"; if(this.clearoldtext1.Checked)  boxText1.clearOldText = "true"; Box box1 = new Box(); box1.UID = txtBox1; box1.text = boxText1; Layout layout1 = new Layout(); layout1.name = layoutText; layout1.boxes = new Box[]{box1}; contents.layouts = new Layout[]{layout1}; textReq.contents = contents; rc.request = textReq;       // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);   

Example 2, object model

To edit the properties of an existing text box in a QuarkXPress project, use the following object hierarchy:ModifierRequest < Project < Layout < Spread < Box < Text < Story < Paragraph < RichText For a list of the RichText object's properties, see the JavaDoc installed with QuarkXPress Manager. The Story object also contains some text-related properties: fitTextToBox, includeStylesheets, convertQuotes, and clearOldText.

Notes

The <FITTEXTTOBOX> attribute depends on two preferences: Allow Text to Grow and Font Size. To set these preferences in QuarkXPress Server, choose QuarkXPress > Server > Preferences and then click Modifier in the list on the left.

Modifying picture properties

You can modify the properties (such as origin, scale, angle, skew, and orientation) of pictures in a QuarkXPress project with XML. To modify picture properties, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<PROJECT>
  <LAYOUT>
    <ID UID="1"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="PEOPLE"/>
        <PICTURE SCALEACROSS="50" SCALEDOWN="50" OFFSETACROSS="20"
          OFFSETDOWN="20"/>
      </BOX>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="MOUNTAINS"/>
        <PICTURE FIT="CENTERPICTURE" ANGLE="30" SKEW="30"
          FLIPHORIZONTAL="false"/>
      </BOX>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="OFFICES"/>
        <PICTURE FIT="FITPICTURETOBOX" ANGLE="30" SKEW="30"
          FLIPHORIZONTAL="false"/>
      </BOX>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="PRODUCTS"/>
        <PICTURE FIT="FITPICTURETOBOX" ANGLE="30" SKEW="30"
          FLIPHORIZONTAL="false"/>
      </BOX>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="SERVICES"/>
        <PICTURE FIT="FITPICTURETOBOXPRO"/>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

Response

A preview of the QuarkXPress project with image modifier tags applied to the picture boxes.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

Bad filename/ pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

There is no box with the specified identifier.

HTTP Error #500 This alert displays if the box specified by the child text node of the <ID> element does not exist.

The value of Scale Across should be between 10% and 1000%.

HTTP Error #500 This alert displays if the value of the child text node of a <SCALEACROSS> element is invalid.

The Value of Scale Down should be between 10% and 1000%.

HTTP Error #500 This alert displays if the value of the child text node of a <SCALEDOWN> element is invalid.

The value of Offset Across is in invalid range.

HTTP Error #500 This alert displays if the value of the child text node of the <OFFSETACROSS> element is invalid.

The value of Offset Down is in invalid range

HTTP Error #500 This alert displays if the value of the child text node of the <OFFSETDOWN> element is invalid.

The value of Picture Angle must be between –360 and 360 degrees.

HTTP Error #500 This alert displays if the value of the child text node of the <ANGLE> element is invalid.

The value of Picture Skew must be between –75 and 75 degrees.

HTTP Error #500 This alert displays if the value of the child text node of the <SKEW> element is invalid.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

The specified box cannot be modified.

HTTP Error #500 This alert displays if you try to modify picture properties on a box that is not a picture box.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/10/2005 10:39:07 — Error — Error Code: 10339 — The specified file failed to load in the picture box.

Example GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\imageProperties.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:imageProperties.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID UID="1"/><SPREAD> <ID UID="1"/><BOX BOXTYPE="CT_PICT"> <ID NAME="EVEREST"/> <PICTURE SCALEACROSS="50" OFFSETDOWN="20" ANGLE="30" FIT="CENTERPICTURE" SKEW="30" FLIPHORIZONTAL="false"/></BOX></SPREAD> </LAYOUT></PROJECT>

Example 1, object model

Request object names:ModifierRequest ModifierStreamRequest Project Box Picture Layout ModifierFileRequestFor ModifierFileRequest, the member contents are used to set the file path or send the XML itself. com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();      if(!this.DocumentSettings1.documentName.Text.Equals(""))  rc.documentName = this.DocumentSettings1.documentName.Text; // STEP 2(SPECIFIC TO REQUESTS):Create the Image // Modifier renderer request and embed it in ModifierRequest imgReq = new ModifierRequest(); Project contents = new Project(); Picture picture1 = new Picture(); picture1.scaleAcross = this.scaleacross1.Text; picture1.scaleDown = this.scaledown1.Text; if(this.fitpicturebox1.Checked == true)  picture1.fitPictureToBox = "true"; if(this.flipvertical1.Checked == true)  picture1.flipVertical = "true"; if(this.fliphorizontal1.Checked == true)  picture1.flipHorizontal = "true"; Box box1 = new Box(); box1.UID = txtBox1; box1.picture = picture1; Layout layout1 = new Layout(); layout1.name = layoutText; imgReq.contents = contents; contents.layouts = new Layout[]{layout1}; layout1.boxes = new Box[]{box1}; rc.request = imgReq; // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Example 2, object model

To edit the properties of an existing text box in a QuarkXPress project, use the following object hierarchy:ModifierRequest < Project < Layout < Spread < Box < Picture For a list of the Picture object's properties, see the JavaDoc installed with QuarkXPress Manager.

Notes

You cannot replace an image with the Modifier XTensions software.If you specify <FITPICTURETOBOX>, <FITBOXTOPICTURE>, and <FITPICTURETOBOXPRO> for a picture, only the first of these elements will be applied.

Importing data

Imports text or image data into a project. You can use import any text or picture file format supported by QuarkXPress, including XPress Tags files.

You can import .doc, .docx, .dot, .dotx, and .docm files.

To import text or image data into a project, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<PROJECT>
    <ID NAME="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX BOXTYPE="CT_PICT">
        <ID NAME="ABOUT"/>
        <PICTURE/>
        <CONTENT>C:\docs\file1.jpg</CONTENT>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="PRODUCTS"/>
        <CONTENT>file:C:\docs\file2.txt</CONTENT>
      </BOX>
      <BOX BOXTYPE="CT_TEXT">
        <ID NAME="SERVICES"/>
        <TEXT>
          <STORY FILE="file:C:\docs\file3.doc" CONVERTQUOTES="true"
           INCLUDESTYLESHEETS="true"/>
        </TEXT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

Response

A preview of a QuarkXPress project with a value in the data import XML tags applied to the text boxes.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier schema.

There is no box with the specified identifier.

HTTP Error #500 This alert displays if the box specified by the child text node of the <ID> element does not exist.

The specified box is not a picture or text box.

HTTP Error #500 This alert displays if you request a box that is not a text box or a picture box.

A locked layer cannot be manipulated.

HTTP Error #500 This alert displays if you request data from a box on a locked layer. What to do: Open the project in QuarkXPress, display the Layers palette, and unlock the box's layer.

Unable to read picture (#106)

HTTP Error #500 QuarkXPress Server Error #–109 This alert displays if you try to import a text file into a picture box.

Bad filename/ pathname

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you try to import an invalid or nonexistent file into a box.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/5/2005 18:11:54 — sample.qxp — Type: image/jpeg — Size: 65982 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/5/2005 18:01:59 — Error — Error Code: 10343 — A locked Layer cannot be manipulated.

Example GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/Sample.qxp?modify= file:c:\file.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/Sample.qxp?modify= file:HDD:file.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID UID="Layout1"/><SPREAD><ID UID="1"/> <BOXBOXTYPE="CT_TEXT"><ID NAME="TREES"/> <CONTENT>C:\docs\file1.jpg</CONTENT> </BOX></SPREAD></LAYOUT></PROJECT> When specifying a path, use URLs like the following: http://localhost:8080/Sample.qxp? textboxname@dataimport=file:c:\file.txt http://localhost:8080/Sample.qxp? pictureboxname@dataimport=c:\file.jpg You can import text directly into a box from the URL string. For example: http://localhost:8080/Sample.qxp? textboxname@dataimport=Newdata When you import a file that uses style sheets, you can control how those style sheets are handled. For example: http://localhost:8080/Documentname? textboxname@dataimport=file:c:\file.doc& textboxnameincludestylesheets@dataimport=yes You can control how quotation marks are handled at import. For example: http://localhost:8080/Documentname? textboxname@dataimport=file:c:\file.doc& textboxnameconvertquotes@dataimport=yes

Example, object model

Request object names: ModifierRequest ModifierStreamRequest Project RichText Text ID Box Layout ModifierFileRequestFor ModifierFileRequest, the member contents are used to set the file path or send the XML itself. com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; // STEP 2 (SPECIFIC TO REQUESTS):Create the data import // request and embed it in request context ModifierRequest request = new ModifierRequest(); Project requestContents = new Project(); Content boxContent1 = new Content(); Box box1 = new Box(); box1.UID = txtBox1; box1.content = boxContent1; Layout layout1 = new Layout(); layout1.name = layoutText; if(!this.content1.Text.Equals("")) {   boxContent1.value = this.content1.Text;     Text text1 = new Text();   text1.font = this.fontname1.Text;   box1.text = text1;   if(this.includestylesheets1.Checked == false)     boxContent1.includeStylesheets = "false";   if(this.convertquotes1.Checked == false)     boxContent1.convertQuotes = "false"; } else if (null != uplTheFile.PostedFile) {   Stream theStream = uplTheFile.PostedFile.InputStream;   StreamReader reader = new StreamReader(theStream);   boxContent1.value = reader.ReadToEnd(); } layout1.boxes = new Box[]{box1}; requestContents.layouts = new Layout[]{layout1}; request.contents = requestContents; rc.request = request; // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

BoxParam XTensions software lets you import only files in the document pool. Modifier XTensions software, however, lets you import files that are located anywhere on the server computer, at any accessible network location, or supplied as part of a multipart HTTP request.

Exporting Job Jackets files during deconstruction

While using the xml namespace to deconstruct a QuarkXPress project, you can specify the jjname parameter in the same request to output the Job Jackets file to the document pool. For example:

http://localhost:8080/xml/project.qxp?jjname=jjfilename.xml

You can then use the construct namespace to create new QuarkXPress projects that are based on that Job Jackets file's resources and layout specifications.

The jjname parameter exports QuarkXPress project resources and layout specifications to a Job Ticket. Resources defined at the Job Jackets level are not exported to the Job Ticket.

Using XML deconstruct and construct

The xml namespace deconstructs a project according to the Modifier schema. The construct namespace lets you turn an XML representation of a QuarkXPress project back into a QuarkXPress project.

This means you can deconstruct a project into an XML representation, change the XML in accordance with the Modifier schemaschema, and then have the server generate an updated version of the QuarkXPress project. You can even create new QuarkXPress projects from scratch using XML.

In addition, you can use the construct namespace to:

  • Create a page based on a master page

  • Create a project from XML, using a Job Jackets file as the basis for the project

  • Modify text font and style, including OpenType styles

  • Apply style sheets and local formatting to text

  • Create and populate tables

  • Import pictures into picture boxes and specify picture attributes

The schema used for XML construction and deconstruction is completely Unicode-compliant, making it ideal for use in international publishing.  Furthermore, the use of this schema ensures that the schema of XML output created by Constructor does not change when server preferences change. For more information, see "Modifier schema (annotated)."

Some minor QuarkXPress features are not available through the Modifier schema. However, this schema represents the majority of all user-editable aspects of a QuarkXPress project.

The deconstruct namespace/request no longer exists. If you try to use it in this version of QuarkXPress Server, an error is returned.

Deconstructing a project

The xml namespace returns an XML representation of the target project. To use this namespace, use a URL like the following:

http://QXPServer8:8080/xml/project1.qxp

When you use the xml namespace, QuarkXPress Server returns an XML file that represents the deconstructed project. This XML file adheres to the Modifier schema (see "Modifier schema (annotated)").

An XML file that represents a deconstructed project does not contain all of the information necessary to reconstruct the project. The definitions of the project's resources (such as style sheets, colors, and master page definitions) are stored in a Job Jackets file. For example, you can apply a style sheet to a paragraph by indicating the style sheet’s name, like so:

<PARAGRAPH PARASTYLE="BodyText">
  <RICHTEXT>The sun has risen.</RICHTEXT>
</PARAGRAPH>

The above information is included in the deconstructed project’s XML file. The definition of the “BodyText” style sheet, however, is stored in the Job Jackets file.

The URL of a deconstructed Job Jackets file is indicated by the PROJECT@JOBJACKET attribute. If you need access to new colors, style sheets, master pages, or other resources, add them to the Job Jackets file indicated by this URL.

Projects can also refer to resources defined with the QuarkXPress Server Document Controls submenu (Server/QuarkXPress Server menu).  QuarkXPress Server looks for resources first in the Job Jackets file and then in the server-defined resources.

XML

Creates an XML file from a QuarkXPress project. The XML is returned in a fixed format that adheres to the Modifier schema. You can use the returned XML to create or modify a QuarkXPress document using the construct namespace or modify parameter.

Namespace

xml

schema

Modifier schema

Parameters

box

Returns XML only for the box with the given ID or name.

boxes

Returns XML only for the boxes with the IDs or names supplied as a comma -separated list.

XSL

Specifies the path of an XSL file for transforming the returned XML. Use the file: indicator to specify the path.

layout

Specifies the name or number of the layout containing the box to render. The first layout is layout 1. Note that this parameter works only with the box parameter.

relativegeometry

Tells the xml namespace to describe <GEOMETRY> elements using <RELPOSITION> rather than <POSITION>. This allows an item's position to be defined either in relation to the page or in relation to the entire spread.

relativetopage

Use only with the relativegeometry parameter. Tells the xml namespace to describe <GEOMETRY> elements using <RELPOSITION> elements in which ORIGIN@RELATIVETO="page" (as opposed to "spread").

copyfitinfo

QuarkXPress Server returns copyfitting information for QuarkCopyDesk articles by default. To retrieve copyfitting information when deconstructing a QuarkXPress project, include copyfitinfo=true in the xml request. For example:http://localhost:8080/xml/sample.qxp? copyfitinfo=true

 

Refer to the Modifier schema

Response

Sample response:<?xml version="1.0" encoding="UTF-8" standalone="no"?> <PROJECT JOBJACKET="Macintosh HD:QuarkXPress DocPool: default job jackets:New Job Jacket.xml"          JOBTICKET="Default Job Ticket"          PROJECTNAME="project1.qxp">   <LAYOUT MEDIATYPE="PRINT">     <ID NAME="Layout 1" UID="1"/>     <LAYER KEEPRUNAROUND="false" LOCKED="false" SUPPRESS="false" VISIBLE="true">       <ID NAME="Default" UID="-1"/>       <RGBCOLOR BLUE="231" GREEN="231" RED="231"/>     </LAYER>     <SPREAD>       <ID UID="1"/>       <PAGE MASTER="3" POSITION="RIGHTOFSPINE" FORMATTEDNAME="1">         <ID UID="1"/>       </PAGE>         <BOX BOXTYPE="CT_TEXT" COLOR="None" OPACITY="100%" SHADE="100%">         <ID NAME="Introduction" UID="5"/>         <GEOMETRY LAYER="Default" PAGE="1" SHAPE="SH_RECT">           <POSITION>             <TOP>39.064</TOP>             <LEFT>39.026</LEFT>             <BOTTOM>63.951</BOTTOM>             <RIGHT>214.611</RIGHT>           </POSITION>           <SUPPRESSOUTPUT>false</SUPPRESSOUTPUT>           <RUNAROUND TYPE="NONE"/>         </GEOMETRY>pre         <FRAME GAPCOLOR="White" GAPOPACITY="100%" GAPSHADE="100%"OPACITY="100%" SHADE="100%" STYLE="Solid" WIDTH="0 pt"/>         <TEXT>           <STORY>             <COPYFIT FITAMOUNT="0.033&quot;" NUMBEROFCHARACTERS="6" NUMBEROFLINES="1" NUMBEROFWORDS="1" STATE="underFit"/>             <PARAGRAPH PARASTYLE="launch">               <RICHTEXT CHARSTYLE="launch">LAUNCH</RICHTEXT>             </PARAGRAPH>           </STORY>         </TEXT>       </BOX>         <BOX BOXTYPE="CT_PICT" COLOR="None" OPACITY="100%" SHADE="100%">         <ID NAME="Sunrise" UID="6"/>         <PICTURE SCALEACROSS="100%" SCALEDOWN="100%"/>         <CONTENT> Macintosh HD:QuarkXPress Server Documents:sunrise.tif </CONTENT>         <GEOMETRY LAYER="Default" PAGE="1" SHAPE="SH_RECT">           <POSITION>             <TOP>0</TOP>             <LEFT>0</LEFT>             <BOTTOM>800</BOTTOM>             <RIGHT>600</RIGHT>           </POSITION>           <SUPPRESSOUTPUT>false</SUPPRESSOUTPUT>           <RUNAROUND BOTTOM="0" LEFT="0" RIGHT="0" TOP="0" TYPE="ITEM"/>         </GEOMETRY>         <FRAME GAPCOLOR="White" GAPOPACITY="100%" GAPSHADE="100%" OPACITY="100%" SHADE="100%" STYLE="Solid" WIDTH="0"/>         <PICTURE/>       </BOX>     </SPREAD>   </LAYOUT> </PROJECT>

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2004 17:16:11 — xml/sample.qxp — Type: text/xml — Size: 2364 — Client: 127.0.0.1

Example GET URL

http://localhost:8080/xml/sample.qxp You can also deconstruct QuarkCopyDesk articles. To deconstruct a QuarkCopyDesk article, use the following: http://localhost:8080/xml/copydesk/abc.qcd

Example, Object Model

Request object name: XMLRequestXMLRequest xmlRequest = new XMLRequest(); QRequestContext context = new QRequestContext(); context.setDocumentName("SAMPLE_DOCUMENT.qxp"); context.setResponseAsURL(false); context.setRequest(xmlRequest); QContentData response = new RequestServiceStub().processRequest(context); System.out.println(response.getTextData());

Constructing a project

The construct namespace takes two arguments: The name of the project to be created, and a modify parameter that points to the XML file or string that describes how to create the project. For example:

http://QXPServer8:8080/construct/project1.qxp?
modify=file:path to XML file on server

or:

http://QXPServer8:8080/construct/project1.qxp?modify=XML string

There is a length limitation of 4096 characters on URLs, so you will probably want to use an XML file rather than an XML string.

If you are using QuarkXPress Server Manager, you can send a similar command with a QuarkXPress Server Manager URL or through Web services.

Every project created with the construct namespace must be based on a Job Ticket in a Job Jackets file. Using construct to create a project is roughly equivalent to using the File > New > Project from Ticket command in QuarkXPress.

When you create a project using the construct namespace, you must supply the path to the Job Jackets file that will supply the project's resources. To do so, indicate the URL of the Job Jackets file in the PROJECT@JOBJACKET attribute and the name of the Job Ticket in the PROJECT@JOBTICKET attribute. (<PROJECT> is the root element of the Modifier schema. For more information, see "Modifier schema (annotated).")

For example, to create a project from a Job Ticket named "Tall US Brochure Ticket" in a Job Jackets file named "BrochureJJ.xml," use XML like the following:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PROJECT JOBJACKET="MacintoshHD:brochures:BrochureJJ.xml"
         JOBTICKET="Tall US Brochure Ticket"
         PROJECTNAME="project1.qxp">
Construct

The construct namespace lets you create a QuarkXPress project using XML.

Namespace

construct

schema

Modifier schema

Parameters

modify

String

The string or the path of the XML file that describes how to create the project. Use the file: indicator to specify the path.

qxpdocver

8 | 9

Indicates the QuarkXPress version format to use. For example:http://QXPServer8:8080/construct/ qxpdoc/project1.qxp?qxpdocver=8

Example GET URL

http://QXPServer8:8080/construct/ project1.qxp?modify=file:sample.xml

Example XML

<?xml version="1.0" encoding="UTF-8"?> <PROJECT JOBJACKET="C:\XML\New Job Jacket 3.xml"          JOBTICKET="Default Job Ticket"         PROJECTNAME="project1.qxp">   <LAYOUT>     <ID NAME="Layout 1"/>     <SPREAD>       <ID UID="1"/>       <PAGE>         <ID UID="1"/>       </PAGE>     </SPREAD>   </LAYOUT> </PROJECT>

Response

A new QuarkXPress project.

Alerts

File not found.

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server. For example, this error can occur if an image or text file file mentioned in a <CONTENT> element is invalid or missing.

Bad filename/pathname.

HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path.

The XML document is not valid or well formed.

HTTP Error #500 This alert displays if the XML you supply is not well-formed or do not adhere to the Modifier schema.

The XML document contains an invalid tag value.

HTTP Error #500 This alert displays if you supply an invalid value in the XML.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:8/3/2005 11:27:42 —  jpeg/construct/table.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert is displayed, an error message is written to the QuarkXPress Server error log. The following is a sample of the error log entry:8/10/2005 10:39:07 — Error — Error Code: 10339 — The specified file failed to load in the picture box.

Example, object model

Request Object Names:XMLRequest ConstructRequest ConstructFileRequest ConstructStreamRequest To construct a new QuarkXPress project by editing an existing document, first deconstruct a QuarkXPress project using code like the following:XMLRequest dcnstrq = new XMLRequest(); rc.request = dcnstrq; Next, alter the project by manipulating the XML. When you're done, pass the modified XML document to ConstructStreamRequest to create a new QuarkXPress project. For example:ConstructStreamRequest cnstrq =  new ConstructStreamRequest(); cnstrq.modify = Buffer; // Byte[] for the modified XML rc.request = cnstrq;   QuarkXPressRenderRequest qxprq =  new QuarkXPressRenderRequest(); cnstrq.request = qxprq; Alternatively, you can deconstruct a QuarkXPress project using code like the following:RequestServiceService svc = new RequestServiceService() Project proj = svc.getDOM("document.qxp"); Next, alter the project by manipulating the XML. When you're done, pass the modified Project instance to ConstructRequest to create a new QuarkXPress project. For example:ConstructRequest cnstrq = new ConstructRequest(); cnstrq.project = proj; QRequestContext rc = new QRequestContext(); rc.request = cnstrq; QuarkXPressRenderRequest qxprq = new QuarkXPressRenderRequest(); cnstrq.request = qxprq;

Notes

The construct namespace takes two arguments: The name of the project to be created and a modify parameter with the string or the path of the XML file that describes how to create the project: http://localhost:8080/qxpdoc/construct/project1.qxp? modify=file:path to XML file on server http://localhost:8080/qxpdoc/construct/project1.qxp? modify=<xml-string>

Construct and modify

The modify parameter lets you modify existing projects. For example:

http://QXPServer8:8080/project1.qxp?
modify=file:path to XML file on server

or:

http://QXPServer8:8080/project1.qxp?modify=XML string

It's important to understand that although the construct namespace uses the same schema that you use when you modify an existing project, the construct namespace uses it differently. When you use the construct namespace, the XML you pass simply contains a description of everything in the document you want to create — much as an HTML file describes a page you want to display in a browser.  There is no need to use a command and create elements such as ADDCELLS, OPERATION, and MOVERIGHT; you simply describe each item in the layout with elements such as <BOX> and <TABLE>, and specify each item's position with the <POSITION> element type. When you use the modify attribute without the construct namespace, however, the XML you pass must contain commands that show how you want QuarkXPress Server to modify the project.

For more information, see "Modifier schema (annotated)."

Working with pages and spreads

The root element of a deconstructed QuarkXPress project is <PROJECT>. Within each <PROJECT> element are one or more <LAYOUT> elements. Each layout contains one or more <SPREAD> elements, and each <SPREAD> contains one or more <PAGE> elements. Each layout, spread, and page has a unique name, indicated by its <ID> element.

Each layout can have a unique name, indicated by its <ID> element's NAME attribute. You can use a layout's name when referring to that layout in a non-construct call that uses the MODIFY attribute. The ID@NAME attribute is ignored for <SPREAD> and <PAGE> elements, but you can refer to them numerically with their <ID> element's UID attribute, with "1" being the first, "2" being the second, and so forth.

With most element types, it is best to assign an ID@NAME value to an element and use that to refer to the element, because ID@UID values are defined by QuarkXPress Server and thus ignored for construct calls. <PAGE> and <SPREAD> are exceptions to this rule.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PROJECT JOBJACKET=" MacintoshHD:brochures:BrochureJJ.xml"
        JOBTICKET="Tall US Brochure Ticket"
        PROJECTNAME="project1.qxp">
    <LAYOUT>
       <ID NAME="Layout 1" />
       <SPREAD>
           <ID UID="1" />
           <PAGE POSITION="RIGHTOFSPINE" MASTER="3">
              <ID UID="2" />
           </PAGE>
           ...

Each page has a POSITION attribute that indicates which side of the spine it is on. (In single-sided layouts, every page is given a POSITION of RIGHTOFSPINE).

You can assign items to a page using the GEOMETRY element, which is a child of the BOX and TABLE elements. For example:

<BOX BOXTYPE="CT_TEXT" COLOR="White">
       <ID NAME="Title Box" />
    <GEOMETRY LAYER="Default" 
PAGE="1"
 SHAPE="SH_RECT">
       <POSITION>
           <TOP>90</TOP>
           <LEFT>95</LEFT>
           <BOTTOM>190</BOTTOM>
           <RIGHT>195</RIGHT>
       </POSITION>
    </GEOMETRY>
</BOX>

Master pages are stored in a deconstructed project’s Job Jackets file. To create a page from this master page, insert a MASTER attribute into the PAGE element and indicate the number of the target master page. Master page numbering is as follows:

1 =  blank single page

2 = blank facing-page

3 = the first user-defined master page in the Job Jackets file (by default, the master page named "A-Master A")

For example, to create a master page based on the first user-defined master page in the Job Jackets file, you could use XML like the following:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<PROJECT JOBJACKET=" file://brochures/BrochureJJ.xml"
        JOBTICKET="Tall US Brochure Ticket"
        PROJECTNAME="project1.qxp">
    <LAYOUT>
       <ID NAME="Layout 1"/>
       <SPREAD>
           <ID UID="1" />
           <PAGE MASTER="3" POSITION="LEFTOFSPINE">
              <ID UID="2" />
           </PAGE>
           ...

Note that each page has a POSITION attribute that indicates where that page falls with regard to the spine.

Working with layouts

QuarkXPress Server lets you create layouts from scratch in several ways:

  • You can create a layout using the default layout properties, as specified in the server Job Jackets file.

  • You can create a layout using a layout specification in a template's Job Jackets structure.

  • You can create a layout using a specific height and width.

To create a layout using the server Job Jackets file's default settings, use XML like the following:

<PROJECT>
  <LAYOUT OPERATION="CREATE">
    <ID NAME="New Layout"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX>
        <ID NAME="Box5"/>
        <TEXT>
          <STORY>
            <PARAGRAPH PARASTYLE="Normal">
              <RICHTEXT>Scrollable Layout</RICHTEXT>
            </PARAGRAPH>
          </STORY>
        </TEXT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

To create a layout using a layout specification in the template's Job Jackets structure, use XML like the following:

<PROJECT>
  <LAYOUT OPERATION="CREATE" 
LAYOUTSPECIFICATION="NewLayoutSpec"
>
    <ID NAME="New Layout"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX>
        <ID NAME="Box5"/>
        <TEXT>
          <STORY>
            <PARAGRAPH PARASTYLE="Normal">
              <RICHTEXT>Scrollable Layout</RICHTEXT>
            </PARAGRAPH>
          </STORY>
        </TEXT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

To create a layout using a specific height and width, use XML like the following:

<PROJECT>
  <LAYOUT OPERATION="CREATE" 
HEIGHT="900" WIDTH="500"
>
    <ID NAME="New Layout"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX>
        <ID NAME="Box5"/>
        <TEXT>
          <STORY>
            <PARAGRAPH PARASTYLE="Normal">
              <RICHTEXT>Scrollable Layout</RICHTEXT>
            </PARAGRAPH>
          </STORY>
        </TEXT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

To create a layout and flow content into it in one go, without a spread/page context, use XML like the following:

<PROJECT>
  <LAYOUT OPERATION="CREATE" HEIGHT="900" WIDTH="500">
  <ID NAME="New Layout"/>
 
   <!--Create a TOC-->
   <BOX>
    <ID NAME="Flow"></ID>
    <TEXT>
     <STORY>
       <LIST LISTSTYLE="TOC" OPERATION="CREATE">
             ...
           </LIST>
 
       <!-- Insert a page break -->
       <PAGEBREAK></PAGEBREAK>
 
     </STORY>
    </TEXT>
   </BOX>
 
   <!-- Add a heading -->
   <INLINEBOX>
    <RICHTEXT>This is the Heading</RICHTEXT>
   </INLINEBOX>
 
   <!-- Add text -->
   <INLINEBOX>
    <PARAGRAPH INDENTLEVEL="2" PARASTYLE="MyStyle">
     <RICHTEXT>This is the text</RICHTEXT>
    </PARAGRAPH>
   </INLINEBOX>
 
   <!-- Import a picture -->
   <INLINEBOX>
    <CONTENT>file:MyFile.jpg</CONTENT>
   </INLINEBOX>
 
   <!-- Add a  table -->
   <INLINETABLE>
    <TBODY>
     <TROW>
      <ENTRY>Column1</ENTRY>
      <ENTRY>Column2</ENTRY>
     </TROW>
    </TBODY>
   </INLINETABLE>
 
 </LAYOUT>
</PROJECT>

When QuarkXPress Server creates a new layout this way, it adds an automatic text box. If you want to flow content into this automatic text box, address it by any name you like, and QuarkXPress Server will assign that name to the automatic text box on the first page.

Working with layers

To create a layer in XML, use the LAYER element. For example:

<LAYER KEEPRUNAROUND="true" LOCKED="false"
       SUPPRESS="false" VISIBLE="true">
    <ID NAME="Layer 1" />
</LAYER>

The RGBCOLOR element defines the layer's color as displayed in the Layers palette.

You can assign items to a layer using the GEOMETRY element, which is a child of the BOX and TABLE elements. For example:

BOX BOXTYPE="CT_TEXT" COLOR="White">
       <ID NAME="Main Layer" />
    <GEOMETRY 
LAYER="Default"
 PAGE="1" SHAPE="SH_RECT">
       <POSITION>
           <TOP>90</TOP>
           <LEFT>95</LEFT>
           <BOTTOM>190</BOTTOM>
           <RIGHT>195</RIGHT>
       </POSITION>
    </GEOMETRY>
</BOX>
Working with boxes

To add text and pictures to a project, you must add text boxes and picture boxes to the project’s <SPREAD> element. Both are represented by <BOX> elements, but text boxes have a BOXTYPE attribute of CT_TEXT, and picture boxes have a BOXTYPE attribute of CT_PICT. You can read about how <BOX> elements are put together in the Modifier schema, but for purposes of illustration, the sample XML below describes a spread that contains a text box and a picture box.

<SPREAD>
    <ID UID="1" />
 
   <!-- TEXT BOX -->
   <BOX BOXTYPE="CT_TEXT" COLOR="White">
       <ID NAME="Headline Box" />
       <GEOMETRY LAYER="Default" PAGE="1" SHAPE="SH_RECT">
          <POSITION>
              <TOP>200</TOP>
              <LEFT>80</LEFT>
              <BOTTOM>450</BOTTOM>
              <RIGHT>475</RIGHT>
          </POSITION>
       </GEOMETRY>
       <TEXT>
          <STORY>
              <PARAGRAPH PARASTYLE="Normal">
                 <RICHTEXT>This is text in a box.</RICHTEXT>
              </PARAGRAPH>
          </STORY>
       </TEXT>
   </BOX>
 
   <!-- PICTURE BOX -->
   <BOX BOXTYPE="CT_PICT">
       <ID NAME="Main Story Photo" />
       <GEOMETRY LAYER="Default" PAGE="1" SHAPE="SH_RECT">
          <POSITION>
              <TOP>90</TOP>
              <LEFT>95</LEFT>
              <BOTTOM>190</BOTTOM>
              <RIGHT>195</RIGHT>
          </POSITION>
       </GEOMETRY>
       <PICTURE ANGLE="0°" FLIPHORIZONTAL="false"
          FLIPVERTICAL="false" FULLRES="false" MASK="None"
          OFFSETACROSS="0 OFFSETDOWN="0" OPACITY="100%"
          SCALEACROSS="100%" SCALEDOWN="100%" SHADE="100%"
          SKEW="0°" SUPRESSPICT="false"/>
       <CONTENT>Macintosh HD:DocPool:flower1.jpg</CONTENT>
   </BOX>
 
</SPREAD>

This example will work for a construct request. For a modify request, add the attribute value OPERATION="CREATE" in the BOX element.

All BOX elements can contain a GEOMETRY element that indicates the position and size of the box, a BORDER element that describes the four borders of a box, a FRAME element that describes the box's frame (if any), and a SHADOW element that describes the box's drop shadow. Additional BOX elements are described in the following sections.

The z-order (stacking order) of boxes in the layout is determined by the order of the <BOX> elements in the XML, from rearmost to frontmost.

Fitting a box to text or a picture

The <FIT> element type lets you automatically adjust the size of a box to fit the text or picture in that box.

The default behaivior is to not fix a box to its content. To use this feature, you must supply <MAX> and <MIN> elements. Each <MAX> or <MIN> element lets you specify a maximum or minimum size for the box, a maximum or minimum location for the resized box, or a maximum or minimum scale percentage for the box. Note that you can use different types of <MAX> and <MIN> elements in a <FIT> element, but you can use only one <MAX> element and one <MIN> element per <FIT> element.

The FIT@POINT attribute lets you indicate the direction in which the box should grow or shrink. The available options are TOPLEFT, BOTTOMLEFT, TOPRIGHT, and BOTTOMRIGHT.

The FIT@AVOIDBOXESBY attribute lets you specify the distance between the POINT side or corner of a resized box and any other items around it. A box will expand only until it is this distance from an adjacent item.

The FIT@PROPORTIONAL attribute lets you specify whether the resized box should have the same aspect ratio as the original box.

For example:

<BOX>
    <ID UID="5"/>
    <GEOMETRY>
        <POSITION>
            <TOP>224.001</TOP>
            <LEFT>110.003</LEFT>
            <BOTTOM>381</BOTTOM>
            <RIGHT>253.253</RIGHT>
        </POSITION>
 
        <FIT POINT="BOTTOMLEFT" PROPORTIONAL="true">             <MAX>                 <LOCATION X="320" Y="560"/>             </MAX>             <MIN>                 <SIZE HEIGHT="100" WIDTH="10"/>             </MIN>         </FIT>
 
    </GEOMETRY>
<BOX/>

To use this feature, you must have FitBoxToContent XTensions software loaded.

For pictures, <FIT> is equivalent to PICTURE@FIT="FITBOXTOPICTURE". <MAX> and <MIN> have no effect.

Using inline boxes

The Inline Boxes feature makes it easy to create an anchored box. Rather than having to describe every aspect of a box and then reference that box from an <ANCHOREDBOXREF> or <CALLOUTANCHOR> element, you can simply specify the content for a box inline, like so:

<PROJECT>
  <LAYOUT>
    <ID UID="123"/>
    <BOX COLOR="Cyan" OPACITY="50">
      <ID UID="456"/>
      <TEXT>
        <STORY>
          <RICHTEXT>Test before an anchored text box.</RICHTEXT>
          <INLINEBOX>
            <TEXTATTRIBUTE COLUMNS="2" GUTTERWIDTH="10">
              <INSET ALLEDGES="5"/>
            </TEXTATTRIBUTE>
            <CONTENT>file:example.docx</CONTENT>
          </INLINEBOX>
          <RICHTEXT>Test between anchored text boxes.</RICHTEXT>
          <INLINEBOX>
            <CONTENT>
              <PARAGRAPH PARASTYLE="Normal">
                <RICHTEXT>Text in the second anchored box.</RICHTEXT>
              </PARAGRAPH>
              <RICHTEXT>More text in the second anchored box.</RICHTEXT>
            </CONTENT>
          </INLINEBOX>
          <RICHTEXT>Test between anchored boxes.</RICHTEXT>
          <INLINEBOX WIDTH="50" SCALEUP="false">
            <SHADOW ANGLE="166" BLUR="6" COLOR="Yellow" DISTANCE="6" 
              INHERITOPACITY="true" MULTIPLYSHADOW="true" OPACITY="40%" 
              SCALE="100% "SHADE="62%" SKEW="0"/>
            <CONTENT>file:example.jpg</CONTENT>
          </INLINEBOX>
          <RICHTEXT>Text after an anchored picture box.</RICHTEXT>
        </STORY>
      </TEXT>
    </BOX>
  </LAYOUT>
</PROJECT>

Because an <INLINEBOX> element's content comes in the form of a <CONTENT> element, you can fill such an anchored box with Modifier-formatted text, with text from a text file, or with a picture from a picture file.

If the volume of text (represented by PARAGRAPH) is potentially large, the INLINEBOX automatically continues to flow the remaining text across pages.

Automatic text flow example

The INLINEBOX element allows to have autommatic column balanced sections. This allows you to have the text flow and bottom-align across multiple columns on a page automatically.

Automatic column balancing

The INLINEBOX@WIDTH attribute lets you specify the width of the anchored box as a percentage of its parent column or box. If you fill an anchored box with so much text that it expands to the height of its parent box, the text is adjusted to fit in the box.

The INLINEBOX@SCALEUP attribute lets you control sizing for picture boxes.

The childSHADOW element lets you specify drop shadow effects.

A child BOXATTRIBUTE element lets you control the formatting of the boxes. If you're creating an inline text box, a child TEXTATTRIBUTE element lets you control the formatting of the boxes.

A child Gradient element lets you apply a gradient color to a box or a box frame, as shown below.

<INLINEBOX>
  <BOXATTRIBUTE>
    <GRADIENT ANGLE="90" TYPE="AXIAL">
      <STOP COLOR="Cyan" CONTROLPOINT="27.41%" Location="25.00%"
        OPACITY="100%" SHADE="100%">
      <STOP COLOR="White" CONTROLPOINT="63.70%" Location="25.00%"
        OPACITY="100%" SHADE="100%">
      <STOP COLOR="Magenta" CONTROLPOINT="28.89%" Location="50.00%"
        OPACITY="50%" SHADE="100%">
      <STOP COLOR="White" CONTROLPOINT="68.15%" Location="75.00%"
        OPACITY="100%" SHADE="100%">
      <STOP COLOR="Cyan" CONTROLPOINT="50.00%" Location="100.00%"
        OPACITY="100%" SHADE="100%">
      <STORY BOXNAME="Flow">
    </GRADIENT>
  </BOXATTRIBUTE>
</INLINEBOX>

A child INTERACTIVITY element facilitates the application of interactivity on boxes. This allows for the deconstruct and modifiability of App Studio Interactivities, as shown below:

<PROJECT>
  <LAYOUT>
    <ID NAME="Layout 1"/>
    <PAGESEQUENCE MASTERREFERENCE="A-Master-A">
      <STORY BOXNAME="Flow">
        <INLINEBOX>
          <!--Preview image-->
          <CONTENT>file:Images/2pdf.PNG</CONTENT>
          <INTERACTIVITY AUTHORXTID="1131430225" NAME="Button 1" 
                         OWNERXTID="1129333841" TYPE="Button">
            <Settings InitiallyHidden="False">
              <settings>
                <actions>
                  <action>
                    <type>openfile</type>
                    <name/>
                    <sourcesettings>
                      <sourcetype>1</sourcetype>
                      <sourcepath>PDF/EconomicResearch.pdf</sourcepath>
                    </sourcesettings>
                  </action>
                <actions>
              </settings>
            </Settings>
            <DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
          </INTERACTIVITY>
        </INLINEBOX>
      </STORY>
    </PAGESEQUENCE>
  </LAYOUT>
</PROJECT>

This applies button interactivity and associates an Open File action. The generated App Studio issue, when previewed on a device, would display the "EconomicResearch.pdf". The Open File action can open media files as well.

The child BOXATTRIBUTE lets you specify an angle of rotation of the box through the use of the <ANGLE> element, like so:

<INLINEBOX>
  <BOXATTRIBUTE ANGLE="30"/>
    <CONTENT>file:tmp.bmp</CONTENT>
  ...

This would rotate the box by 30 degrees.

For more information, see "INLINEBOX (Modifier schema)," BOXATTRIBUTE (Modifier schemaschema)," and "TEXTATTRIBUTE (Modifier schema)."

If you deconstruct an anchored box that was created with an <INLINEBOX> element, the resulting XML describes the box as a <BOX> element, not an <INLINEBOX> element.

Working with groups

To add boxes to a group, create a <GROUP> element and then insert <BOXREF> elements that refer to the boxes you want in the group. For example, the group described below includes the two boxes described above it:

 <BOX BOXTYPE="CT_TEXT" COLOR="White">
    <ID NAME="MainStoryText" UID="217"/>
</BOX>
 
<BOX BOXTYPE="CT_PICT">
    <ID NAME="MainStoryPhoto" UID="218"/>
</BOX>
 
<GROUP>
    <ID NAME="MainStoryGroup" UID="300"/>
    <BOXREF NAME="MainStoryText" UID="217"/>
    <BOXREF NAME="MainStoryPhoto" UID="218"/>
</GROUP>

You can nest one group within another by adding a <BOXREF> that refers to the child group, like so:

<GROUP>
    <ID NAME="MainStoryGroup" UID="300"/>
    <BOXREF NAME="MainStoryText" UID="217"/>
    <BOXREF NAME="MainStoryPhoto" UID="218"/>
</GROUP>
 
<BOX BOXTYPE="CT_PICT">
     <ID NAME="Masthead" UID="001"/>
</BOX>
 
<GROUP>
    <ID NAME="MainStoryPage" UID="218"/>
    <BOXREF NAME="Masthead" UID="001"/>
    
<BOXREF NAME="MainStoryGroup" UID="300"/>
 
</GROUP>

To anchor a group in a text box, use XML like the following. Note that you must set BOX@ANCHOREDGROUPMEMBER="true" for all boxes in the group, and set GROUP@ANCHOREDIN for the anchored group.

<BOX BOXTYPE="CT_TEXT" COLOR="White" 
ANCHOREDGROUPMEMBER="true"
 >
    <ID NAME="MainStoryText" UID="217"/>
</BOX>
 
<BOX BOXTYPE="CT_PICT" 
ANCHOREDGROUPMEMBER="true" 
>
    <ID NAME="MainStoryPhoto" UID="218"/>
</BOX>
 
<GROUP 
ANCHOREDIN="MainStoryText"
>
    <ID NAME="MainStoryGroup" UID="300"/>
    <BOXREF NAME="MainStoryText" UID="217"/>
    <BOXREF NAME="MainStoryPhoto" UID="218"/>
</GROUP>
 
<BOX BOXTYPE="CT_TEXT" COLOR="White">
    <ID NAME="MainStoryText" UID="217"/>
    <TEXT>
        <STORY>
            <PARAGRAPH>
                
<ANCHOREDBOXREF OFFSET="0">MainStoryGroup                 </ANCHOREDBOXREF>
 
            </PARAGRAPH>
        </STORY>
    </TEXT>
</BOX>

The order of the <BOXREF> elements in a <GROUP> indicates the order in which the boxes were selected prior to grouping. The z-order of boxes in the layout is determined by the order of the <BOX> elements in the XML, from rearmost to frontmost.

Working with pictures

The <PICTURE> element supports a variety of features, including the ability to specify runaround, opacity, and drop shadow characteristics. For more information, see the Modifier schema.

<PROJECT>
  <LAYOUT>
    <ID NAME="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>
      <BOX COLOR="Magenta" SHADE="50%" OPACITY="100%">
        <ID NAME="pict1"/>
        <PICTURE MASK="Test Alpha1"/>
        <FRAME STYLE="Triple" WIDTH ="5" COLOR="Cyan" SHADE="100%"
          OPACITY="100%" GAPCOLOR="Yellow" 
          GAPSHADE="80%" GAPOPACITY="100%"/>
        <CONTENT UID="0">image.jpg</CONTENT>
      </BOX>
      <BOX>
        <ID NAME="pict2"/>
        <PICTURE SUPRESSPICT="true" FULLRES="true" PICCOLOR="Cyan"
          SHADE="90" OPACITY="90"/>
        <SHADOW COLOR="Cyan" SHADE="90" ANGLE="130" OPACITY="100"
          DISTANCE="5" SKEW="10" 
           SCALE="90" BLUR="3"/>
        <CONTENT UID="0">image.jpg</CONTENT>
      </BOX>
      <BOX>
        <ID NAME="pict3"/>
        <GEOMETRY>
           <RUNAROUND TYPE="NONWHITEAREAS"  OUTSET="10" NOISE="5"
             SMOOTHNESS="5" 
              THRESHOLD="10" INVERT="true" OUTSIDEONLY="true"
              RESTRICTTOBOX="true"/>
        </GEOMETRY>
        </BOX>
        <BOX>
          <ID NAME="pict4"/>
          <PICTURE FIT="FITPICTURETOBOX" SCALEACROSS="40"
            SCALEDOWN="50" FLIPVERTICAL="true" 
            FLIPHORIZONTAL="false" ANGLE="40" SKEW="20"/>
        <CONTENT UID="0">image.jpg</CONTENT>
      </BOX>
    </SPREAD>
  </LAYOUT>
</PROJECT>

If you know the UID attribute of a box, you can insert a picture into that box without having to specify where the <BOX> element is. For example:

<PROJECT>
  <CONTENT UID="0">ChangedPict.jpg</CONTENT>
</PROJECT>

Content IDs are unique across layouts.

Working with text

Every <BOX> element for text contains a <TEXT> element, and every <TEXT> element contains a <STORY> element. A <STORY> element can contain <PARAGRAPH> elements, each of which contains <RICHTEXT> elements. A <STORY> element can also simply contain <RICHTEXT> elements.

A text <BOX> element can also contain a <CONTENT> element that indicates the origin of the text in that box.

A text <BOX> element in a deconstructed project can also contain <PLACEHOLDER> elements, which allow XML Import XTensions software to insert text from a different XML source.

<PLACEHOLDER> elements are ignored by the construct namespace and the modify parameter; placeholders must be inserted in QuarkXPress using XML Import XTensions software.

If you know the UID attribute of a box or story, you can insert text into that box or story without having to specify where the <BOX> or <STORY> element is. For example:

<PROJECT>
  <BOX>
    <ID UID="4"/>
    <STORY>
      <RICHTEXT MERGE="false" FONT="20">New text</RICHTEXT>
    </STORY>
  </BOX>
</PROJECT>
<PROJECT>
  <STORY UID="0">
    <RICHTEXT MERGE="false" FONT="20">New text</RICHTEXT>
  </STORY>
</PROJECT>

Story IDs are unique across layouts.

Applying style sheets

Like other resources, style sheets are defined in a deconstructed project’s Job Jackets file. To apply a paragraph style sheet to text, use the PARASTYLE attribute of the <PARAGRAPH> element. For example, to apply the paragraph style sheet named “BodyText” to a paragraph, use XML like the following:

<PARAGRAPH PARASTYLE="BodyText">
    <RICHTEXT MERGE="true">The sun has risen.</RICHTEXT>
</PARAGRAPH>

To apply a character style sheet to text, use the CHARSTYLE attribute of the <RICHTEXT> element. For example, to apply the character style sheet named “Emphasis” to a word, use XML like the following:

<PARAGRAPH PARASTYLE="BodyText">
    <RICHTEXT>The </RICHTEXT>
    <RICHTEXT CHARSTYLE="Emphasis">sun</RICHTEXT>
    <RICHTEXT> has risen.</RICHTEXT>
</PARAGRAPH>
Applying local formatting

To apply local formatting to text, use the attributes of the <RICHTEXT> element. For example:

<PARAGRAPH>
    <RICHTEXT
    SIZE="10" COLOR="Magenta" BOLD="true" OPACITY="50%"
    >The sun has risen.</RICHTEXT>
</PARAGRAPH>

To apply paragraph formatting, use a <FORMAT> element. For example:

<PARAGRAPH>
    <FORMAT SPACEBEFORE="6" SPACEAFTER="2" LEADING="24"
          ALIGNMENT="LEFT” KEEPWITHNEXT="true">
       <RICHTEXT>The sun has risen.<RICHTEXT>
    </FORMAT>
</PARAGRAPH>

The MERGE attribute lets you control whether formatting from one <RICHTEXT>  or <PARAGRAPH> element is carried forward to the next.  For example, the following XML would result in "has risen" being italicized:

<PARAGRAPH PARASTYLE="BodyText">
    <RICHTEXT SIZE="10">The </RICHTEXT>
    <RICHTEXT SIZE="12"ITALIC="TRUE">sun</RICHTEXT>
    <RICHTEXT MERGE="true" SIZE="10"> has risen.</RICHTEXT>
</PARAGRAPH>

However, this XML would result in "has risen" being plain:

<PARAGRAPH PARASTYLE="BodyText">
    <RICHTEXT SIZE="10">The </RICHTEXT>
    <RICHTEXT SIZE="12" ITALIC="TRUE">sun</RICHTEXT>
    <RICHTEXT MERGE="false" SIZE="10"> has risen.</RICHTEXT>
</PARAGRAPH>

The default value for <MERGE> is "false."

To combine local formatting with style sheets, simply add attributes to the <RICHTEXT> elements within a <PARAGRAPH> element. For example:

<PARAGRAPH PARASTYLE="BodyText">
    <RICHTEXT COLOR="Red">The </RICHTEXT>
    <RICHTEXT COLOR="Yellow" CHARSTYLE="Emphasis">sun</RICHTEXT>
    <RICHTEXT COLOR="Red"> has risen.</RICHTEXT>
</PARAGRAPH>
Applying paragraph/text shading
To learn more about shading (paragraph, text) functionality, refer to the "Working with text shading" section of the QuarkXPress 2017 User Guide found here: http://files.quark.com/download/documentation/QuarkXPress/2017/English/QXP-2017-User-Guide-EN.pdf. The newly introduced Modifier XML markup maps/corresponds to the QuarkXPress 2017 functionality.

There are several ways to apply paragraph/text shading in QuarkXPress Server:

  • Referencing a pre-defined text shading style in a paragraph/character style sheet. For example, the "BodyText" paragraph style references the pre-defined "BodyTextVariations" text shading style:

    <PARAGRAPH PARASTYLE="BodyText">
    ...
    </PARAGRAPH>
  • Specify a pre-defined text shading style using the SHADINGSTYLENAME attribute of the <RICHTEXT> element.

    <PARAGRAPH>
      <RICHTEXT SHADINGSTYLENAME="BodyTextVariations"</RICHTEXT>
    </PARAGRAPH>
  • Specify a pre-defined text shading style using the NAME attribute of the <SHADINGSTYLE> element, within the PARAGRAPH/FORMAT nodes.

    <PARAGRAPH PARASTYLE="BodyText">
      <FORMAT>
        <SHADINGSTYLE NAME="BodyTextVariations"/>
      </FORMAT>
      <RICHTEXT>BODY TEXT AND BODY TEXT VARIATIONS</RICHTEXT>
    </PARAGRAPH>
  • Specify attributes in the <SHADINGSTYLE> element within the PARAGRAPH/FORMAT element for adhoc styling.

    <PARAGRAPH PARASTYLE="BodyText">
      <FORMAT>
        <SHADINGSTYLE COLOR="Yellow"
                      Shade="30%"
                      OPACITY="20%"
                      LENGTH="COLUMN"
                      CLIPTOBOX="true"
                      RIGHTPADDING="4pt"
                      BOTTOMPADDING="2pt"
                      LEFTPADDING="2pt"
                      TOPPADDING="1pt"
      </FORMAT>
      <RICHTEXT>BODY TEXT AND BODY TEXT VARIATIONS</RICHTEXT>
    </PARAGRAPH>
Formatting across paragraph boundaries

You can use two methods to describe a run of formatting that crosses a paragraph boundary. The first is to simply close the first <PARAGRAPH> element and then open a new one. For example:

<PARAGRAPH>
    <RICHTEXT SIZE="10">The sun has risen.</RICHTEXT>
</PARAGRAPH>
<PARAGRAPH>
    <RICHTEXT SIZE="10">The sun has set.</RICHTEXT>
</PARAGRAPH>

The second is to use a &hardReturn; entity to create the paragraph break. For example:

<PARAGRAPH>
    <RICHTEXT SIZE="10"
    >The sun has risen.&hardReturn;The sun has set.</RICHTEXT>
</PARAGRAPH>
Retrieving copyfitting information

In deconstructed projects, a <BOX> element can contain a <LINKEDBOX> element. The <LINKEDBOX> element indicates the point where text has overflowed the current box and identifies the box where the text continues. The <LINKEDBOX> element also contains attributes that indicate where in the text the break occurs.

In a <STORY> element, the <OVERMATTER> element indicates where the current box overflows when there is no subsequent box for text to flow into. A <STORY> element also contains a <COPYFIT> element indicating how many words, characters, and lines should be allowed to fit in that box and whether the text currently fits in the box, is too short, or is too long. This information can be useful for on-the-fly copyfitting.

The elements described in this section occur only in deconstructed project XML generated by the xml namespace.  Do not use these elements when using the construct namespace.

QuarkXPress Server returns copyfitting information for QuarkCopyDesk articles by default. To retrieve copyfitting information when deconstructing a QuarkXPress project, include copyfitinfo=true in the xml request.

Working with tables

To construct tables in XML, use a structure like the following:

<TABLE COLUMNS="2" ROWS="2">
  <ID NAME="MyTable"/>
  <GEOMETRY PAGE="1">
   <POSITION>
     <TOP>100</TOP>
     <LEFT>100</LEFT>
     <BOTTOM>600</BOTTOM>
     <RIGHT>400</RIGHT>
   </POSITION>
  </GEOMETRY>
    <COLSPEC>
      <COLUMN AUTOFIT="false" COLUMNCOUNT="1" COLUMNWIDTH="134.667">
        <GRIDLINE COLOR="Black" GAPCOLOR="none" OPACITY="100%"
          SHADE="100%" STYLE="Solid" TYPE="LEFT" WIDTH="1"/>
        <GRIDLINE COLOR="Black" GAPCOLOR="none" OPACITY="100%"
          SHADE="100%" STYLE="Solid" TYPE="RIGHT" WIDTH="1"/>
      </COLUMN>
      <COLUMN AUTOFIT="false" COLUMNCOUNT="2" COLUMNWIDTH="134.667">
        <GRIDLINE COLOR="Black" GAPCOLOR="none" OPACITY="100%"
          SHADE="100%" STYLE="Solid" WIDTH="1"/>
      </COLUMN>
      <COLUMN AUTOFIT="false" COLUMNCOUNT="3" COLUMNWIDTH="134.667">
        <GRIDLINE COLOR="Black" GAPCOLOR="none" OPACITY="100%"
          SHADE="100%" STYLE="Solid" WIDTH="1"/>
        </COLUMN>
      </COLSPEC>
    <ROW ROWCOUNT="1">
    <CELL COLUMNCOUNT ="1">
     ...
    </CELL>
    <CELL COLUMNCOUNT ="2">
     ...
    </CELL>
  </ROW>
</TABLE>

Note that the position of each row and column within the table is indicated by the ROWCOUNT and COLUMNCOUNT attributes, respectively. <CELL> elements can describe text cells or picture cells; see the following sections for details.

To specify horizontal and vertical lines in a table, use XML like the following:

<TABLE>
  <GRID TYPE="ALLGRID">
    <LINE COLOR="Black" GAPCOLOR="none" 
      OPACITY="100%" SHADE="100%"
      STYLE="Solid" WIDTH="0"/>
  </GRID>
  ...
</TABLE>
Creating tables

To create a new table, use the following parameters in the Modifier schema:

The following XML shows how some of these parameters work.

<PROJECT>
  <LAYOUT>
    <ID UID="Layout 1"/>
    <SPREAD>
      <ID UID="1"/>
      <TABLE OPERATION="CREATE" ROWS="5" COLUMNS="3">
        <ID NAME="STATS"/>
        <GEOMETRY PAGE="1"/>
          <POSITION>
            <TOP>5</TOP>
            <LEFT>5</LEFT>
            <BOTTOM>30</BOTTOM>
            <RIGHT>30</RIGHT>
          </POSITION>
        </GEOMETRY>
        <FRAME WIDTH="1" COLOR="Gray"/>
      </TABLE>
    </SPREAD>
  </LAYOUT>
</PROJECT>

Rather than creating tables manually, you can use the Inline Tables feature, which is much easier to use. For more information see "Using inline tables."

Response

A preview of the QuarkXPress project with new table created in the specified position.

Logs

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 4/10/2007 17:54:37 — tab.qxp — Type: image/jpeg — Size: 9049 — Client: 127.0.0.1

Example GET URL

When QuarkXPress Server is running on Windows, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:C:\createTable.xml When QuarkXPress Server is running on macOS, use a URL like the following:http://localhost:8080/sample.qxp?modify= file:MacHD:xml:createTable.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.qxp?modify= <LAYOUT><ID UID="Layout1"/><SPREAD><ID UID="1"/> <TABLE OPERATION="CREATE" ROWS="5" COLUMNS="3"> <ID NAME="STATS"/><GEOMETRY PAGE="1"/><POSITION> <TOP>5</TOP><LEFT>5</LEFT><BOTTOM>30</BOTTOM> <RIGHT>30</RIGHT></POSITION></GEOMETRY> </TABLE>SPREAD></LAYOUT></PROJECT>

Example, object model

To add a new table to an existing spread, use code like the following:Spread spread = new Spread(); Table table = new Table(); table.name = "textbox1"; Geometry geometry = new Geometry(); Position position = new Position();   position.top = "110"; position.left = "89"; position.bottom = "220"; position.right = "300";   geometry.position = position; geometry.shape = "SH_RECT"; geometry.page = "1"; geometry.layer = "Default";   table.geometry = geometry; table.rows = "2"; table.columns = "4"; table.maintainGeometry = "true";   table.operation = "CREATE"; spread.tables = new Table []{table};Use the following object hierarchy:ModifierRequest < Project < Layout < Spread < TableTo delete a table, provide the table's name or ID and set the operation attribute to "DELETE".

Adding text and picture cells to tables

To add a text cell, use XML like the following:

<CELL BOXTYPE="CT_TEXT" COLUMNCOUNT ="1">
    <TEXT>
       <STORY>
           <RICHTEXT>Text goes here.</RICHTEXT>
       </STORY>
    </TEXT>
</CELL>

Note that the <TEXT> element must always contain a <STORY> element. A <STORY> element can contain <PARAGRAPH> elements or simply <RICHTEXT> elements.

To add a picture cell, use XML like the following:

<CELL BOXTYPE="CT_PICT" COLUMNCOUNT ="1">
    <CONTENT>MacintoshHD:DocPool:flower1.jpg</CONTENT>
    <PICTURE FIT="CENTERPICTURE" />
</CELL>
Merging and splitting table cells

To merge table cells, use XML like the following:

<TABLE>
  <ID NAME="table1"/>
  <ROW ROWCOUNT="1" MERGEROWSPAN=”1” >
    <CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
    <CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
  </ROW>
  <ROW ROWCOUNT="2">
    <CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
    <CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
  </ROW>
  <ROW ROWCOUNT="3">
    <CELL COLCOUNT="1"><TEXT>...</TEXT></CELL>
    <CELL COLCOUNT="2"><TEXT>...</TEXT></CELL>
  </ROW>
</TABLE>

To split table cells, use XML like the following:

<TABLE>
  <ID NAME="table1"/>
  <ROW AUTOFIT="false" ROWCOUNT="5" ROWHEIGHT="60.9">
    <CELL BOXTYPE="CT_TEXT" COLUMNCOUNT="2" SPLIT="true"/>
  </ROW>
</TABLE>
Breaking a table across pages

To break a table across pages, use XML like the following:

<SPREAD>
  <ID UID="1"/>
  <PAGE MASTER="A-Master A" POSITION="RIGHTOFSPINE">
    <ID UID="1"/>
  </PAGE>
  <TABLE COLOR="none" COLUMNS="2" MAINTAINGEOMETRY="false"
    ROWS="3" AUTOFIT="rows">
    <ID NAME="Table1"/>
    <TABLEBREAK BREAKHEIGHT="140.251" MAINTAINLINK="true">
      <HEADER>
        <ROW ROWCOUNT="1" ROWHEIGHT="68.625">
        ...
        </ROW>
      </HEADER>
    </TABLEBREAK>
    <ROW ROWCOUNT="1" ROWHEIGHT="68.625">
    ...
    </ROW>
    <ROW ROWCOUNT="2" ROWHEIGHT="68.625">
    ...
    </ROW>
    <FRAME .../>
    <GEOMETRY LAYER="Default" PAGE="1" SHAPE="SH_RECT">
    ...
    </GEOMETRY>
    <COLSPEC>
    ...
    </COLSPEC>
  </TABLE>
</SPREAD>
Using inline tables

The Inline Tables feature makes it easy to create an anchored table. Rather than having to specify every attribute of a table, you can simply specify the content for a table as a series of <TROW> and <ENTRY> elements in an <INLINETABLE> element, like so:

<STORY>
  <INLINETABLE>
    <THEAD>
      <TROW>
        <ENTRY>Year</ENTRY>
        <ENTRY>2012</ENTRY>
        <ENTRY>2013</ENTRY>
        <ENTRY>2014</ENTRY>
        <ENTRY>2015</ENTRY>
      </TROW>
    </THEAD>
    <TBODY>
      <TROW>
        <ENTRY>Revenue</ENTRY>
        <ENTRY>000</ENTRY>
        <ENTRY>100</ENTRY>
        <ENTRY>200</ENTRY>
        <ENTRY>300</ENTRY>
      </TROW>
      <TROW>
        <ENTRY>Liabilities</ENTRY>
        <ENTRY>000</ENTRY>
        <ENTRY>100</ENTRY>
        <ENTRY>200</ENTRY>
        <ENTRY>300</ENTRY>
      </TROW>
    </TBODY>
  </INLINETABLE>
  ...
</STORY>

The number of rows in such a table is determined by the number of <TROW> elements. The number of columns is determined by the maximum number of <ENTRY> elements in a <TROW>.

In the <TBODY> element, each <TROW> contains one or more <ENTRY> elements. If you don't style the text in an <ENTRY> element, it uses the default styling, which can be defined in a <TROWSTYLE> or <TCOLSTYLE> element (see below).

The <THEAD> element lets you create a repeating header for the table. The <TCONTINUED> element lets you create a "continued" row for the table. If you don't supply either of these elements, you must create the header row manually as a <TROW> in the <TBODY>.

For each row and column, you can specify the following things:

  • COLOR: Cell background color.

  • SHADE: Cell background shade.

  • STORYDIRECTION: Story direction.

You can automatically adjust and position pictures in table cells. The VALIGN@ENTRY and ALIGNMENT@ENTRY attributes lets you specify the alignment of a cell, including picture cells.

The child attribute ORIENTATION lets you specify the orientation of the table, like so:

<INLINETABLE> ORIENTATION="LANDSCAPE">
  ...

On a portrait page, this would effectively rotate the table in a clock wise direction, while the page itself is not rotated.

The childPICTUREATTRIBUTES element lets you specify several picture attributes, including flip horizontal, flip vertical, angle, background and color, on picture cells of the table.

This does not create a breakable table. The table will be confined to a single page.

If the number of rows is greater than the available rectangular size of the parent box, an error is returned stating the table cannot be fit into the available size.

If you deconstruct a table that was created with an <INLINETABLE> element, the resulting XML describes the table as a <TABLE> element, not an <INLINETABLE> element.

Column Attributes

An <INLINETABLE> can also include optional <COLGROUP> elements, which allow you to specify column attrbutes in the form of <TCOL> elements, like so:

<INLINETABLE>
  <COLGROUP>
    <TCOL COLINDEX="1" WIDTH="250"/>
    <TCOL COLINDEX="2" MINWIDTH ="30pt" MAXWIDTH = "90pt"/>
    <TCOL COLINDEX="3" MINWIDTH ="20%"  MAXWIDTH = "50%"/>
  </COLGROUP>
  ...
  • The COLINDEX value indicates the column number.

  • You can specify the WIDTH of a column in points by omitting a unit indicator, or as a percentage of the table width by including a % after the number.

  • You can specify the MINWIDTH and MAXWIDTH of a column in points by omitting a unit indicator, or as a percentage of the table width by including a % after the number.

If no width is indicated, the column widths will be automatically computed depending on the length of the text in a cell or image in a cell. The sum total width of all columns would remain within the bounds of the parent box column width (typically the Automatic text box into which the table is laid out).

Table Span

An <INLINETABLE> can include an optional SPAN attribute. Values for SPAN can be:

  • PAGEWIDTH - the table will span the width of the page.

  • ALLCOLUMNS - the table will span all columns on the page.

  • the number of columns to span.

<INLINETABLE SPAN="PAGEWIDTH">
    ....
    ....
</INLINETABLE>
Using table styles

Table styles make it easy to style inline tables. Rather than applying formatting directly, you can define a table style, then apply the table style to inline tables like so:

<INLINETABLE TABLESTYLEREF="TableStyle1">

For example, assume you want to create a table where alternating rows are shaded, the grid is a particular color, the insets are a particular amount, and so forth. Instead of specifying the formatting for such a table manually for every row, you can define the table's qualities in a table style, like so:

<PROJECT>
  <TABLESTYLE WIDTH="95">
    <ID NAME="tableStyle10"/>
    <TROWSTYLE INSET="2">
      <TOPGRID COLOR="none"/>
      <BOTTOMGRID COLOR="none"/>
    </TROWSTYLE>
    <HEADTROWSTYLE COLOR="red" SHADE="30">
      <TOPGRID COLOR="red" WIDTH="1"/>
      <BOTTOMGRID COLOR="black" WIDTH="1"/>
    </HEADTROWSTYLE>
    <ODDTROWSTYLE COLOR="black" SHADE="20">
      <TOPGRID COLOR="none"/>
      <BOTTOMGRID COLOR="none"/>
    </ODDTROWSTYLE>
    <EVENTROWSTYLE COLOR="magenta" SHADE="60">
      <TOPGRID COLOR="none"/>
      <BOTTOMGRID COLOR="none"/>
    </EVENTROWSTYLE>
    <TCOLSTYLE>
      <LEFTGRID COLOR="none"/>
      <RIGHTGRID COLOR="none"/>
    </TCOLSTYLE>
    <FIRSTTCOLSTYLE COLOR="Cyan" SHADE="90"/>
    <LASTTCOLSTYLE COLOR="Cyan" SHADE="50"/>
  </TABLESTYLE>
  ...
</PROJECT>

A <TABLESTYLE> lets you specify the following things:

  • <TROWSTYLE>: A row style to be applied to every row in the table. One of the two mandatory elements of <TABLESTYLE>. Includes the INSET attribute, which lets you specify the inset to apply on all four sides.

  • <HEADTROWSTYLE>: A row style to be applied only to the header row.

  • <ODDTROWSTYLE> and <EVENTROWSTYLE>: Row styles that let you format odd and even rows differently.

  • <TCOLSTYLE>: A column style. One of the two mandatory elements of <TABLESTYLE>. Note that when the table is created, column styles override row styles.

  • <FIRSTTCOLSTYLE> and <LASTTCOLSTYLE>: Column styles that let you style the first and last column of a table differently.

  • <TOPGRID> and <BOTTOMGRID>: A grid line at the top or bottom of a row's cells.

  • <LEFTGRID> and <RIGHTGRID>: A grid line at the left or right edge of a column's cells.

To apply a table style to an inline table, add a TABLESTYLEREF attribute to the <INLINETABLE> element, like so:

<INLINETABLE TABLESTYLEREF="tableStyle10">

You can also override <TABLESTYLE> attributes by specifying them as part of the table, like so:

    <TROW>
      <TOPGRID COLOR="black" WIDTH="1"/>
      <BOTTOMGRID COLOR="red" WIDTH="1"/>
      <ENTRY COLSPAN="5">Statements</ENTRY>
    </TROW>

Here, we've created a cell that spans five columns by supplying only one <ENTRY>, and we've specified a black, one-point top line and a red, one-point bottom line for that row only.

Working with sections

The Section feature lets you change the numbering system for a layout or a range of pages in a layout. To use this feature, you create a section start on a particular page. In that section start, you can specify a number format, a starting page number, and an optional prefix. For example:

<PAGE FORMATTEDNAME="A1" MASTER="A-Master A" POSITION="RIGHTOFSPINE">
    <ID UID="1"/>
  
<SECTION FORMAT="ROMAN" NUMBER="1" PREFIX="A" OPERATION="CREATE"/>
 
</PAGE>

Once you have inserted a <SECTION> element, QuarkXPress Server will apply section-specific numbering and formatting to automatic page numbers. To insert automatic page numbers, use the RICHTEXT@PAGENUMBERCHAR attribute:

<TEXT>
    <STORY STORYDIRECTION="HORIZONTAL">
        <PARAGRAPH MERGE="false" PARASTYLE="Normal">
            <RICHTEXT MERGE="false">This is page </RICHTEXT>
            
<RICHTEXT MERGE="false" PAGENUMBERCHAR="CURRENTPAGE"/>
 
            <RICHTEXT MERGE="false">. The story continues on page 
              </RICHTEXT>
            
<RICHTEXT MERGE="false" PAGENUMBERCHAR="NEXTPAGE"/>
 
            <RICHTEXT MERGE="false">. This story is continued from page 
              </RICHTEXT>
            
<RICHTEXT MERGE="false" PAGENUMBERCHAR="PREVIOUSPAGE"/>
 
        </PARAGRAPH>
    </STORY>
</TEXT>

To remove a section break, use XML like the following:

<PAGE FORMATTEDNAME="A1" MASTER="A-Master A" POSITION="RIGHTOFSPINE">
    <ID UID="1"/>
  
<SECTION OPERATION="DELETE"/>
 
</PAGE>
Working with Composition Zones

A Composition Zones item in a deconstructed project is represented in XML by a <COMPOSITIONZONE> element. Like the <BOX> element type, this element type supports the <GEOMETRY>, <SHADOW>, and <FRAME> elements.

The content of each Composition Zones item is provided by a layout called the composition layout, which can be internal or external. Each <COMPOSITIONZONE> element includes a TYPE attribute that indicates whether its composition layout is internal or external.

  • For internal Composition Zones items, each Composition Zones item is represented as an additional <LAYOUT> element within the <PROJECT> element. The LAYOUTREF element within the <COMPOSITIONZONE> element indicates the name of the <LAYOUT> that corresponds to that particular Composition Zones item.

  • For external Composition Zones items, the PATH attribute indicates the location of the project containing the associated composition layout. However, a copy of the layout is also stored within the project as an additional <LAYOUT> element.

Composition Zones items must be created in QuarkXPress. <COMPOSITIONZONE> elements are ignored by the construct namespace and the modify parameter.

<PROJECT>
  <LAYOUT>
    <ID UID="Layout 1"/>
    <SPREAD>
      <ID/>
      <COMPOSITIONZONE BLENDSTYLE="SOLID" BOXTYPE="CT_USER" COLOR="none"
       LAYOUTREF="Layout 2" PATH="/projects/ExternalZone1.qxp" TYPE="EXTERNAL">
        <ID NAME="Box9" UID="9"/>
        ...
      </COMPOSITIONZONE>
    </SPREAD>
  </LAYOUT>
  <LAYOUT SHAREDSTATUS="ALLPROJECTS">
    <ID NAME="Layout 2" UID="2"/>
    <SPREAD>...</SPREAD>
  </LAYOUT>
</PROJECT>

You can create a shared layout for use in a Composition Zones item like so:

<PROJECT>
  <LAYOUT OPERATION="CREATE" SHAREDSTATUS="THISPROJECT">
    <ID NAME="ScrollableLayout"/>
    <SPREAD>
      <ID UID="1"/>
      ...
    </SPREAD>
  </LAYOUT>
</PROJECT>

If you are creating App Studio issues, you can use this technique to create scrollable layouts on the fly. When doing so, use the HORIZONTALBINDING and VERTICALBINDING attributes to indicate which direction the layout should scroll.

You can modify the following aspects of an existing <COMPOSITIONZONE>:

  • HORIZONTALBINDING and VERTICALBINDING

  • LAYOUTOPACITY

  • LAYOUTREF

  • PREVIEWPAGE

For example:

<COMPOSITIONZONE HORIZONTALBINDING="false" LAYOUTOPACITY="100%"
    LAYOUTREF="Layout 6" PREVIEWPAGE="3" VERTICALBINDING="true">
  <PAGEREF ANGLE="0" NUMBER="1" OFFSETACROSS="0" OFFSETDOWN="0" SCALE="100%"/>
</COMPOSITIONZONE>
Using XSL transformation

You can use an XSLT file to transform the XML returned by the xml namespace into other formats. You might find this feature useful if you want the xml namespace to return an XML representation that uses a different schema or a subset of the returned data.

To use this feature, use the XSL parameter in the request URL. If the XSL parameter specifies the absolute path to an XSLT file on the server, QuarkXPress Server uses that XSLT file to transform the response to that call. For example:

http://QXPServer8:8080/xml/project1.qxp?XSL=
path to XSLT file on server

When you use this feature, "XSL" must be in all caps.

To make the returned XML use the Modifier schema, uncheck Use default XSLT and do not use the XSL parameter in your calls to the construct namespace.

QuarkXPress Server currently supports only XML output from XSL transformation.

Working with lists

The <LISTS> element allows you to construct and deconstruct QuarkXPress lists. Lists allow a user to automatically create a table of contents (TOC) or list of figures. For more information, see the Modifier schema.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PROJECT JOBJACKET="Project2 Job Jacket"
   JOBTICKET="Default Job Ticket 1:Project2"
  PROJECTNAME="lis1.qxp" XMLVERSION="8.0">
  <LAYOUT POINTSPERINCH="72">
    <ID NAME="Layout 1"/>
    <LAYER>
      <ID NAME="Default"/>
      <RGBCOLOR BLUE="90" GREEN="90" RED="90"/>
    </LAYER>
    <SPREAD>
      <ID UID="1"/>
      <PAGE MASTER="A-Master A" POSITION="RIGHTOFSPINE">
        <ID UID="1"/>
      </PAGE>
      <BOX BOXTYPE="CT_TEXT" COLOR="none">
        <ID NAME="Box5"/>
        <GEOMETRY>
          <POSITION>
            <TOP>56</TOP>
            <LEFT>56</LEFT>
            <BOTTOM>200</BOTTOM>
            <RIGHT>300</RIGHT>
          </POSITION>
        </GEOMETRY>
        <TEXT>
          <STORY>
            <LIST LISTSTYLE="New List" OPERATION="CREATE">
            </LIST>
          </STORY>
        </TEXT>
      </BOX>
    </SPREAD>
</LAYOUT>
</PROJECT>

LIST is a child of the STORY element. The value of LISTSTYLE will be the name of the list that had been created in QuarkXPress. When a project containing a list is deconstructed in XML, the XML will contain the text of the list, as well as a reference back to the LIST.

Working with anchored boxes

To create an anchored box within a text box, use a structure like the following:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<PROJECT JOBJACKET="Macintosh HD:Server:Project1 Job Jacket"
  JOBTICKET="Default Job Ticket 1:Project2"
    PROJECTNAME="anchor.qxp" XMLVERSION="8.0">
    <LAYOUT POINTSPERINCH="72">
        <ID NAME="Layout 1"></ID>
        <LAYER>
            <ID NAME="Default"/>
            <RGBCOLOR BLUE="90" GREEN="90" RED="90"/>
        </LAYER>
        <SPREAD>
            <ID UID="1"/>
            <PAGE MASTER="A-Master A" POSITION="RIGHTOFSPINE">
                <ID UID="1"/>
            </PAGE>
            <BOX BOXTYPE="CT_TEXT" COLOR="none">
                <ID NAME="Box5"/>
                <GEOMETRY LAYER="Default" PAGE="1">
                    <POSITION>
                        <TOP>36</TOP>
                        <LEFT>36</LEFT>
                        <BOTTOM>112</BOTTOM>
                        <RIGHT>210</RIGHT>
                    </POSITION>
                </GEOMETRY>
                <TEXT>
                    <STORY>
                        <PARAGRAPH MERGE="false" PARASTYLE="Normal">
                            <RICHTEXT MERGE="false">Hello </RICHTEXT>
                            <ANCHOREDBOXREF ALIGNWITHTEXT="BASELINE"
                               OFFSET="0">Box7</ANCHOREDBOXREF>
                            <RICHTEXT MERGE="false">, world</RICHTEXT>
                        </PARAGRAPH>
                    </STORY>
                </TEXT>
            </BOX>
            <BOX ANCHOREDIN="Box5" BOXTYPE="CT_TEXT" COLOR="none">
                <ID NAME="Box7" UID="7"/>
                <GEOMETRY PAGE="1" SHAPE="SH_RECT">
                    <POSITION>
                        <TOP>0</TOP>
                        <LEFT>0</LEFT>
                        <BOTTOM>50</BOTTOM>
                        <RIGHT>75</RIGHT>
                    </POSITION>
                </GEOMETRY>
                <TEXT>
                    <STORY>
                        <PARAGRAPH MERGE="false" PARASTYLE="Normal">
                            <RICHTEXT MERGE="false">anchored box
                              </RICHTEXT>
                        </PARAGRAPH>
                    </STORY>
                </TEXT>
            </BOX>
        </SPREAD>
    </LAYOUT>
</PROJECT>

Note that there are two BOX elements. One is the parent box that has the element ANCHOREDBOXREF, which points to the name of the anchored box. The anchored box itself has the attribute ANCHOREDIN, which points to the name of the parent box.

Working with placeholders

Placeholders allow a region of text in a QuarkXPress project to hold non-printing metadata. You can use placeholders to store information from other systems, or to provide information to third-party XTensions software or other tools that operate on QuarkXPress projects.

Placeholders are used by technologies within QuarkXPress, such as XML import. Modifier XT allows placeholder data to be added to a QuarkXPress project from your application, and the placeholder data can be read from a project using the xml namespace.

Unless a third-party XTensions software module for QuarkXPress is created to manage the placeholders inserted by your application using Modifier XML, a user is not prohibited from deleting placeholders from within the QuarkXPress user interface. In fact, users are not alerted to the presence of placeholders through the QuarkXPress user interface. You can use APIs in the QuarkXPress Server XTensions Software XDK to allow a suitable user interface for managing the placeholders inserted by your application. Contact QuarkAlliance for details about the XTensions software developer program.

There are two types of placeholders supported in Modifier XML: Text placeholders and Text Node placeholders. Text placeholders can be placed around a run of text to identify particular metadata with that text content.

<PROJECT>
    <LAYOUT>
        <ID UID="1"/>
        <SPREAD>
            <ID UID="1"/>
            <BOX>
                <ID NAME="name"/>
                <TEXT>
                    <STORY CLEAROLDTEXT="true">
                        <PARAGRAPH PARASTYLE="Normal"/>
                        <RICHTEXT>This is text that</RICHTEXT>
                        <TEXTPH NAME="SOURCE_UID" OWNER="1347639377">
                            <RICHTEXT>has a placeholder</RICHTEXT>
                        </TEXTPH>
                    </STORY>
                </TEXT>
            </BOX>
        </SPREAD>
    </LAYOUT>
</PROJECT>

When a Text placeholder spans multiple paragraphs, the PARAGRAPH and RICHTEXT hierarchy is flattened. A new paragraph can be started using an empty PARAGRAPH element.

Text Node placeholders can represent a hierarchical structure of meta-tagging around text. This can allow more complex meta-tagging of data placed into a QuarkXPress project. Also, it allows some structure to be preserved within the QuarkXPress project format.

<PROJECT>
    <LAYOUT>
        <ID UID="1"/>
        <SPREAD>
            <ID UID="1"/>
            <BOX>
                <ID NAME="name"/>
                <TEXT>
                    <STORY CLEAROLDTEXT="true">
                        <PARAGRAPH PARACHAR="HARDRETURN"/>
                        <TEXTNODEPH NAME="ARTICLE" OWNER="1347639377">
                            <TEXTPH NAME="HEADLINE">
                                  <PARAGRAPH PARASTYLE="Headline"/>
                                  <RICHTEXT>Text</RICHTEXT>
                            </TEXTPH>
                            <TEXTPH NAME="STANDFIRST">
                                   <PARAGRAPH PARACHAR="HARDRETURN"
                                      PARASTYLE="1st para"/>
                                   <RICHTEXT>Text</RICHTEXT>
                            </TEXTPH>
                            <TEXTPH NAME="BODY">
                                    <PARAGRAPH PARACHAR="HARDRETURN"
                                       PARASTYLE="Body"/>
                                    <RICHTEXT>Text</RICHTEXT>
                            </TEXTPH>
                            <METADATA>
                                <VALUE KEY="ARTICLE_ID">1145</VALUE>
                                <VALUE KEY="ARTICLE_TYPE">Press Release
                                </VALUE>
                                <VALUE KEY="AUTHOR">M.Gutherie</VALUE>
                            </METADATA>
                        </TEXTNODEPH>
                    </STORY>
                </TEXT>
            </BOX>
        </SPREAD>
    </LAYOUT>
</PROJECT>

To avoid hierarchy conflicts between the placeholder hierarchy and the paragraph hierarchy, the paragraph structure is flattened, which means that PARAGRAPH and RICHTEXT elements become siblings. In this case, the PARACHAR attribute is not applied, and the Modifier XML should include the &hardReturn; entity to represent paragraph break characters.

The OWNER attribute of the TEXTPH and TEXTNODEPH elements refers to the ID of the XTensions software that is responsible for the placeholder. The xml namespace returns all placeholders from all XTensions software. The default value for placeholders is “1347639377” (this is the XTension ID of PlaceholderSXT XT). If you want to create placeholders for your own XTensions software, use that XTensions software ID here.

Working with metadata

You can attach box-level metadata to a QuarkXPress project created from XML using the Modifierschema. For example, if you import a picture from a content management system into a box, you can store the unique ID of that picture (and other information, such as the last-modified date) with the box containing that picture. When you deconstruct the project, you can read the metadata (for example, to track the usage of licensed pictures).

You can attach metadata to picture boxes, text boxes, tables, lines, and text paths. QuarkXPress Server metadata takes the form of key/value pairs. For more information, see the Modifier schema.

To create a new box with metadata, use XML like the following. In this example, QuarkXPress Server creates a box named "box1" and asssociates Asset, Date, and Password key-value pairs with it.

<BOX OPERATION="CREATE" BOXTYPE="CT_TEXT">
    <ID NAME="box1"/>
    <METADATA>
        <VALUE KEY="Asset" ><![CDATA[1234567890]]>
        </VALUE>
        <VALUE KEY="Date" ><![CDATA[08.06.07]]>
        </VALUE>
        <VALUE KEY="Password" ><![CDATA[Hello World]]>
        </VALUE>
    </METADATA>
    <GEOMETRY SHAPE="SH_RECT" PAGE="1">
        <POSITION>
            <TOP>5</TOP>
            <LEFT>5</LEFT>
            <BOTTOM>10</BOTTOM>
            <RIGHT>10</RIGHT>
        </POSITION>
    </GEOMETRY>
</BOX>

To delete metadata that is associated with a box, use XML like the following:

<BOX>
<ID NAME="BoxWithMetadata"/>
<METADATA>
<VALUE KEY="Asset"></VALUE>
    </METADATA>
</BOX>
Working with hidden text

In QuarkXPress, hidden text is used by features which need to include information within the flow of text without that information being visible in its raw form, either on screen or at output. XTensions modules for QuarkXPress and QuarkXPress Server can use the data area in hidden text to store their custom data without changing the surrounding text. The custom data in the hidden text is simply invisible when opened in a copy of QuarkXPress that does not have the corresponding XTensions module. You can use hidden text in Modifier XML to interpret information added by a custom QuarkXPress XTension or to send instructions to a QuarkXPress Server XTensions during a modify or construct request.

Each piece of hidden text is identified by an opcode. An opcode is a four-digit hexadecimal number which specifies:

  • The developer ID of the developer who created the XTensions module.

  • The unique identifier of the hidden text type, as defined by the XTensions developer.

  • The type of hidden text entry (OPENPAREN, CLOSEPAREN, NONPAREN, or IGNORED)

An opcode is constructed as follows:

The structure of a hidden text marker

In Modifier XML, hidden text is represented by the HIDDEN element. By default, hidden text is not output from the xml namespace. To output hidden text, specify the opcode= parameter in your request, like so:

http://server:port/xml/projectname.qxp?opcode=51434450

This example URL outputs all of the hidden text inserted by the XTensions software with this ID. To avoid byte order issues when cross-platform rendering is enabled, the XTID is represented decimally, rather than with the usual char[4] representation.

If you specify opcode=*, QuarkXPress Server returns all hidden text in the XML output. If you want only specific opcodes for a particular developer ID, you must pass the developer ID + the unique ID (more often than not, 1) + the sum of types of paren you wish to see (for example, to see OPENPAREN and CLOSEPAREN, you would calculate 0x20 + 0x40 = 0x60). For example, if you wanted to get only hidden text from the Custom Underline XTensions module, you would pass the request with the additional request parameter opcode=51526B61. The data you receive in the deconstructed hidden text is a base64 encoded version of the binary data which is stored in the hidden text. To interpret this, you must know the data structure which the XTension uses. Similarly, when you pass data back to an XTensions module through a modify or construct request, the data passed in the <HIDDEN> element must be base-64 encoded, and must be a valid structure in the format which the XTensions module is expecting.

You can use hidden text in different ways by using different hidden text types. For example, the Notes XTensions module uses the OPENPAREN and CLOSEPAREN hidden text type. This XTensions module lets users embed user comments at particular locations in text and view these comments can in a “sticky note” window. To accomplish this, the XTensions module embeds two hidden text markers in the text, and the text of the note goes between them. The piece of hidden text at the start of the note has the type OPENPAREN, and the piece at the end has the type CLOSEPAREN.

<PARAGRAPH MERGE="false" PARACHAR="HARDRETURN"
   PARASTYLE="001-TEXT">
    <RICHTEXT MERGE="false">
        The population of Iceland is 500,000,000.
    </RICHTEXT>
    <HIDDEN DATALEN="100" OPCODE="51434450"
       OWNER="514344" TYPE="CHARACTERTYPE">
        <RICHTEXT LANGUAGE="USEnglish" MERGE="false">
            VGhpcyBpcyB0aGUgdGV4dCBvZiBhIENvcHlEZXNrIG5vdGU=
        </RICHTEXT>
    </HIDDEN>
    <RICHTEXT MERGE="false">
        Iceland is located north of the Equator.  
    </RICHTEXT>
</PARAGRAPH>

The example XML extract above shows the output from the xml namespace of text that contains a note inserted by the Notes XT XTensions software. The note contains "This is the text of a CopyDesk note," which is represented as VGhpcyBpcyB0aGUgdGV4dCBvZiBhIENvcHlEZXNrIG5vdGU=. If this text is passed back to QuarkXPress Server in a modify or construct request, the hidden text inserted by the Notes XT XTensions software is preserved and can be read by the Notes XT XTensions software if the project is opened in QuarkXPress.

The Custom Underline XTensions module feature also uses this approach, but also stores the custom underline definitions in a binary data structure within the data of the CLOSEPAREN hidden text entry:

<PARAGRAPH MERGE="false" PARASTYLE="Normal">
    <RICHTEXT MERGE="false">
        The population of Iceland is 500,000,000.
    </RICHTEXT MERGE="false">regular text</RICHTEXT>
    <HIDDEN DATALEN="0" OPCODE="51526B41"
       OWNER="51526B" TYPE="OPENPAREN">
    </RICHTEXT MERGE="false">text with custom underline</RICHTEXT>
    <HIDDEN DATALEN="20" OPCODE="51526B21"
       OWNER="51526B" TYPE="CLOSEPAREN">
        <RICHTEXT MERGE="false">/////wACAAAAAKj2AAIAAABqAAU=</RICHTEXT>
    </HIDDEN>
    <RICHTEXT MERGE="false">regular text</RICHTEXT>
</PARAGRAPH>

The data within the RICHTEXT element inside a HIDDEN element is a Base 64-encoded representation of the raw data that is stored within the hidden text. Considering that hidden text in QuarkXPress can contain any type of data, and the structure of that data is specified by the XTensions software that creates it, this method ensures that the data can be safely represented in XML. Also, this data can be converted back into the same raw data structure so that it can be read by the destination XTensions software. If the content is edited, the destination XTensions software may not be able to interpret it. Only XTensions software developers should attempt to interpret data from their own XTensions software.

Using interactivity

The <INTERACTIVITY> element describes an asset used as an interactive element for a format such as App Studio and ePUB.

The specific schema for an interactive element is determined by the XTensions module that owns that element, so such schemas are not defined here. The best way to create or modify an <INTERACTIVITY> element is to deconstruct it and then use the deconstructed XML as a template. Below are some examples of App Studio interactivity.

Button interactivity

Below is an example of App Studio Button interactivity.

<ID UID="8"/>
<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="Button 2" UID="36"/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Button">
<Settings>
<settings>
<actions>
<action>
<type>gotofirstpage</type>
<name/>
</action>
</actions>
</settings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Scroll Zone interactivity

Below is an example of App Studio Scroll Zone interactivity.

<COMPOSITIONZONE LAYOUTREF="Scroll" OPERATION="CREATE">
<ID NAME="ScrollZone 1" UID="58"/>
<GEOMETRY CORNERRADIUS="0" CORNERSTYLE="RECTANGLE" LAYER="Default" PAGE="7" SHAPE="SH_RECT" SKEW="0">
<POSITION LOCKPROPORTIONS="false">
<TOP>216</TOP>
<LEFT>149</LEFT>
<BOTTOM>668</BOTTOM>
<RIGHT>630</RIGHT>
</POSITION>
<SUPPRESSOUTPUT>false</SUPPRESSOUTPUT>
<RUNAROUND TYPE="NONE"/>
</GEOMETRY>
<FRAME COLOR="Black" GAPCOLOR="none" OPACITY="100%" SHADE="100%" STYLE="Solid" WIDTH="0"/>
<PAGEREF ANGLE="0" NUMBER="1" OFFSETACROSS="0" OFFSETDOWN="0" SCALE="100%"/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Scrollable Content">
<Settings>
<scrollzonesettings>
<defaultposition>1</defaultposition>
<fadeatends>true<fadedistance>60</fadedistance>
</fadeatends>
<showscrollbar>true</showscrollbar>
<automaticarrows>false</automaticarrows>
<loop>false</loop>
<docuid>4</docuid>
    <scrolldirection>1</scrolldirection>
</scrollzonesettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</COMPOSITIONZONE>

<scrolldirection>1</scrolldirection> Applies the Horizontal Scrolling

<scrolldirection>2</scrolldirection> Applies the Vertical Scrolling

Slideshow interactivity

Below is an example of App Studio Slideshow interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="Slideshow 1" UID="18"/>
<PICTURE ANGLE="0" DPI="144" FLIPHORIZONTAL="false" FLIPVERTICAL="false" FULLRES="false" MASK="Composite" OFFSETACROSS="0" OFFSETDOWN="0" OPACITY="100%" SCALEACROSS="100%" SCALEDOWN="100%" SKEW="0" SUPRESSPICT="false">
<CLIPPING TYPE="ITEM"/>
</PICTURE>
<CONTENT PICTURECONTENTLOCK="true" UID="9">Images\Slideshow01.jpg</CONTENT>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Slideshow">
<Settings>
<slideshowsettings>
<allowfullscreen>true</allowfullscreen>
<allowinteraction>true</allowinteraction>
<uncroppedinfullscreen>false</uncroppedinfullscreen>
<autoplay>false</autoplay>
<sourcesettings>
<sourcetype>1</sourcetype>
</sourcesettings>
<animate>true<animationduration>6.000000</animationduration>
</animate>
<slides>
<slide slidetype="imagetype">
<imagepath>Images\slideshow1.jpg</imagepath>
<animatesettings>
<startcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
<endcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
</animatesettings>
<actions/>
</slide>
<slide slidetype="imagetype">
<imagepath>Images\slideshow2.jpg</imagepath>
<animatesettings>
<startcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
<endcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
</animatesettings>
<actions/>
</slide>
<slide slidetype="imagetype">
<imagepath>Images\slideshow3.jpg</imagepath>
<animatesettings>
<startcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
<endcrop angle="0" xoffset="0" xscale="65536" yoffset="0" yscale="65536"/>
</animatesettings>
<actions/>
</slide>
</slides>
</slideshowsettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Video interactivity

Below is an example of App Studio Video interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="Video 1" UID="21"/>
<PICTURE/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Video">
<Settings>
<videosettings>
<autoplay>false</autoplay>
<fullscreenonly>false</fullscreenonly>
<loop>false</loop>
<hidecontroller>false</hidecontroller>
<sourcesettings>
<sourcetype>1</sourcetype>
<sourcepath>Video\abc.mp4</sourcepath>
</sourcesettings>
<usevideoframe>false</usevideoframe>
<useofflineimage>false</useofflineimage>
</videosettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Audio interactivity

Below is an example of App Studio Audio interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="Audio 1" UID="24"/>
<PICTURE/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Audio">
<Settings>
<audiosettings>
<autoplay>false</autoplay>
<loop>false</loop>
<hidecontroller>false</hidecontroller>
<stopatpageturn>true</stopatpageturn>
<stopatarticleend>true</stopatarticleend>
<sourcesettings>
<sourcetype>1</sourcetype>
<sourcepath>Audio\abc.mp3</sourcepath>
</sourcesettings>
<useofflineimage>false</useofflineimage>
</audiosettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Go to URL interactivity

Below is an example of App Studio Go to URL interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="Button 1" UID="6"/>
<PICTURE/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Button">
<Settings>
<settings>
<actions>
<action>
<type>gotourl</type>
<name/>
<gotourl>http://www.google.com</gotourl>
<switchtobrowser>false</switchtobrowser>
</action>
</actions>
</settings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Web View interactivity

Below is an example of App Studio Web View interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="WebView 1" UID="27"/>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Embedded HTML">
<Settings>
<webviewsettings>
<allowuserinteraction>true</allowuserinteraction>
<scrollable>false</scrollable>
<allowzoom>false</allowzoom>
<sourcesettings>
<sourcetype>2</sourcetype>
<sourcepath>http://www.gsmarena.com</sourcepath>
</sourcesettings>
<useofflineimage>true<offlineimagepath/>
</useofflineimage>
</webviewsettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
Picture Zoom interactivity

Below is an example of App Studio Picture Zoom interactivity.

<BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
<ID NAME="InteractivePicture 1" UID="39"/>
<PICTURE ANGLE="0" DPI="144" FLIPHORIZONTAL="false" FLIPVERTICAL="false" FULLRES="false" MASK="Composite" OFFSETACROSS="0" OFFSETDOWN="27.233" OPACITY="100%" SCALEACROSS="83.2%" SCALEDOWN="83.2%" SKEW="0" SUPRESSPICT="false">
<CLIPPING TYPE="ITEM"/>
</PICTURE>
<CONTENT PICTURECONTENTLOCK="true" UID="9">Images\Slideshow01.jpg</CONTENT>
<INTERACTIVITY AUTHORXTID="1131430225" OWNERXTID="1129333841" TYPE="Full-screen Image">
<Settings>
<picturezoomsettings>
<allowfullscreen>true</allowfullscreen>
<allowpinchzoom>false</allowpinchzoom>
<allowpanning>true</allowpanning>
<animatepanandzoom>false</animatepanandzoom>
<zoomsetting>0</zoomsetting>
</picturezoomsettings>
</Settings>
<DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
</INTERACTIVITY>
</BOX>
360 degree interactivity

Below is an example of App Studio 360 degree interactivity.

<ID UID="8"/>
  <BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
    <ID NAME="360Degree 1" UID="31"/>
      <PICTURE/>
      <INTERACTIVITY AUTHORXTID="1131430225" NAME="360° Image 1" 
        OWNERXTID="1129333841" TYPE="360 degree Image">
        <SettingsInitiallyHidden="False">
          <image360settings>
            <autoplay>true<spincount>2</spincount></autoplay>
            <allowinteraction>true</allowinteraction>
            <frames/>
          </image360settings>
        </Settings>
        <DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
      </INTERACTIVITY>
  </BOX>
Animation interactivity

Below is an example of App Studio Animation interactivity.

<ID UID="8"/>
  <BOX BLENDSTYLE="SOLID" BOXTYPE="CT_PICT" COLOR="none">
    <ID NAME="animation 1" UID="32"/>
    <PICTURE/>
    <INTERACTIVITY AUTHORXTID="1131430225" NAME="Animation 1"
      OWNERXTID="1129333841" TYPE="Animation">
      <Settings InitiallyHidden="False">
        <animationsettings>
          <animationtype>11</animationtype>
          <autoplay>true</autoplay>
          <allowinteraction>true</allowinteraction>
          <initiallyhidden>false</initiallyhidden>
          <loop>false<loopcount>1</loopcount></loop>
          <duration>5</duration>
          <delay>0</delay>
          <timingfunc>
            <functype>0</functype>
            <func/>
          </timingfunc>
          <pathname/>
          <direction>0</direction>
          <endsettings>
            <hidden>false</hidden>
            <opacity>65536</opacity>
            <angle>0</angle>
            <xscale>65536</xscale>
            <yscale>65536</yscale>
            <scaleproportionally>true</scaleproportionally>
          </endsettings>
        </animationsettings>
      </Settings>
      <DATAPROVIDER DATAPROVIDERXTID="1131430225"/>
    </INTERACTIVITY>
  </BOX>
Specifying colors

When specifying colors, you can use named Web colors such as "Silver" and "MediumSlateBlue" by name. You can also use RGB colors by specifying their hexadecimal values. For example:

<RICHTEXT COLOR="Teal" MERGE="false" BOLD="true">This text is teal.</RICHTEXT>
<FRAME COLOR="#006699" GAPCOLOR="#996600" WIDTH="7"/>

Working with indexes

Indexes are a list of words or phrases ('Index Terms') and associated pointers to where useful material relating to that index term can be found in a document or on a page.

Index terms can be nested up to four levels and each level can have a separate style applied. The scope of the index term can also be set. Preferences for indexes can be defined, including setting the index marker color, the index term separator, the page range separator and the page list separator.

Marking and rendering indexes

Marking:

The INDEXTERM tag is used to mark indexes within the flow.

<PARAGRAPH PARASTYLE="Sub-Section Title">
    <RICHTEXT>Text containing the term</RICHTEXT>
    <INDEXTERM>the term to be marked for the index</INDEXTERM>
</PARAGRAPH>

The RANGE element is used to mark the beginning and end of the scope of the occurrence of the index within the flow.

<INDEXTERM ID="Unique ID" RANGE="START">Menu</INDEXTERM>
<PARAGRAPH>
    <RICHTEXT>....</RICHTEXT>
</PARAGRAPH>
<INDEXTERM ID="Unique ID" RANGE="END"/>

Use the RANGE element with a value of UNTILPARASTYLE to specify that a range should end at a particular style sheet.

<PARAGRAPH PARASTYLE="Sub-Section Title">
    <RICHTEXT>File Menu</RICHTEXT>
</PARAGRAPH>
<INDEXTERM RANGE="UNTILPARASTYLE" VALUE="Sub-Section Title">File</INDEXTERM>
<PARAGRAPH>
    <RICHTEXT>....</RICHTEXT>
</PARAGRAPH>
< PARAGRAPH PARASTYLE="Sub-Section Title">
    < RICHTEXT>Edit Menu</RICHTEXT>
</PARAGRAPH>

Use the RANGE element with a value of NUMBEROFPARAGRAPHS to specify that a range should end after a specified number of paragraphs.

<PARAGRAPH PARASTYLE="Sub-Section Title">
    <RICHTEXT>File Menu</RICHTEXT>
</PARAGRAPH>
<INDEXTERM RANGE="NUMBEROFPARAGRAPHS" VALUE="12">File</INDEXTERM>
<PARAGRAPH>
    <RICHTEXT>....</RICHTEXT>
</PARAGRAPH>
<PARAGRAPH>
    <RICHTEXT>Edit Menu</RICHTEXT>
</PARAGRAPH>

Use the RANGE element with a value of ENDOFSTORY to specify that a range should end at the end of the story.

<PARAGRAPH PARASTYLE="Sub-Section Title">
    <RICHTEXT>File Menu</RICHTEXT>
</PARAGRAPH>
<INDEXTERM RANGE="ENDOFSTORY">File</INDEXTERM>
<PARAGRAPH>
    <RICHTEXT>....</RICHTEXT>
</PARAGRAPH>
<PARAGRAPH>
    <RICHTEXT>Edit Menu</RICHTEXT>
</PARAGRAPH>

Use the ADDALL element to indicate that all instances of the index term in the document should be added to the index.

<INDEXTERM ID="Unique ID" RANGE="START" ADDALL="TRUE">Menu</INDEXTERM>
    <RICHTEXT>Term</RICHTEXT>
<INDEXTERM ID="UniqueID" RANGE="END"/>

Use the MAINTERM, SUBTERM1, SUBTERM2, and SUBTERM3, elements to specify the level of the index term.

<RICHTEXT>Menus of QXP</RICHTEXT>
<INDEXTERM>
    <MAINTERM>Menus</MAINTERM>
    <SUBTERM1>Sub menu</SUBTERM1>
    <SUBTERM2>Utilities menu</SUBTERM1>
    <SUBTERM3>Insert Placeholder Text</SUBTERM1>
</INDEXTERM>

The previous XML snippet will produce the following results in the index:

Menus
  Sub menu
    Utilities menu
      Insert Placeholder Text 1

Use the CROSSREFERENCETOINDEX element to create cross references between index terms. (Valid PREFIX values: see, see also, see herein)

<PARAGRAPH>
    <INDEXTERM>
        <MAINTERM>Menu</MAINTERM>
        <CROSSREFERENCETOINDEX PREFIX="see also">Palettes</CROSSREFERENCETOINDEX>
    </INDEXTERM>
    <RICHTEXT>Term</RICHTEXT>
</PARAGRAPH>

Use the INDEXSPECIFICATIONS tag to define the index preferences, including setting the style and the index term separators.

<INDEXSPECIFICATIONS>
    <INDEXSTYLE NAME ="IndexStyle">
    <SEPARATORS BETWEEN-PAGE-NUMBERS=""
BETWEEN-PAGE-RANGE=""
                FOLLOWING-ENTRIES="" 
                BEFORE-CROSS-REFERENCE="" 
                CROSS-REFERENCE-STYLE=""
                LEVELFORMAT="NESTED"/>
    <LEVELSTYLE FIRSTLEVEL ="Style1"
                SECONDLEVEL ="Style2" 
                THIRDLEVEL ="Style3" 
                FOURTHLEVEL =" Style4" 
                LETTERHEADSTYLE ="Style5"/>
    </INDEXSTYLE>
</INDEXSPECIFICATIONS>

Rendering:

The INDEX OPERATION element is used to render indexes.

<PARAGRAPH>
    <INDEX OPERATION="CREATE" Style="IndexStyle"/>/>
</PARAGRAPH>

Working with cross references

The cross references feature makes it easy to create cross references. There are three types of cross references that can be created in QuarkXPress:

  • Footnotes

  • Endnotes

  • Numbered Items

Use the <XREF> elements in a <REFNOTE> element, to specify cross references.

To create a numbered item cross reference:

<PAGESEQUENCE MASTERREFERENCE="B-Body">
  <STORY>
    <PARAGRAPH PARASTYLE="Normal">
      <RICHTEXT MERGE="false">Paragraph text (see Section </RICHTEXT>
      <XREF HREF="#d83c7191-fbb9-4565-8364-4de14c77c44a" 
          CHARSTYLE="CrossRef" INCLUDEABOVEBELOW="true" HYPERLINK="FALSE"
          SEPARATOR="->" />
      <RICHTEXT MERGE="false">and Appendix A) Paragraph text continues.</RICHTEXT>
    </PARAGRAPH>
      . . .
    <PARAGRAPH PARASTYLE="Heading1">
      <RICHTEXT MERGE="false">Support</RICHTEXT>
    </PARAGRAPH>
    <PARAGRAPH PARASTYLE="Heading2" XREFLABEL="d83c7191-fbb9-4565-8364-4de14c77c44a">
      <RICHTEXT MERGE="false">Loss History</RICHTEXT>
    </PARAGRAPH>
  </STORY>
</PAGESEQUENCE>
  • Use the CHARSTYLE element to identify a character style sheet to be applied to the cross reference.

  • Use the HYPERLINK element to enable/disable the hyperlink in the PDF output.

  • Use the XREFSTYLE element to specify the type of cross reference.

  • Use the SEPARATOR element to specify the separator text.

You can show custom text as the cross reference:

<PAGESEQUENCE MASTERREFERENCE="B-Body">
  <STORY>
    <PARAGRAPH PARASTYLE="Normal">
      <RICHTEXT MERGE="false">Paragraph text (see Section </RICHTEXT>
      <XREF HREF="#d83c7191-fbb9-4565-8364-4de14c77c44a" CHARSTYLE="CrossRef/>CUSTOM TEXT</XREF>
      <RICHTEXT MERGE="false">and Appendix A) Paragraph text continues.</RICHTEXT>
    </PARAGRAPH>
      . . .
    <PARAGRAPH PARASTYLE="Heading1">
      <RICHTEXT MERGE="false">Support</RICHTEXT>
    </PARAGRAPH>
    <PARAGRAPH PARASTYLE="Heading2" XREFLABEL="d83c7191-fbb9-4565-8364-4de14c77c44a">
      <RICHTEXT MERGE="false">Loss History</RICHTEXT>
    </PARAGRAPH>
  </STORY>
</PAGESEQUENCE>

Creating and using hyperlinks

There are three types of hyperlink:

  • Web (WWWURL).

  • Anchor (ANCHOR). You must define Anchor hyperlinks at the <LAYOUT> level.

  • Page (PAGE). You must define Anchor hyperlinks at the <LAYOUT> level.

Web hyperlinks

You must define Web hyperlinks at the <PROJECT> level. For example, to create a Web hyperlink named Quark-dot-com, you could add the following as a child of the <PROJECT> element:

<HYPERLINK HLTYPE="WWWURL" NAME="Quark-dot-com" TARGET="http://www.quark.com"/>

To add a Web hyperlink to a layout, add HYERLINKREF and HLTYPE attributes to a <BOX> or <RICHTEXT> element. For example, to use the Quark-dot-com hyperlink defined above, you could do something like this:

<RICHTEXT>this is a hyperlink to </RICHTEXT>
<RICHTEXT COLOR="Cyan" UNDERLINE="true" 
HYPERLINKREF="Quark-dot-com" HLTYPE="WWWURL"
>quark.com</RICHTEXT>

You can use a Web hyperlink without creating it at the <PROJECT> level, but this is not the preferred method.

Anchor hyperlinks

To indicate the target of an Anchor hyperlink, use a <RICHTEXT> element like this:

<RICHTEXT HLANCHORREF="MyAnchor" />

To make sure the Anchor hyperlink works correctly, add something like this to the <LAYOUT> element:

<HYPERLINK HLTYPE="ANCHOR" TARGET="#somewhere" />

To link to this Anchor hyperlink, use something like this:

<RICHTEXT HLTYPE="ANCHOR" HYPERLINKREF="#somewhere">link</RICHTEXT>

You can use an Anchor hyperlink without creating it at the <PROJECT> level, but this is not the preferred method.

Page hyperlinks

To make sure a Page hyperlink works correctly, add something like this to the <LAYOUT> element:

<HYPERLINK HLTYPE="PAGE" NAME="Page 2" TARGET="2" />

To link to this Page hyperlink, use something like this:

<RICHTEXT HLTYPE="PAGE" HYPERLINKREF="Page 2" >Page2</RICHTEXT>

You can use a Page hyperlink without creating it at the <PROJECT> level, but this is not the preferred method.

Using the Streaming Document Provider

The Streaming Document Provider feature allows all of the assets required for a transaction to be provided as part of a multi-part HTTP request. Assets that can be streamed include:

  • QuarkXPress templates.

  • Picture files used in the template.

  • Modifier XML.

  • Picture and text files used in the Modifier XML.

  • Assets used by digital publishing enrichments.

The Streaming Document Provider feature also supports keepdocopen requests.

QuarkXPress Server searches for assets used in a call in the following order:

  1. In the HTTP request.

  2. At the supplied file path (if specified).

  3. In the document pool.

If QuarkXPress Server does not find the required assets at any of these locations:

  • If the image is being changed by the request, a "File not found" error occurs.

  • If the image is not being changed by the request, it renders at preview resolution.

To use this feature, include a part in the HTTP request that has the same name as the asset to be streamed. For example:

<html>
  <body>
    <form enctype="multipart/form-data" 
      action="http://localhost:8082/pdf/pic.qxp" method="post">
        <input type="file" name="picture.jpg"/><br/>
        <input type="file" name="pic.qxp"/><br/>
        <input type="hidden" name="modify" value="<PROJECT><LAYOUT>
          <ID UID=111/><BOX><ID NAME='picbox'/><CONTENT>picture.jpg
          </CONTENT></BOX></LAYOUT></ PROJECT>"/>
        <input type="submit"/>
    </form>
  </body>
</html>

Using administrative request handlers

Administrative request handlers let you change the behavior of QuarkXPress Server. The built-in administrative request handlers are described in the topics below

You can add your own request handlers. During the DDSSETUPCBCODE callback, QuarkXPress Server XTensions software registers itself as a request handler via AddCustomRequestHandler, using the QuarkXPress Server XTensions API. The first parameter of this API is a pointer to a request handler function implemented in QuarkXPress Server XTensions software. The second parameter is a namespace string that identifies the request. When a user submits a request that has the same namespace string as a suffix to the request URL, QuarkXPress Server calls the request handler function with all the user-specified parameters in the ServerRequest structure. The request handler function then processes the request and submits the reply in a ServerReply structure, which QuarkXPress Server communicates back to the user agent.

Addfile

Use the addfile request handler to put a document or image file in the document pool. An addfile request is always a POST request because it uses binary content.

If you send an addfile request to QuarkXPress Server Manager using HTTP or the Web services interface while the common doc pool switch is set to off in the QuarkXPress Server Manager client, the file is uploaded to all registered QuarkXPress Server instances. If the common doc pool is enabled, the file can be uploaded to any one registered QuarkXPress server instance.

Namespace

addfile

Parameters

uploadfile

Binary file or MIME-type file

Contains the actual binary content of the file to be uploaded. This can be a QuarkXPress file, a Word file, a text file, or a file with a MIME-type such as EPS, JPEG, PNG, or PICT.

Response

The message "File upload completed."

Alerts

The file system document pool is not enabled.

HTTP Error #404This alert displays if you attempt to upload a document when the file system document pool is not enabled. What to do: Check Enable File System Document Pool in the Server Configuration dialog box.

Incorrect administration realm user name and password.

HTTP Error #401This alert displays if you specify an invalid administrator user name and password.What to do: Use the user name and password set in theQuarkXPress Server Manager client Server Configuration dialog box.

Cannot find required volume or folder

HTTP Error #500QuarkXPress Server Error #120This alert displays if you attempt to upload a document that is in a subfolder that does not exist in the document pool while Generate Hierarchy on Document Upload is unchecked in the Server Configuration dialog box. What to do: Check Generate Hierarchy on Document Upload in the Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

To post a binary file in the root folder:http://localhost:8080/addfile/abc.qxpTo post a binary file in a subfolder:http://localhost:8080/addfile/sub1/abc.qxp

Example, object model

Request object name: AddFileRequest // STEP 1 (COMMON FOR ALL REQUESTS): com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();   if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;            Stream theStream = uplTheFile.PostedFile.InputStream; long length = theStream.Length; Byte[] Buffer = new Byte[length]; const int BUFFER_SIZE = 10000; int nBytesRead = 0,iCount = 0;   long remainingBytes = length — BUFFER_SIZE; if(remainingBytes > BUFFER_SIZE) {   nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE);   while(0 != nBytesRead)   {     iCount++;     remainingBytes = length — (iCount * BUFFER_SIZE);     if(remainingBytes > BUFFER_SIZE)       nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE);     else     {       nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,(int)remainingBytes);       break;     }   } } else   nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,(int)remainingBytes); AddFileRequest addfilereq = new AddFileRequest(); addfilereq.fileData = Buffer; rc.request = addfilereq;   // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); QContentData qc = svc.processRequest(rc); The object model uses SOAP to transfer data, and SOAP encoding is not the most efficient way to transfer binary data. If you have to add a file using QuarkXPress Server Manager, the best way is to  use a POST request in a QuarkXPress Server Manager URL. You might use QuarkXPress Manager to add a file if you wanted to add the file to all registered QuarkXPress Server instances at one time (assuming the instances are not sharing a single document pool).For more information, see the "AddFileRequest" .NET, Java, and Objective-C samples in the QuarkXPress Server Manager SDK samples.

Notes

The following is a sample of a POST request HTML form.<HTML> <HEAD><TITLE>Test Addfile</TITLE></HEAD> <BODY>   File will always be uploaded with name new.qxp   <FORM ACTION="http://localhost:8080/addfile/new.qxp"   METHOD = "post" ENCTYPE="multipart/form-data">     Please select the file you want to upload:     <INPUT TYPE=file NAME="uploadFile"><br><br>     <INPUT TYPE=submit VALUE="Submit">   </FORM> </BODY> </HTML>

The following example demonstrates how to use an HTML form to create a POST request that uses the addfile request handler. The form looks like this:

To use this form:

  1. Enter the name or IP address of the computer on which QuarkXPress Server is running.

  2. Enter the port number in the port number field.

  3. Enter the file name along with the extension in the file field. Click Browse if you need to find the file on your computer. The file will be uploaded with this name.

  4. Click Submit.

The file uploads to the document pool of the specified server. After the file is successfully uploaded, the "File upload completed." alert is displayed.

For example, assume you want to upload a file named "Faces.pdf" (located at the root of the C drive) to an instance of QuarkXPress Server running at IP address 202.201.92.34 and port 8080, and that you want the name of the uploaded file on the server to be "NewFaces.pdf." Here's how you would accomplish this in the HTML form:

The HTML code to generate the above sample file is as follows:

<HTML>
<HEAD>
  <TITLE>Test Addfile</TITLE>
  <SCRIPT LANGUAGE="JavaScript">
  function UploadDocument() {
    var URL;
    URL = "http://" + UploadForm.MachineIP.value + ":"  +
      UploadForm.Port.value + "/addfile/" + UploadForm.NewName.value;
    UploadForm.action = URL;
  }
  </SCRIPT>
</HEAD>
<BODY>
  <FORM ID="UploadForm" METHOD = "post" ENCTYPE="multipart/form-data" 
     onSubmit="UploadDocument()">
  Please enter the name or IP of machine where QuarkXPress Server is running:
    <INPUT TYPE="TextBox" NAME="MachineIP"><br><br>
  Please enter the port number on which QuarkXPress Server is running:
    <INPUT TYPE="TextBox" NAME="Port"><br><br>
  Please enter the new name (along with extension) with which file will be uploaded:
    <INPUT TYPE="TextBox" NAME="NewName"><br><br>
  Please select the file you want to upload: <INPUT TYPE=file NAME="uploadFile">
  <br><br>
  <INPUT TYPE=submit VALUE="Submit">
</FORM>
</BODY>
</HTML>

The information entered in the form is created with the following tags:

<FORM ID="UploadForm" METHOD = "post" 
  ENCTYPE="multipart/form-data" onSubmit="UploadDocument()">
  Please enter the name or IP of machine where QuarkXPress Server is running:
  <INPUT TYPE="TextBox" NAME="MachineIP"><br><br>
  Please enter the port number on which QuarkXPress Server is running:
  <INPUT TYPE="TextBox" NAME="Port"><br><br>
  Please enter the new name (along with extension) with which file will be uploaded:
  <INPUT TYPE="TextBox" NAME="NewName"><br><br>
  Please select the file you want to upload:
  <INPUT TYPE=file NAME="uploadFile"><br><br>
  <INPUT TYPE=submit VALUE="Submit">
</FORM>

The FORM tag specifies that the method of the request is POST. This request is a "Multipart/form-data" request. When you submit the form, the UploadDocument() function is called.

Use the INPUT tag to create the text box and the Browse button.

  • <INPUT TYPE="TextBox": To create text boxes only.

     

  • <INPUT TYPE=file: To create a combination of text box and the Browse button in the form. When you click Browse and choose any file, the file path of the selected file displays in the text box linked with the Browse button.

     

You can use the INPUT tag to create the Submit button: <INPUT TYPE=submit VALUE="Submit">

When you click Submit, the UploadDocument() function is called. This function is defined inside a script tag. It combines the information that has been entered in the form to create a URL for the addfile request, then sends this URL to QuarkXPress Server for processing. The code for the UploadDocument() function is as follows:

<SCRIPT LANGUAGE="JavaScript">
  function UploadDocument() {
    var URL;
    URL = "http://" + UploadForm.MachineIP.value + ":"
      +  UploadForm.Port.value + "/addfile/" + UploadForm.NewName.value;
    UploadForm.action = URL;
  }
  </SCRIPT>
Delete

The delete request handler removes a specified document or folder from the document pool.

If you send a delete request to QuarkXPress Server Manager using HTTP or the Web services interface while the common doc pool switch is set to off in the QuarkXPress Server Manager client, the file or folder is uploaded to all registered QuarkXPress Server instances. If the common doc pool is enabled, the file or folder can be deleted from any one registered QuarkXPress server instance.

Namespace

delete

Response

The message "File deleted successfully."

Alerts

File not found

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you try to delete a file that does not exist in the document pool.

Folder cannot be deleted. It may still contain files.

HTTP Error #405 This alert displays if you try to delete a folder that is not empty. What to do: First, delete all the files in the folder, and then resubmit the delete request to delete the folder.

I/O error trying to read or write to disk.

HTTP Error #500 QuarkXPress Server Error #–36 This alert displays if you try to delete an open file.

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password.What to do: Use the user name and password set in theQuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/delete/sample.qxp

Example, object model

Request object name: DeleteRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new DeleteRequest();   // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Evaluate

The evaluate request handler evaluates the document you specify using a rule set in the Job Jackets file you specify, and returns the results as an XML stream.

By default, this request handler evaluates the following rules:

  • Platform mismatch

  • Missing fonts

  • Missing pictures

These rules are defined in the "Default Job Jacket.xml" file, which is generated by QuarkXPress Server in the preferences folder.

You can specify multiple rule sets in a comma-separated list.

To specify which layouts to evaluate, use the layout parameter.

To evaluate using an external Job Jackets file, use the jobjacket parameter. For example: jobjacket=customjj.xml

Namespace

evaluate

Response

The default Job Jackets file.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/evaluate/MyProject.qxp?ruleset="MyRuleSet"

Example, object model

Request object name: EvaluateRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new EvaluateRequest();   //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getdocinfo parameter request.

Exportprefsasjj

The exportprefsasjj request handler returns the default Job Jackets file as an XML stream. If you add ?download=true. the Job Jackets file is downloaded to the Web browser's default download location as an XML file.

Namespace

exportprefsasjj

Response

The default Job Jackets file.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/exportprefsasjj

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getdocinfo parameter request.

Fileinfo

The fileinfo request handler returns XML that contains the creation date, modification date, and file size of a document.

Namespace

fileinfo

Parameters

action=get

Lets you retrieve the creation date of a file in UTC format. For example:http://localhost:8080/fileinfo/sample.qxd? action=get&creationdate

action=set

Lets you set the creation and modification dates of a file in UTC format. For example:http://localhost:8080/fileinfo/sample.qxp? action=set&creationdate=10-06-2007 12:12:37 UTC& modificationdate=10-06-2007 12:12:37 UTC

Response

The following XML code displays the creation date, modification date, and size of the document.<?xml version="1.0" encoding="UTF-8" ?> <FILEINFO>   <CREATIONDATE>08-01-2004 06:14:07 UTC </CREATIONDATE>   <MODIFICATIONDATE>08-01-2004 11:56:56 UTC </MODIFICATIONDATE>   <SIZE>1519616</SIZE> </FILEINFO>

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password.What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/fileinfo/sample.qxp

Example, object model

Request object name: FileInfoRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new FileInfoRequest();   //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a fileinfo parameter request.

Flush

The flush request handler flushes a document from the cache.

Namespace

flush

Response

The message "CACHE FLUSH COMPLETED."

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password.What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/flush/sample.qxp

Example, object model

Request object name: FlushRequestsdk.QRequestContext rc = new sdk.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new FlushRequest();   //Create the service and call it with QRequestContext object RequestServiceService svc = new RequestServiceService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a flush parameter request.

Flushall

Flushes all documents from the cache. When this request is sent to Server Manager using either HTTP or Web services, the cache of all registered QuarkXPress servers is flushed.

Namespace

flushall

Response

The message "CACHE FLUSH COMPLETED."

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/flushall

Example, object model

Request object name: FlushAllRequestsdk.QRequestContext rc = new sdk.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; rc.request = new FlushAllRequest();   //Create the service and call it with QRequestContext object RequestServiceService svc = new RequestServiceService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);             

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a flushall parameter request.When you issue a flushall request, the memory usage value in the status monitor becomes zero.

Getdocinfo

The getdocinfo request handler returns XML information about a QuarkXPress project that is in the document pool or has been supplied as part of a multipart HTTP request. The returned information includes the project version, the platform on which it was saved, the number of layers, page properties, the length and width of the page in points, the number of pages, the names of imported picture files, the names of any required fonts, the names and IDs of any relevant XTensions modules, and (for documents saved in QuarkXPress 6.0 or later) information about synchronized content.

Namespace

getdocinfo

Response

The XML response looks like the following:<? xml version="1.0" encoding="UTF-8" ?> <PROJINFO>   <PLATFORM>WINDOWS</PLATFORM>   <VERSION>7.0</VERSION>   <NAME>Sample.qxp</NAME>   <REQUIREDXTENSIONS />   <FONTUSAGE>     <FONT>       <NAME>ArialMT</NAME>     </FONT>   </FONTUSAGE>   <LAYOUT>     <NAME>Layout 1</NAME>     <TYPE>Print</TYPE>     <PAGES>4</PAGES>     <PAGEPROPERTIES>       <WIDTH>432</WIDTH>       <LENGTH>756</LENGTH>     </PAGEPROPERTIES>     <LAYERS>       <LAYER>         <NAME>Default</NAME>       </LAYER>     </LAYERS>     <HIRESGRAPHICS>        <GRAPHICLINK>           <FILEPATH>E:\pics\Jpeg\Autumn.jpg</FILEPATH>         <USAGE PAGE="1" UNIQUEID="8" X="126.003" Y="116.967" />       </GRAPHICLINK>     </HIRESGRAPHICS>   </LAYOUT> </PROJINFO>

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getdocinfo/sample.qxp

Example, object model

Request object name: GetDocInfoRequestsdk.QRequestContext rc = new sdk.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new GetDocInfoRequest();   //Create the service and call it with QRequestContext object RequestServiceService svc = new RequestServiceService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getdocinfo parameter request.

Getdocpoollist

The getdocpoollist request handler returns an XML description of all files and folders in the local document pool, including name, size, type, modification date and time, and absolute and relative path.

Namespace

getdocpoollist

Response

XML description of files and folders in the local document pool.

Parameters

directory

Use this parameter to get information about a particular directory in the document pool. For example: http://server:port/getdocpoollist?directory=images

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getdocpoollist

Example, object model

Request object name: GetDocPoolListRequest

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a fileinfo parameter request.

Getlogs

The getlogs request handler returns the current preference settings for QuarkXPress Server in XML format. If you add ?download=true, the logs are returned in a .zip file.

Namespace

getlogs

Response

The QuarkXPress Server transaction log.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getlogs

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getprefs parameter request.

Getprefs

The getprefs request handler returns the current preference settings for QuarkXPress Server in XML format.

Namespace

getprefs

Response

An XML description of QuarkXPress Server preference settings.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getprefs

Example, object model

// Create the service and call getPreferences method RequestService requestService = new RequestServiceStub(); Preferences preferences= requestService.getPreferences("[host]", [port], "[username]", "[port]");

Notes

The getprefs request handler returns preference settings for server configuration and Status Monitor. It does not return other preference settings, such as the settings for Deconstruct and PDF workflow.If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getprefs parameter request.

Getprocessid

The getprocessid request handler returns the process IDs of the master QuarkXPress Server instance and of all subrender processes running on the computer.

Namespace

getprocessid

Response

An XML description of the process IDs of the master QuarkXPress Server instance and of all subrender processes running on the computer. For example:<PROCESSID> <MASTER> <ID>3936</ID> <STATUS>BUSY</STATUS> </MASTER> <SUBRENDERERS> <SUBRENDERER> <ID>1736</ID> <STATUS>BUSY</STATUS> </SUBRENDERER> </SUBRENDERERS> </PROCESSID>

Example GET URL

http://localhost:8080/getprocessid

Getprojinfo

The getprojinfo request handler returns XML information about a QuarkXPress project that is in the document pool or has been supplied as part of a multipart HTTP request. The returned information identifies the operating system, the version of QuarkXPress in which the project was created, the size of the project, the page properties for the project's layouts, and information about named boxes and synchronized text.

Namespace

getprojinfo

Response

The XML response looks like the following:<? xml version="1.0" encoding="UTF-8" ?> <PROJINFO>   <PLATFORM>WINDOWS</PLATFORM>   <VERSION>6.0</VERSION>   <NAME>Sample.qxp</NAME>   <SIZE>1519616 Bytes</SIZE>   <SYNCHRONIZED/>   <LAYOUT>     <NAME>Layout 1</NAME>     <TYPE>Print</TYPE>     <PAGES>4</PAGES>     <PAGEPROPERTIES>       <WIDTH>432</WIDTH>       <LENGTH>756</LENGTH>     </PAGEPROPERTIES>   <NAMEDBOX>     <BOX>box2</BOX>     <BOX>box1</BOX>   </NAMEDBOX>   </LAYOUT> </PROJINFO>

Alerts

The getprojinfo command can only be used for QuarkXPress 6 documents and later.

HTTP Error #500 This alert displays if you specify a QuarkXPress 4.0 or 5.0 document.

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getprojinfo/sample.qxp

Example, object model

Request object name: GetProjectInfoRequestsdk.QRequestContext rc = new sdk.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new GetProjectInfoRequest();   //Create the service and call it with QRequestContext object RequestServiceService svc = new RequestServiceService(); QContentData qc = svc.processRequest(rc);

Notes

The getprojinfo parameter only works with projects saved in QuarkXPress 6.0 and later.If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getprojinfo parameter request.

Getrendererprefs

The getrendererprefs request handler returns the current preference settings for QuarkXPress Server in XML format.

Namespace

getrendererprefs

Response

An XML description of QuarkXPress Server renderer preference settings.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getrendererprefs

Notes

The schema for the returned XML stream can be found at webapps/ROOT/QuarkXPress Server Renderer/QXPSRendererPreferences.xsd.If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getrendererprefs parameter request.

Getserverinfo

The getserverinfo request handler returns XML information about QuarkXPress Server. The returned information includes the platform on which QuarkXPress Server is running, the version of QuarkXPress Server, a list of installed fonts and server XTensions modules, the relevant XTensions server XTensions module IDs, the startup parameters, and the output styles with which the server is running. Disabled server XTensions modules are not listed in the response.

Namespace

getserverinfo

Response

XML containing information about this QuarkXPress server instance.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/getserverinfo

Example, object model

Request object name: GetServerInfoRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new GetServerInfoRequest();   //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getserverinfo parameter request.

Jobjacket

The jobjacket request handler returns a Job Jackets file containing copies of all of the resources in the specified project. This is similar to what happens when you use jjname= in a modifier XML request, but it returns the Job Jackets file directly, rather than writing it to the document pool.

Namespace

jobjacket

Response

A Job Jackets file containing copies of all of the resources in the specified project.

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/jobjacket/myproject.qxp

Example, object model

Request object name: JobJacketRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text;   rc.request = new JobJacketRequest();    //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a getrendererprefs parameter request.

Preflight

Use the preflight request handler to check a project for missing fonts and missing pictures prior to output. You can also use this request handler to determine if the platform on which a project was created is different from the platform on which QuarkXPress Server is running.

The preflight request handler has been deprecated. Use the evaluate request handler instead. For more information, see "Evaulate."

Namespace

preflight

Response

The XML response looks like the following:<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <PREFLIGHT> <PLATFORMMISMATCH>TRUE</PLATFORMMISMATCH> <MISSINGFONT>MidashiGoPro-MB31</MISSINGFONT> <MISSINGPICTURE>/QuarkXPress Server Documents/images/illus_eps.eps </MISSINGPICTURE> </PREFLIGHT>

Alerts

File not found

HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you try to delete a file that is not available to QuarkXPress Server.

Logs

See "Understanding logging."

Example GET URL

To preflight a project in the root folder:http://localhost:8080/preflight/abc.qxpTo preflight a binary file in a subfolder:http://localhost:8080/preflight/sub1/abc.qxp

Example, object model

Request object name: PreflightRequest com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();          if(!this.DocumentSettings1.documentName.Text.Equals(""))   rc.documentName = this.DocumentSettings1.documentName.Text; rc.request = new PreflightRequest(); //Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc);

Setprefs

The setprefs request handler lets you set server preferences. To use this request handler, issue a getprefs request, determine the name of the tag that needs to be modified, and then submit a setprefs request with the using the name of this tag. For example, to turn off memory caching, you would first submit a getprefs request to the server. In the resulting XML, you would note that the name of the tag for memory caching tag is AllowMemoryCaching. Finally, you would submit a setprefs request to the server, like so:

http://localhost:8080/setprefs?AllowMemoryCaching=false

For a full list of preferences, see "General preferences" and "Renderer preferences."

Namespace

setprefs

Response

The message "Preferences successfully set."

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/setprefs?CacheSize=200

Example, object model

EMailPreferences emailPrefs = new EMailPreferences(); emailPrefs.emailFrom = "from@email.com"; emailPrefs.emailTo = "to@email.com"; emailPrefs.smtpPort = "25"; emailPrefs.smtpServerIP = "SMTPServerIP"; Preferences prefs = new Preferences(); prefs.setEmailPreferences(emailPrefs); // Create the service and call setPreferences method RequestService svc = new RequestService(); svc.setPreferences("ServerName", "ServerPort", "Username", "Password", prefs);

Notes

If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a setprefs parameter request.

General preferences

The /getprefs handler lets clients remotely retrieve an XML representation of the current QuarkXPress Server preferences, as described below.

The /setprefs handler lets clients remotely control QuarkXPress Server preferences. For example, http://<servername>:<port>/setprefs?AddConnectionFilter=action=allow;ipaddr=206.195.80.80;mask=255.255.255.1;pos=0 permits connection filters and specifies the IP address and the subnet mask of the connection.

Attribute

Type

Description

CacheSize

integer

Specifies the memory cache size from 1MB to 1024MB.

DocumentRootFolder

string

Specifies the document root directory.

LogTiming

Boolean

Specifies whether to include timing information (such as processing time and opening time) in the transaction log.

ForceServedDocumentsClosed

Boolean

Causes QuarkXPress Server to close projects that are loaded into cache from the document pool after rendering them.

AllowMemoryCaching

Boolean

Specifies whether to store disk-based projects in a memory-resident cache.

DefaultRenderType

string

Sets the default. Valid values include PNG, PDF, EPS, PSCR, QXPD, RAW, RLER, and JPEG.

LogDocProblems

Boolean

Specifies whether to log any project problems.

Setrendererprefs

The setrendererprefs request handler lets you set rendering preferences. To use this request handler, issue a getrendererprefs request, determine the name of the tag that needs to be modified, and then submit a setrendererprefs request with the using the name of this tag. For example, set color TIFF and gray TIFF display preferences, you would first submit a getrendererprefs request to the server, then update these settings and submit a setrendererprefs request to the server, like so:

http://server:port/setrendererprefs?modify=<QXPSRENDERERPREFERENCES>
<DISPLAY><ColorTIFFs>8-bit</ColorTIFFs><GrayTIFFs>16 levels</GrayTIFFs></DISPLAY>
</QXPSRENDERERPREFERENCES>

This request handler sets the preferences for all renderers.

Namespace

setrendererprefs

Response

The message "Preferences successfully set."

Alerts

Incorrect administration realm user name and password.

HTTP Error #401 This alert displays if you specify an invalid administrator user name and password. What to do: Use the user name and password set in the QuarkXPress Server Manager client Server Configuration dialog box.

Logs

See "Understanding logging."

Example GET URL

http://localhost:8080/setrendererprefs?modify= <QXPSRENDERERPREFERENCES><DISPLAY><ColorTIFFs>8-bit</ColorTIFFs> <GrayTIFFs>16 levels</GrayTIFFs></DISPLAY></QXPSRENDERERPREFERENCES>

Notes

The schema for the returned XML stream can be found at webapps/ROOT/QuarkXPress Server Renderer/QXPSRendererPreferences.xsd.If a user name and password have been set in the Server Configuration dialog box, the browser requests that user name and password when you submit a setrendererprefs parameter request.

Renderer preferences

The /getrendererprefs handler lets clients remotely retrieve an XML representation of the current QuarkXPress Server renderer preferences, as described below. For a detailed description of each preference, see "General Preferences dialog box" in A Guide to QuarkXPress Server.

The /setrendererprefs handler lets clients remotely control QuarkXPress Server renderer preferences. For more information, see "Setrendererprefs."

Attribute

Type

Description

DISPLAY

ColorTIFFs

string

Set to 8-bit or 24-bit.

GrayTIFFs

string

Set to 16 levels or 256 levels.

MonitorProfile

string

Set to one of the options under MonitorProfileList.

MonitorProfileList

collection

Includes one <MonitorProfile> element for each available monitor profile.

INPUTSETTINGS

SmartQuotes

Boolean

Set to true or false.

SmartQuoteFormat

integer

Set to the zero-based index of the desired format. For the list of available formats, see the Input Settings pane of the Preferences dialog box in the QuarkXPress Server administrative interface.

SequentialPageRangeSeparator

string

Set to one character only.

NonSequentialPageRangeSeparator

string

Set to one character only.

FONTFALLBACK

ApplyFontFallback

Boolean

Set to true or false.

Search

Boolean

Set to true or false.

SearchType

Boolean

Set to Paragraph or Active Story.

SearchLimit

integer

Set to search limit number.

PreferredFont

string

Includes a <PreferredFont> element with each of the following attributes:ScriptOrLanguage="Cyrillic" ScriptOrLanguage="Greek" ScriptOrLanguage="Latin" ScriptOrLanguage="Japanese" ScriptOrLanguage="Korean" ScriptOrLanguage="Simplified Chinese" ScriptOrLanguage="Traditional Chinese"

SlugLineFont

string

Set to the name of the slug line font.

OPENANDSAVE

OpenSaveNonUnicodeEncoding

string

Set to Roman, Central European, Greek, Cyrillic, Turkish, Japanese, Korean, Simplified Chinese, or Traditional Chinese.

FONTS

SpecifyDefaultFontReplacement

Boolean

Set to true or false.

ReplacementFontRoman

string

Set to the Roman replacement font.

ReplacementFontEastAsian

string

Set to the East Asian replacement font.

HighlightCharacterChanges

Boolean

Set to true or false.

EPS

EPSPreview

string

Set to Embedded or Generate.

PDF

PDFWorkflow

string

Set to PS4D, PDFtoFolder, or DirectPDF.

WatchedFolder

string

Set to the path of the watched folder.

DEFAULTPRINTLAYOUGENERAL

MasterPageItems

string

Set to Keep Changes or Delete Changes.

Framing

string

Set to inside or outside.

AutoPageInsertionMode

string

Set to Off, End of Story, End of Section, or End of Document.

DEFAULTPRINTLAYOUTMEASUREMENTS

HorizontalUnits

string

Set to Inches, Inches Decimal, Picas, Points, Millimeters, Centimeters, Ciceros, Agates, or Q.

VerticalUnits

string

Set to Inches, Inches Decimal, Picas, Points, Millimeters, Centimeters, Ciceros, Agates, or Q.

PointsPerInch

float

Set to the number of points per inch.

CicerosPerCM

float

Set to the number of ciceros per centimeter.

PARAGRAPH

AutoLeading

float

Set to the percentage to use for auto leading.

MaintainLeading

Boolean

Set to true or false.

LockToGridOption

string

Set to Ascent and Descent or Font Size (Em Box).

CHARACTER

SuperScriptOffset

string

Set to the superscript offset percentage.

SuperScriptHScale

string

Set to the superscript horizontal scale percentage.

SuperScriptVScale

string

Set to the superscript vertical scale percentage.

SubScriptOffset

string

Set to the subscript offset percentage.

SubScriptHScale

string

Set to the subscript horizontal scale percentage.

SubScriptVScale

string

Set to the subscript vertical scale percentage.

SmallCapsHScale

string

Set to the small caps horizontal scale percentage.