Quark QuarkXPress Server - 8.1 User Manual

QXP Server 8.1 Web Integration Guide

CONTENTS

Contents
Overview...........................................................................................8
Supported interfaces..............................................................................................8
The Dynamic Publishing Process (DPP)...................................................................8
The WIG and the XTensions Developer Kit (XDK)..................................................9
Changes in this version...................................................................10
Getting started...............................................................................12
Getting started: HTTP...........................................................................................12
Dissecting a QXP Server URL........................................................................................12
Interpreting the QXP Server Manager response...........................................................13
HTTP GET and POST Requests.....................................................................................13
Getting started: Web services..............................................................................17
QRequestContext..........................................................................................................18
QManagerSDKSvc.........................................................................................................19
QRequest......................................................................................................................23
RequestParameters.......................................................................................................23
QContentData...............................................................................................................24
QException...................................................................................................................25
QManagerScriptingSvc.................................................................................................25
QXP Server Manager............................................................................................27
Integrating with other Web servers...............................................................................27
Embedding QXP Server Manager.................................................................................28
Writing special request handlers...................................................................................28
Implementing a custom load balancer..........................................................................29
Generating a custom client SDK class...........................................................................30
Understanding ManagerSDK.xml..................................................................................31
Scripting support...........................................................................................................33
Keep document open (sessions)...................................................................................33
Using the Web interface.................................................................35
Understanding rendering......................................................................................35
Understanding render types.................................................................................36
eps.................................................................................................................................37
ii | QXP SERVER 8.1 WEB INTEGRATION GUIDE
CONTENTS
jpeg...............................................................................................................................39
literal..............................................................................................................................41
pdf.................................................................................................................................41
png................................................................................................................................46
ppml..............................................................................................................................49
qcddoc..........................................................................................................................51
qxpdoc..........................................................................................................................52
screenpdf.......................................................................................................................54
swf.................................................................................................................................57
Understanding render modifiers...........................................................................59
Box................................................................................................................................60
Boxes.............................................................................................................................60
Compositionzone..........................................................................................................61
Layer..............................................................................................................................62
Layout............................................................................................................................64
Movepages....................................................................................................................64
Page..............................................................................................................................66
Pages.............................................................................................................................67
Scale..............................................................................................................................67
Spreads.........................................................................................................................68
Using content modifiers........................................................................................69
Inserting text.................................................................................................................69
Applying a font at import..............................................................................................70
Inserting a picture.........................................................................................................71
Applying picture effects................................................................................................72
Importing XML with placeholders.................................................................................75
Using XML modify................................................................................................77
Modifying box properties and content.........................................................................78
Creating boxes..............................................................................................................81
Deleting boxes..............................................................................................................83
Grouping and ungrouping items...................................................................................84
Creating tables..............................................................................................................85
Modifying text attributes...............................................................................................86
Modifying picture properties.........................................................................................90
Importing data...............................................................................................................93
Exporting Job Jackets files during deconstruction.......................................................96
Using XML deconstruct and construct..................................................................96
Deconstructing a project...............................................................................................97
Constructing a project.................................................................................................100
Working with pages and spreads................................................................................103
QXP SERVER 8.1 WEB INTEGRATION GUIDE | iii
CONTENTS
Working with layers.....................................................................................................104
Working with boxes.....................................................................................................104
Working with groups...................................................................................................106
Working with pictures..................................................................................................107
Working with text........................................................................................................108
Working with tables.....................................................................................................110
Working with sections.................................................................................................112
Working with Composition Zones...............................................................................112
Using XSL transformation............................................................................................113
Working with lists........................................................................................................113
Working with anchored boxes.....................................................................................114
Working with placeholders..........................................................................................115
Working with metadata...............................................................................................117
Working with hidden text............................................................................................117
Using administrative request handlers...............................................................118
Addfile.........................................................................................................................119
Cplatform....................................................................................................................123
Delete..........................................................................................................................123
Clang...........................................................................................................................124
Fileinfo.........................................................................................................................126
Flush............................................................................................................................127
Flushall........................................................................................................................128
Getdocinfo..................................................................................................................128
Getdocpoollist.............................................................................................................130
Getprocessid...............................................................................................................131
Getprojinfo..................................................................................................................132
Getserverinfo...............................................................................................................133
Preflight.......................................................................................................................134
Setprefs.......................................................................................................................135
Shutdown....................................................................................................................136
Modifier DTD (annotated).............................................................137
Entities (Modifier DTD).......................................................................................137
PROJECT (Modifier DTD)....................................................................................139
SAVEAS (Modifier DTD)......................................................................................140
LAYOUT (Modifier DTD).....................................................................................141
ID (Modifier DTD)................................................................................................142
LAYOUTPROPERTY (Modifier DTD)....................................................................143
COLUMNGUIDES (Modifier DTD).......................................................................143
ARTICLE (Modifier DTD).....................................................................................144
COMPONENT (Modifier DTD)............................................................................144
iv | QXP SERVER 8.1 WEB INTEGRATION GUIDE
CONTENTS
SPREAD (Modifier DTD)......................................................................................145
PAGE (Modifier DTD)..........................................................................................145
SECTION (Modifier DTD)....................................................................................146
BOX (Modifier DTD)............................................................................................147
METADATA (Modifier DTD)................................................................................148
VALUE (Modifier DTD)........................................................................................148
TEXT (Modifier DTD)...........................................................................................149
INSET (Modifier DTD).........................................................................................151
STORY (Modifier DTD)........................................................................................151
COPYFIT (Modifier DTD).....................................................................................152
PARAGRAPH (Modifier DTD)..............................................................................153
TEXTNODEPH (Modifier DTD)............................................................................154
TEXTPH (Modifier DTD)......................................................................................154
GROUPCHARACTERS (Modifier DTD)................................................................155
FORMAT (Modifier DTD)....................................................................................155
KEEPLINESTOGETHER (Modifier DTD)..............................................................157
DROPCAP (Modifier DTD)..................................................................................158
LOCKTOGRID (Modifier DTD).............................................................................158
TABSPEC (Modifier DTD)....................................................................................158
TAB (Modifier DTD)............................................................................................159
RULE (Modifier DTD)..........................................................................................159
HIDDEN (Modifier DTD)......................................................................................161
RICHTEXT (Modifier DTD)...................................................................................162
RUBITEXT (Modifier DTD)...................................................................................170
ANCHOREDBOXREF (Modifier DTD)..................................................................171
LINKEDBOX (Modifier DTD)...............................................................................172
OVERMATTER (Modifier DTD)............................................................................172
PICTURE (Modifier DTD).....................................................................................173
CLIPPING (Modifier DTD)...................................................................................175
SPLINESHAPE (Modifier DTD)............................................................................177
CONTOURS (Modifier DTD)................................................................................178
CONTOUR (Modifier DTD)..................................................................................179
VERTICES (Modifier DTD)...................................................................................179
VERTEX (Modifier DTD)......................................................................................179
LEFTCONTROLPOINT (Modifier DTD)................................................................180
VERTEXPOINT (Modifier DTD)...........................................................................180
RIGHTCONTROLPOINT (Modifier DTD)..............................................................181
GEOMETRY (Modifier DTD)................................................................................182
FIT (Modifier DTD)..............................................................................................183
MAX (Modifier DTD)...........................................................................................184
MIN (Modifier DTD)............................................................................................184
LOCATION (Modifier DTD).................................................................................185
SIZE (Modifier DTD)............................................................................................185
QXP SERVER 8.1 WEB INTEGRATION GUIDE | v
CONTENTS
SCALETO (Modifier DTD)....................................................................................185
RELPOSITION (Modifier DTD).............................................................................186
ORIGIN (Modifier DTD).......................................................................................186
WIDTH (Modifier DTD)........................................................................................186
HEIGHT(Modifier DTD).......................................................................................187
POSITION (Modifier DTD)...................................................................................187
MOVEUP (Modifier DTD)....................................................................................187
MOVEDOWN (Modifier DTD).............................................................................187
MOVELEFT (Modifier DTD).................................................................................187
MOVERIGHT (Modifier DTD)..............................................................................188
GROWACROSS (Modifier DTD)..........................................................................188
GROWDOWN (Modifier DTD).............................................................................188
SHRINKACROSS (Modifier DTD).........................................................................188
SHRINKDOWN (Modifier DTD)...........................................................................189
ALLOWBOXONTOPASTEBOARD (Modifier DTD)..............................................189
ALLOWBOXOFFPAGE (Modifier DTD)...............................................................189
STACKINGORDER (Modifier DTD)......................................................................190
SUPPRESSOUTPUT (Modifier DTD)....................................................................190
TOP (Modifier DTD)............................................................................................190
LEFT (Modifier DTD)...........................................................................................190
BOTTOM (Modifier DTD)....................................................................................190
RIGHT (Modifier DTD).........................................................................................191
RUNAROUND (Modifier DTD)............................................................................191
LAYER (Modifier DTD)........................................................................................194
RGBCOLOR (Modifier DTD)................................................................................195
LINESTYLE (Modifier DTD).................................................................................195
CONTENTPH (Modifier DTD)..............................................................................196
CONTENT (Modifier DTD)..................................................................................196
SHADOW (Modifier DTD)...................................................................................197
FRAME (Modifier DTD).......................................................................................199
PLACEHOLDER (Modifier DTD)..........................................................................200
TABLE (Modifier DTD).........................................................................................200
PARENTTABLE (Modifier DTD)...........................................................................202
TABLEBREAK (Modifier DTD).............................................................................202
CHILDID (Modifier DTD).....................................................................................203
ADDCELLS (Modifier DTD).................................................................................203
DELETECELLS (Modifier DTD)............................................................................204
COLSPEC (Modifier DTD)....................................................................................204
COLUMN (Modifier DTD)....................................................................................205
ROW (Modifier DTD)...........................................................................................206
HEADER (Modifier DTD).....................................................................................207
FOOTER (Modifier DTD).....................................................................................207
CELL (Modifier DTD)...........................................................................................207
vi | QXP SERVER 8.1 WEB INTEGRATION GUIDE
CONTENTS
GRID (Modifier DTD)...........................................................................................209
GRIDLINE (Modifier DTD)...................................................................................209
GROUP (Modifier DTD).......................................................................................210
BOXREF (Modifier DTD).....................................................................................211
COMPOSITIONZONE (Modifier DTD).................................................................211
LIST (Modifier DTD)............................................................................................213
RUBI (Modifier DTD)...........................................................................................213
Sample applications.......................................................................214
Sample applications: QXP Server.......................................................................214
Sample applications: QXP Server Manager........................................................215
Sample applications legal notice.........................................................................215
Contacting Quark..........................................................................224
QXP SERVER 8.1 WEB INTEGRATION GUIDE | vii

OVERVIEW

Overview
Welcome to the QuarkXPress® Server Web Integration Guide (WIG). The WIG describes
the QuarkXPress Server interface and includes sample applications that demonstrate how
to build a solution that integrates with QuarkXPress Server or QuarkXPress Server Manager.

Supported interfaces

The WIG describes two interfaces 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".
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 of the JDK.
To use Web Objects in ASP.NET / Visual C#, you must have the .NET 1.1/2.0 framework
and development environment (Visual Studio).

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.
8 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
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.

The WIG and the XTensions Developer Kit (XDK)

The WIG lets Web developers build client applications that use the features available in
QuarkXPress Server. The XDK lets software developers implement features that are not
available in QuarkXPress Server, such as server-side processing and application-specific
services.
The QuarkXPress Server XDK requires knowledge of C or C++.
OVERVIEW
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 9

CHANGES IN THIS VERSION

Changes in this version
The new features in QuarkXPress Server 8.1 include the following:
The ability to construct, deconstruct, modify, and apply drop shadows to groups and
anchored groups (for more information, see "Working with groups," "Grouping and ungrouping
items," "GROUP (Modifier DTD)," and ANCHOREDBOXGROUPMEMBER in "BOX (Modifier DTD)"
and "TABLE (Modifier DTD)")
Support for exporting Print layouts and Interactive layouts as SWF (Flash) files (for more
information, see "swf" and "LAYOUT (Modifier DTD)")
The ability to check a project for missing pictures (for more information, see "Preflight")
The ability to save a QuarkXPress project file as a template or save a QuarkXPress template
as a project (see saveastemplate in "qxpdoc")
The ability to save a QuarkCopyDesk article file as a template or save a QuarkCopyDesk
template as an article (see saveastemplate in "qcddoc")
The ability to include a page picture when exporting an article from a QuarkXPress layout
(see includepagepicture in "qcddoc")
The ability to move pages prior to rendering (for more information, see "Movepages")
The ability to control the inclusion of fonts in exported EPS files (see
downloadlayoutFonts and downloadImportedPdfEpsFonts in "eps")
The ability to render blank pages when creating EPS files (see produceblankpages in
"eps")
The ability to describe item positions in spread-based coordinates when constructing,
deconstructing, and modifying projects in XML (for more information, see "XML" and
"RELPOSITION (Modifier DTD)," "ORIGIN (Modifier DTD)," "WIDTH (Modifier DTD)," and
"HEIGHT(Modifier DTD)")
The ability to resize a box to fit its content (for more information, see "Fitting a box to text
or a picture," "FIT (Modifier DTD)," "MAX (Modifier DTD)," "MIN (Modifier DTD)," "LOCATION
(Modifier DTD)," "SIZE (Modifier DTD)," and "SCALETO (Modifier DTD)")
The ability to apply section-specific numbering and formatting to automatic page numbers
(for more information, see "Working with sections," "SECTION (Modifier DTD)," and
PAGENUMBERCHAR in "RICHTEXT (Modifier DTD)")
10 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
CHANGES IN THIS VERSION
The ability to differentiate between intrinsic fonts and software-generated "faux" bold/italic
fonts (for more information, see FAUXSTYLE in "PARAGRAPH (Modifier DTD)" and
"RICHTEXT (Modifier DTD)")
Support for picture background colors (see PICBACKGROUNDCOLOR, PICBACKGROUNDSHADE, and PICBACKGROUNDOPACITY in "PICTURE (Modifier DTD)")
The ability to clear a picture from a picture box (see CLEARPICTURE in "PICTURE (Modifier
DTD)")
The ability to specify which page of an imported PDF should be displayed in a box (see
PAGETOIMPORT and BOUNDINGBOX in "CONTENT (Modifier DTD)")
The ability to control corner style for boxes (see CORNERSTYLE in "GEOMETRY (Modifier
DTD)")
The ability to apply a skew value to boxes (see SKEW in "GEOMETRY (Modifier DTD)")
Support for Mojigumi sets (see MOJIGUMISET in "FORMAT (Modifier DTD)")
The ability to link text boxes to table cells (see ROWCOUNT and COLUMNCOUNT in "LINKEDBOX
(Modifier DTD)")
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 11

GETTING STARTED

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

You can submit HTTP requests to QuarkXPress Server as URLs manually from a browser
or automatically from an HTTP client application. QuarkXPress Server processes such
requests and returns rendered content in the HTTP responses. Depending on the type of
request, QuarkXPress Server preferences, and the type of content returned, 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 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.
12 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
[DocumentName]: The name of the QuarkXPress project that you can access from the
document pool or the content provider.
[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]/quark/servlet/qxpsm/[namespace]/[directory]/[DocumentName]?[parameter]=Value
This Guide provides numerous sample URLs in QuarkXPress Server format. To convert these examples for use with QuarkXPress Server Manager, simply insert /
quark/servlet/qxpsm after [port]/ .
Versions of QuarkXPress Server Manager prior to 7.22 required absolute paths. 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, plys any
header error codes returned by QuarkXPress Server. For example:
<?xml version="1.0" encoding="UTF-8" ?> <error> <httpresponsecode>404</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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 13
GETTING STARTED
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/>
14 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
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()"/>
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 15
GETTING STARTED
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 Quark
Data Import XTensions software, which is necessary to import text and picture files.
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.
16 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
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 a 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.
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 POST with 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>/quark/services/qxpsmsdk?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 "Using the Web interface." In addition to the classes listed there,
the Web services interface includes the following:
QManagerSDKSvc processes QuarkXPress Server requests. This object's generic processRequest() method takes a QRequestContext argument and returns a
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 17
GETTING STARTED
QContentData object containing the response. For more information, see the sample
applications and "Using the Web interface."
QRequestContext is the argument you pass to QManagerSDKSvc. 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. This object is returned
by the getErrorObject() method.
Description
QManagerScriptingSvc is the Web services scripting interface.
You can extend the WIG to include your own XTensions software applications by simply
modifying an XML file and redeploying the WIG Web service.
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

An argument passed to QManagerSDKSvc. Contains settings that must be set once per request. All chained requests must be set inside the request context.
Web service data objectType
NameMembers
documentName
DescriptionTypes
File or object name on which the command will be rendered.String
serverName
serverPort
userName
userPassword
String
18 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
Server name. Default is NULL. Load balancer searches for the host itself in this case.
Port at which the desired server is listening.Integer
Server admin username.String
Server admin password.String
GETTING STARTED
Example, object model
maxRetries
requestTimeout
useCache
responseAsURL
bypassFileInfo
context
sdk.QRequestContext rc = new sdk.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;
Integer
Boolean
Boolean
Boolean
QRequestrequest
Max number of times to try executing the command before returning failure.
Max time out in milliseconds.Integer
Indicates whether the cache should be checked for an existing result or if the command should be executed again.
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.
Indicates whether file info should be fetched before executing the command.
Context in which the command is being executed.String
QuarkXPress Server request is instances of request objects chained together.
Description
Methods
//Create the service and call it QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);

QManagerSDKSvc

Web service called to process the QuarkXPress Server request. QManagerSDKSvc has a generic method named processRequest() that takes QRequestContext as an argument and returns QContentData as the QuarkXPress Server response.
Web serviceType
processRequest
createSession
Processes the request context and returns the result.
DescriptionTypeParameter
QRequestContextrequestCmd
Creates a new session and returns a session ID.
timeout
Long
Argument passed to
QManagerSDKSvc. Contains settings
that must be set once per request. All chained requests are set inside the request context.
DescriptionTypeParameter
Timeout for the session in milliseconds. If no call is executed in that time, session is expired and all the open documents in that
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 19
GETTING STARTED
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
closeDoc
closeSession
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.
DescriptionTypeParameter
sessionId
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.
docName
sessionId
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.
String
String
Session whose documents are to be closed.
DescriptionTypeParameter
Document to be closed.String
Session in which document was opened.
DescriptionTypeParameter
getErrorObject
getOpenDocs
getOpenSessions
getPreferences
setPreferences
getXPressDOM
sessionId
Gets the internal error object. If you receive an exception from Web services, and that exception was caused by QuarkXPress Server or Manager (rather than a runtime exception such as a null pointer exception), you can call this method and pass a stringified form of the exception. The method returns an error object which has easy-to-use methods for getting the error code, getting the error message, and so forth.
Gets all the open documents in the session. If the session does not exist, an error is returned.
sessionId
Gets all open sessions.
Gets QuarkXPress Server preferences.
Sets QuarkXPress Server preferences.
Creates a DOM for the specified document.
String
Session to be closed.String
DescriptionTypeParameter
Session whose open documents are sought.
20 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
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.
DescriptionTypeParameter
docName
jobJacketName
jobTicketName
host
String
String
String
Document to be opened for modification. Provide the name only. You can proivde a relative path when you save the document.
Name of the Job Jackets file to be used. The Job Jackets file is assumed to be already available on the QuarkXPress server computer.
Name of the Job Ticket to be used.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.
openDoc
port
sessionId
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.
docName
host
port
sessionId
Integer
String
String
String
Integer
String
The port for the server specified in the host parameter.
Session in which the document should be opened.
DescriptionTypeParameter
Document (along with relative path if required) to be opened for modification.
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.
The port for the server specified in the host parameter.
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
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 21
GETTING STARTED
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).
DescriptionTypeParameter
saveAllDocs
QRequestContextreqContextObj
sessionId
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).
relativePath
String
String
Request to be executed.
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.
DescriptionTypeParameter
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.
saveDoc
sessionId
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).
docName
newName
relativePath
String
String
String
String
Session in which the document exists.
DescriptionTypeParameter
Document to be saved. Must be the same name that was used when opening or creating the document.
New name of the document. If null, the document is saved with the old name.
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
22 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
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.
Example, object model
Description
sessionId
getXPressDOMEx
getXMLFromXPressDOM
getXPressDOMFromXML
QRequestContext rc = new QRequestContext(); rc.documentName = "test.qxp"; rc.responseAsURL = false;
JPEGRenderRequest jpegRequest = new JPEGRenderRequest(); rc.request = jpegRequest;
QManagerSDKSvcService svc = new QManagerSDKSvcService(); QContextData response = svc.processRequest(rc);
Lets you create a DOM of a particular layout or portion of a layout.
Creates an XML string out of the DOM.
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.
String
Session in which the document exists.

QRequest

Base class for all request objects (such as PDFRenderRequest). All request objects share some common data members, which are described below.
Web service data objectType
Additional comments
NameMembers
QRequestrequest
DescriptionTypes
QuarkXPress Server request that includes instances of request objects chained together.

RequestParameters

Generic class for executing any request and for adding dynamic properties to a request.Description
Web service data objectType
NameMembers
namespace
NameValueParam[]params
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.
DescriptionType
Namespace of the request (for example, jpeg).String
Parameter array for the specified request (for example, jpegquality).
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 23
GETTING STARTED
Example, object model
Description
QRequestContext rc = new QRequestContext(); RequestParameters request = new RequestParameters(); request.setNamespace("jpeg"); rc.setRequest = request; NameValueParam p1 = new NameValueParam(); p1.setParamName = "jpegquality"; p1.setTextValue = "4"; request.setParams(new NameValueParam[]{p1});

NameValueParam

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.
Web service data objectType
NameMembers
paramName
textValue
streamValue
String
String
byte[]
DescriptionType
Name of the parameter. In most cases this will be the name/ID of the box.
Text value of the box. (You can set either textValue or
streamValue.)
Stream value of the box. (You can set either textValue or
streamValue.)
contentType

QContentData

A response to a Web Services call to QuarkXPress Server.Description
Web service data objectType
NameMembers
contentType
textData
responseURL
streamValue
encodingType
actualServerPortUsed
The MIME content type of the parameter.String
String
String
String
binary
String
DescriptionTypes
The type of the response. For example, "text/xml" or "text/plain."
If the response type is text, this contains the text. Otherwise, this value is null.
If the responseAsURL parameter was set to "true" in the request, this contains the URL of the response. Otherwise, this value is null.
If the response type is binary, this contains the byte array. Otherwise, this value is null.
If the response type is text, this value indicates the encoding of the text (for example, UTF-8 or ANSI).
Identifies the server port.String
actualServerUsed
24 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
Identifies the server.String
GETTING STARTED
Example, object model
Description
Type
headers
multipartResponse
QRequestContext context = new QRequestContext(); context.setDocumentName("sample.qxp"); context.setResponseAsURL(true); JPEGRenderRequest request = new JPEGRenderRequest(); request.setJPEGQuality("4"); context.setRequest(request); QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); QContentData response = service.processRequest(context); System.out.println(response.getResponseURL());
String
String
If the response returned by the server is a set of headers, this array contains the header response.
If the response returned by the server is multipart, this array contains the multipart response parts.

QException

Exception class for QuarkXPress Manager. This class is returned by the getErrorObject method.
Exception
NameMembers
httpResponseCode
DescriptionTypes
HTTP response code.String
Example, object model
managerErrorCode
managerErrorMessage
serverErrorCode
serverErrorMessage
serverExtendedMessage
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 (Exception ex) { //PLEASE NOTE that the following would work only if //QuarkXPress Manager threw an exception and it is not //a runtime exception. In latter cases, an empty //error object will be returned. QException error = getService().getErrorObject(ex.toString()); System.out.println(error.getServerErrorCode()); }
QuarkXPress Server Manager error code.String
QuarkXPress Server Manager localized error message.String
QuarkXPress Server error code.String
QuarkXPress Server response message.String
QuarkXPress Server extended error message.String

QManagerScriptingSvc

Scripting interface via Web service.Description
Web service data objectType
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 25
GETTING STARTED
Methods
checkScriptSyntax
deleteScript
executeScript
executeScriptFunction
executeScriptFunctionWithArguments
Checks the syntax of a script.
DescriptionTypeParameter
id
Deletes a script.
id
Executes a script.
id
Executes a function of a script.
id
function
Executes a function of a script, with passed arguments.
Script ID.String
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Scipt ID.String
DescriptionTypeParameter
String ID.String
Function to execute.String
executeScriptWithVars
getAllScripts
getErrorObject
getScript
DescriptionTypeParameter
id
function
arguments
Executes a script with variables for the script to use.
id
Gets all scripts saved with the system.
Creates an error object from a error string.
errorString
Gets the script with the specified ID.
String[]
QScriptVar[]variables
String ID.String
Function to execute.String
Arguments to pass to function.
DescriptionTypeParameter
Script ID.String
Variables to be used by script.
DescriptionTypeParameter
Error string to use.String
getScriptExecutionDetails
26 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
id
Gets the runtime details of a script.
DescriptionTypeParameter
Script ID.String
GETTING STARTED
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Language to check.String
DescriptionTypeParameter
Script to update or add.
getSupportedLanguages
isLanguageSupported
updateScript
scriptId
Gets the supported scripting languages.
Checks whether a particular scripting language is supported.
language
Updates a script. If the script does not exist, this function adds it.
QScriptscript

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."

Integrating with other Web servers

By default, QuarkXPress Server Manager is integrated with Tomcat.
QuarkXPress Server Manager needs a cache virtual directory to work. The context definition file contains a bean definition called ContainerAdapter. By default, it uses the Tomcat adapter, QTomcatContainerAdapterImpl. This adapter assumes the virtual directory to be cache and reads the location of the virtual directory from the "cache.xml" file, which is located in Tomcat's conf/Catalina/localhost folder.
If QuarkXPress Server Manager needs to be hosted in another web server, you can write your own adapter or use QDefaultContainerAdapterImpl (which is provided with
QuarkXPress Server Manager). This adapter assumes that the cache folder is located under
the Web application context folder. The name of the cache folder can be set using the Spring configuration file or the setCacheFolderRelativePath method.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 27
GETTING STARTED

Embedding QXP Server Manager

You can embed QuarkXPress Server Manager in applications (stand-alone or otherwise).
To do so, you must first initialize QuarkXPress Server Manager, as shown below:
QConfigurationData initializationData = new QConfigurationData(); initializationData.setBeanDefinitionConfigFile("ManagerContainerConfig.xml"); QClassFactory.getInstance().init(initializationData);
You can configure other QuarkXPress Manager options using QConfigurationManager.
Next, you must register one or more QuarkXPress Server hosts, like so:
QConfigManager configManager = QClassFactory.getInstance().getExecutionEngine().getConfigManager();
String currentDirectory = System.getProperty("user.dir"); configManager.setCacheFolder( new File(new File(currentDirectory), "cache").getAbsolutePath());
configManager.setLogLevel(STANDALONE_CLIENT_LOG_LEVEL); configManager.setPingType(QPingTypeEnum.PING_SIMPLE);
QConnectionInfo connInfo = new QConnectionInfo(); connInfo.setServerName(<XPRESS_SERVER_NAME>); connInfo.setServerPort(<XPRESS_SERVER_PORT>); connInfo.setUserName(<XPRESS_SERVER_ADMIN_USER>); connInfo.setPassword(<XPRESS_SERVER_ADMIN_PASSWORD>); QHostSummary host = new QHostSummary(); host.setConnectionInfo(connInfo); configManager.registerHost(host);
Once you have done so, you can use the embedded QuarkXPress Server Manager as shown
below:
XMLRequest xmlRequest = new XMLRequest(); QRequestContext context = new QRequestContext(); context.setDocumentName(<SAMPLE_DOCUMENT>); context.setResponseAsURL(false); context.setRequest(xmlRequest); QContentData response = QRequestProcessor.getInstance().processRequest(context); System.out.println(response.getTextData());

Writing special request handlers

If you need to perform custom actions on specific flags, you need to define special flags
and write handlers for them. These flags can then be passed as GET parameters to the servlet, as additional QParam parameters in QCommand (executed using
QManagerSvc.executeCommand), or as additional NameValueParam parameters in a
derived class of QRequest using QManagerSDKSvc.processRequest. The servlet will
automatically create parameters out of these flags and set these in the command before
sending it for execution.
To handle these special flags, you can write your request handler derived from the class
QRequestHandler. You can then insert this new handler class anywhere in the chain of
responsibility pattern, starting with QDocProviderImpl and ending with
QHostRequestHandler.
Try not to change end points. In your handler implementation, handle your special flags,
then either return a response after handling or pass the control to the successor for further
handling.
28 | QXP SERVER 8.1 WEB INTEGRATION GUIDE

Implementing a custom load balancer

To implement a custom load balancer, first implement the
com.quark.manager.lb.QLoadBalancer interface. To use this interface, add a reference
to "managerengine.jar" to your project.
This interface method contains the following methods:
getLoadBalancerAlgorithm
GETTING STARTED
Signature
Description
getLoadBalancerDescription
Signature
Description
useFileInfo
Signature
Description
Returns
getAvailableHost
Signature
public String getLoadBalancerAlgorithm();
Returns the name of the algorithm that is mapped to the current load balancer while loading the server.
The algorithm name used to load-balance the list of hosts.Returns
public String getLoadBalancerDescription();
Gets the description of the load-balancing algorithm so it can be displayed in the QuarkXPress Server Manager client.
Description of the load balancer.Returns
public Boolean useFileInfo();
Gets a flag that indicates whether the load balancer uses file information to decide on which host to use.
True if the fileinfo command should be fired before rendering, otherwise false.
public QHostProxy getAvailableHost(QHostProxy[] hosts, QCommand command);
Parameters
Gets an available host out of the provided list of hosts to execute the specified command.Description
hosts: List of hosts that should be scanned for the most eligible host. command: Command for which host is being searched.
Available host. Can be used for next request.Returns
Next:
Make a jar for the load balancer.
1
Deploy the jar to the following folder: {Apache-Tomcat
2
Home}\webapps\axis\WEB-INF\lib
Configure "ManagerContainerConfig.xml" for bean mapping:
3
1
Navigate to {Apache-Tomcat Home}\webapps\axis\WEB-INF\classes .
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 29
GETTING STARTED
2 Open the "ManagerContainerConfig.xml" file and look for the XML tag bean whose
id has the value ConfigurationManager.
3
Within that tag find the property name availableLoadBalancers.
4
In the <list> tag, add the following: <ref bean={your newbeanID}/>
5
Above this ConfigureManager tag, define the bean ID as your new bean ID: <bean
id={your newbeanID} class={yourLoadBalancerClass}/>
6 Restart the Tomcat server.
7 Log on with the QuarkXPress Server Manager client and choose Global Setting > Load
Balancer Method > Choose Load Balancer.
8 Locate your new load balancer method, then click Save.

Generating a custom client SDK class

To generate a custom client SDK class, add new classes and generate new stubs as described
in the topics below.
Adding new SDK classes
To add new SDK classes:
Modify "ManagerSDK.xml" (located in Server/utilities/) to reflect changes in
1
"Modifier.dtd."
Using a different folder, create backups of "managersdkro.jar," "managerdomgenerator.jar,"
2
and "managerrequestserializer.jar." All of these files are located in <Installation
Folder>/Server/apache-tomcat–5.5.16/webapps/quark/WEB-INF/lib.
Execute Server/utilities/ClientSDKRequestObjectGenerator.sh (Mac OS) or
3
Server/utilities/ClientSDKRequestObjectGenerator.bat (Windows) and look
for errors. If you encounter an error, address the problem, then execute
ClientSDKRequestObjectGenerator again. When the process completes successfully,
"managersdkro.jar", "managerdomgenerator.jar", and "managerrequestserializer.jar" are regenerated in the webapps/quark/WEB-INF/lib folder. Check the timestamps to verify
that the files are new.
Launch QuarkXPress Server Manager.
4
Modify Server/utilities/deploy_sdk.wsdd to add the bean mapping for the newly
5
generated class. To make change tracking easier, position the mapping within the classes
to match the position of any changes made to the DTD or XML.
Edit Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
6
(Windows) to change the port number where QuarkXPress Server Manager is running (if
it is different from 8090).
Execute Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
7
(Windows) and check for errors.
30 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
Open a Web browser and enter the following URL:
8
http://localhost:8090/quark/services/qxpsmsdk?wsdl. Verify that the class you
just added is visible in WSDL.
Generating new SDK stubs
To generate new stubs:
Execute Server/utilities/stub.sh (Mac OS) or Server/utilities/stub.bat
1
(Windows) and look for errors. If you encounter an error, address the problem, then execute
Server/utilities/stub.sh or Server/utilities/stub.bat again. If the process
succeeds, "managerwebservicestubs.jar" is generated in the Server/utilities directory.
You can use these Java stubs in Java applications that communicate with QuarkXPress Server
Manager.
If the application you are developing is in Visual Studio .NET, then you need to generate
2
stubs again. Simply open your solution in Visual Studio, then either refresh the Web service
reference or remove the Web service reference and then add it again.

Understanding ManagerSDK.xml

"ManagerSDK.xml" is used to generate client SDK classes for QuarkXPress Server requests.
Each element in "ManagerSDK.xml" corresponds to a request handler, a render type, or
an element in the DTD.
A client SDK class is generated for each element in the XML. Each property in the DTD
and each parameter of the request handler or render type also corresponds to a unique
element in the XML.
A Class variable is generated for each property, as follows.
<Class>: One element for each SDK class generated. The class generated is derived from QRequest. Attributes are:
name: The name of the generated class.
namespace: The namespace recognized by QuarkXPress Server when this request
class is translated into a QuarkXPress Server request.
description: A description of the class. Unless this value is null, the description
forms the header of the generated class and is included in the generated API docs.
alias: The alias to be used as an element name if this request class is serialized to
XML. For example, when the Project class is serialized to XML, the element used is Project.
serializeAs: Determines how the class is serialized. The valid values are:
nameValue indicates that all members of the class should be handled as
name-value pairs in the request to QuarkXPress Server. (This is the default option in JPEGRenderRequest and ModifierStreamRequest.)
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 31
GETTING STARTED
xml indicates that the class should be serialized as XML with the class name
or alias as the element value. All of the fields of the class are serialized as child elements. If the field is a subclass of QRequest, it is processed recursively. If the field is an array, it must be an array of QRequest-derived
classes.
mixed indicates that the class should be serialized as XML with the class
name or alias as the element. All the primitive fields of the class are serialized as attributes. If the field is a subclass of QRequest, it is serialized as a child
element and processed recursively. If the field is an array, it must be an array of QRequest-derived classes.
attribute indicates that the class should be serialized as XML with the
class name or alias as the element. The class must be primitive. All such
fields must be serialized as attributes of the element. Also, "value" fields
must be serialized as values of the element. Valid only if the parent class has a serializeAs value of "xml" or "mixed."
<Attribute>: One element for each class field.
name: The name of the generated class variable.
accessor: The name of the accessor that gets the property. If this value is null, the
default accessor name is used. The default name is "get" + CamelCase(name) (for
example, if the name of the property is "quality," the default accessor method is
getQuality).
mutator: The name of the accessor that sets the property. If this value is null, the
default mutator name is used. The default name is "set" + CamelCase(name) (for
example, if the name of the property is "quality," the default mutator method is
setQuality).
description: A description of the attribute. Unless this value is null, the description
is included in variable headers and accessor and mutator headers and is included in
generated API docs.
type: The type of the class variable. If this value is null, the default type (string)
is used. If this is not a primitive data type, it should be defined as a separate Class element. If this attribute has a value of "reference," it means the class defined by name is a reference that will be used by a reference attribute in the same Class element.
Before serialization, the referring values are set in this instance.
reference: Unless this attribute has a null value, during serialization the value of
the field should be set in the reference class provided. Note that the reference class
should be declared using "type=reference" as explained above.
readonly: If this value is true, this field is for read-only purposes and should be
ignored during serialization.
hidden: If this value is true, this field should be generated as a private variable. As
such, it would not be included in WSDL.
32 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
GETTING STARTED
deprecated: If this value is true, this field has been deprecated, should not be used,
is not supported, and will be removed in a future version of QuarkXPress Server.
cdata: If this value is true, the value of this field is to be wrapped in a cdata section
before being sent to QuarkXPress Server. This is valid only if the field is "value", that
is value of the element in modifier XML.
<others>: If any other attributes are defined, a class field with the name as <name>_<others> is created, and you can write your own implementation for it.

Scripting support

You can write server-side scripts for QuarkXPress Server Manager. These scripts are actually
clients that run in the same context as QuarkXPress Server Manager in Tomcat, but do not
have the overhead of SOAP.
Although you can write scripts with almost any script-editing application, you might want
to use the QuarkXPress Server Manager Scripting Environment, which ships with
QuarkXPress Server Manager. You can use this application to write scripts, run scripts
manually, and schedule scripts to start and end at specific times or until specific conditions
are met.
QuarkXPress Server Manager also includes a number of sample scripts and libraries for
reference. The libraries include ready-to-use functions. The samples show you how to use
the libraries, and also how to write scripts without using those libraries.
When writing scripts, you can directly access the functions named print, readUrl,
runCommand, spawn, sync, load, debug, info, warn, error, and exception. Launch
QuarkXPress Server Manager Scripting Environment and open the sample scripts to see
how these functions are used.
By default, the scripting environment uses the file system to store the scripts. However, if
the need arises, you can write a custom implementation of the storage provider by implementing the QScriptStorage interface and configuring the Spring configuration
file, "ManagerContainerConfig.xml." Scripts you save in this way can also be executed
remotely using Web services; for more information, see "QManagerScriptingSvc."

Keep document open (sessions)

In early versions of QuarkXPress Server Manager, the software opened a QuarkXPress
project, performed a function, and then closed the project. To avoid the delays involved
in repeatedly opening and closing a QuarkXPress project, QuarkXPress Server Manager
can now keep QuarkXPress projects open until they need to be closed.
To keep projects open for a set period of time, create a session and then open one or more
projects in that session. You can specify a timeout interval while creating the session. If
the session is not used during the interval, all open projects in that session are closed.
An open project can be modified and saved at any time during the process. An open project
can even be saved at another location relative to the QuarkXPress Server document pool.
You can also create a new project and keep it open.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 33
GETTING STARTED
For an example of session management, see the dynamicfit scripting sample included
with QuarkXPress Server Manager. This script opens a session, opens a QuarkXPress project,
and then modifies a text box until the text in it fits.
34 | QXP SERVER 8.1 WEB INTEGRATION GUIDE

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.
USING THE WEB INTERFACE
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 DTD. 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: HTTP."
Alerts
document type. Please select a QuarkXPress document or template.
HTTP Error #500Cannot open this
This alert displays if you try to render a file that is not a QuarkXPress project that exists in the document pool.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 35
USING THE WEB INTERFACE
document pool is not enabled.
read or write to disk.
required volume or folder.
HTTP Error #404The file system
This alert displays if the file system document pool is disabled.
What to do: In QuarkXPress Server, choose QuarkXPress Server > Server Configuration to display the Server Configuration dialog box, then check Enable File System Document Pool.
HTTP Error #404File not found
QuarkXPress Server Error #–43
This alert displays if you try to render a project that does not exist.
HTTP Error #500I/O error trying to
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 QuarkXPress Server, choose QuarkXPress Server > Server Configuration to display the Server Configuration dialog box, then choose
a shared folder.
HTTP Error #404Cannot find
QuarkXPress Server Error #–35
This alert displays if QuarkXPress Server is running on Mac OS and a shared network volume was selected as the document pool, but the volume is no longer shared.
What to do: In QuarkXPress Server, choose the menu option
QuarkXPress Server > Server Configuration to display the Server Configuration dialog box, then choose a shared volume.
Logs
Example, GET URL

Understanding render types

If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/4/2005 13:49:36 sample.qxp Type: image/jpeg Size: 64002 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. The transaction entry in the QuarkXPress Server Error Log file 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:
8/4/2005 13:51:32 Error Error Code: 10119 Cannot open this document type. Please select a QuarkXPress project or template.
http://localhost:8080/sample.qxp
There are two ways to specify a render format:Notes
1. Enter the render type directly in the browser address field:http://localhost:8080/pdf/project.qxp.
2. In QuarkXPress Server, choose QuarkXPress Server > Server Configuration to display the
Server Configuration dialog box, then choose the default render type from the Default Render Type drop-down menu in the Server tab.
Render types are namespaces you can use to return a QuarkXPress project in a specified file
format. The topics covered here include the following:
36 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
QuarkXPress Server Manager object model classesDescriptionFunction
raw
Returns an EPS file.eps
Returns a JPEG image.jpeg
Returns a PDF file.pdf
Returns a PNG image.png
Returns a PostScript file.postscript
Returns PPML output.ppml
Returns a QuarkCopyDesk article.qcddoc
Returns a QuarkXPress project file.qxpdoc
Returns an RLE Raw Custom format image.qxpr
Returns a project in a QuarkXPress internal format.
Returns a low-resolution PDF file.screenpdf
Returns a SWF file.swf
The default render type is JPEG.
EPSRenderRequest
JPEGRenderRequest
PDFRenderRequest
PNGRenderRequest
PostScriptRenderRequest
PPMLRenderRequest
CopyDeskDocRequest
QuarkXPressRenderRequest
RLERawCustomRenderRequest
RawCustomRenderRequest
ScreenPDFRenderRequest
SWFRenderRequest
Namespace
Parameters
Developers can implement additional rendering formats through server XTensions software.
eps
The eps render type returns an EPS rendering of a page or spread.
EPS
outputstyle
epsformat
epspreview
stylename
color | dcs2
tiff | none
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
Lets you specify an EPS format. The default value is color.
Lets you include or omit a TIFF preview. The default value is tiff.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 37
USING THE WEB INTERFACE
Render modifier parameters
epsdata
epstransparent
page
produceblankpages
scale
spread
layout
downloadlayoutFonts
ascii | binary | clean8bit
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
Float .1 to 6.92 for Windows .1 to 8 on Mac OS
Integer
String
1 | 0 | true | false | yes | no
Lets you specify a data type for the EPS file. The default value is
clean8bit.
Lets you specify whether the EPS can include transparent areas.
Lets you specify a page.Integer
Lets you specify whether to render blank pages.
Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on Windows.
Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Lets you specify whether to download all fonts used in the layout and all system fonts.
Alerts
Logs
downloadImportedPdfEpsFonts
An EPS file.Response
way of rendering the desired objects.
This Output Style does not exist.
This Output Style cannot be used with this render type.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 10:03:30 eps/sample.qxp Type: application/postscript Size: 2654464 Client:
127.0.0.1
If any alert is displayed, an error message is written to the QuarkXPress Server Error Log file. The transaction entry in an 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 log transaction entry:
8/3/2005 11:27:24 Error Error Code: 10008 The renderer for this image type has no way of rendering the desired objects.
1 | 0 | true | false | yes | no
HTTP Error #406The renderer for this image type has no
This alert displays if you submit a render request with the pages or box parameter.
This alert displays if you specify a nonexistent output style.
This alert displays if you specify an output style that is incompatible with this render type.
Lets you specify whether to download all fonts required by imported PDF and EPS files.
38 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Example, GET URL
Example, object model
http://localhost:8080/eps/sample.qxp?epsformat= color&epsdata=clean8bit&epspreview=tiff&epsbleed= 0&epstransparent=0
Request object name: EPSRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties sdk.QRequestContext requestCtx = new sdk.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 WIG service and call the //processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest( requestCtx);
Notes
Namespace
Parameters
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.

jpeg

The jpeg render type returns a JPEG rendering of a page or spread.
JPEG
jpegquality
upadateimage
1 | 2 | 3 | 4
true | false
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.
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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 39
USING THE WEB INTERFACE
Render modifier parameters
Logs
pasteboard
boxes
page
scale
box
spread
layout
A JPEG file.Response
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. The transaction entry in the error log contain 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:
8/3/2005 11:27:24 Error Error Code: 10008 The renderer for this image type has no way of rendering the desired objects.
true | false
Float .1 to 6.92 for Windows .1 to 8 on Mac OS)
Integer
String
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
Lets you request multiple boxes.String
Lets you request a single page.Integer
Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on Windows.
Lets you request a single box.String
Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is Layout
1.
Example, GET URL
Example, object model
http://localhost:8080/jpeg/sample.qxp?jpegquality=1
Request object name: JPEGRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the necessary properties sdk.QRequestContext requestCtx = new sdk.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 WIG service and call the processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
40 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE

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
Alerts
Logs
Example, GET URL
Example, object model
literal
The requested file returned in the HTTP response.Response
Incorrect administration realm username and password.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/10/2005 10:04:52 literal/Test1.doc Type: application/vnd.Quark.QuarkXPress Size: 800768 Client: 127.0.0.1
If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:
8/3/2005 17:49:23 Error Error Code: 10022 Incorrect administration realm username and password.
http://localhost:8080/literal/Story.doc
Request object name: LiteralRequest
sdk.QRequestContext rc = new sdk.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals("")) rc.documentName = this.DocumentSettings1.documentName.Text; rc.request = new LiteralRequest();
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.
Namespace
Parameters
//Create the service and call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);
pdf
The pdf render type returns a PDF rendering of a project.
PDF
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 Print dialog box, use document. For example:
http://localhost:8080/pdf/ sample.qxp?outputstyle=document
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 41
USING THE WEB INTERFACE
title
subject
author
keywords
includehyperlinks
exportlistsashyperlinks
exportindexesashyperlinks
exportlistsasbookmarks
mode
printcolors
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
composite or separations
cmyk, rgb, grayscale, cmykandspot, asis
Lets you specify the title of the PDF file.String
Lets you specify the subject of the PDF file.String
Lets you specify the author of the PDF file.String
Lets you specify keywords for the PDF file.String
Lets you specify whether to include hyperlinks in the PDF file.
Lets you specify whether to export lists as hyperlinks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether to export the index as hyperlinks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether to export lists as bookmarks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether the PDF file is a composite or includes separations.
Lets you specify the color space of the PDF file. This option is available only when mode is set to
composite.
plates
produceblankpages
useopi
images
registration
offset
bleed
offsetbleed
converttoprocess, processandspot, inripseps
1 | 0 | true | false | yes | no
false | yes | no
includeimages, omittiff, omittiffandeps
off, centered, offcenter
points)
symmetric
0–6 (in inches)
Lets you specify a separation method. This option is available only when mode is set to
separations.
Lets you specify whether to include blank pages. This option is available only when mode is set to
composite.
Lets you specify whether to use OPI.1 | 0 | true |
Lets you specify whether to include TIFF and EPS images from an OPI server.
Lets you include, omit, and configure registration marks.
Lets you specify the offset of registration marks.0–30 (in
Lets you specify a bleed type.pageitemsonly,
Lets you specify a bleed offset to use. This option is available only when bleed is set to
symmetric.
42 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
spreads
lowresolution
colorimagedownsample
grayscaleimagedownsample
monochromeimagedownsample
colorcompression
grayscalecompression
monochromecompression
pdffile
false | yes | no
false | yes | no
9–2400
9–2400
true | false
true | false
true | false
String
Lets you specify whether to output spreads.1 | 0 | true |
Lets you request a low-resolution (36 dpi) PDF.1 | 0 | true |
Lets you specify the resolution of color images.9–2400
Lets you specify the resolution of grayscale images.
Lets you specify the resolution of monochrome images.
Lets you specify whether medium-quality manual JPEG compression should be applied to color images.
Lets you specify whether medium-quality manual JPEG compression should be applied to grayscale images.
Lets you specify whether ZIP compression should be applied to monochrome images.
Lets you specify the PDF name. This option is available only when PDF to Folder is selected in QuarkXPress Server PDF preferences.
psfile
thumbnail
mode
fontdownload
layers
transparencyres
verification
separate
produceblankplates
download
String
separations
yes | no
String
Integer value from 36 to 3600
yes | no
Boolean
1 | 0 | true | false
Lets you specify the PostScript file name. This option is available only when PostScript for later Distilling is selected in QuarkXPress Server PDF preferences.
Lets you embed a thumbnail in the PDF file.bw | color
Lets you specify the PDF file's color mode.composite |
Lets you turn font download on or off. You cannot specify which fonts are downloaded.
Lets you specify which layers should be included, as a comma-separated list.
Lets you specify the resolution for flattened content.
Lets you use PDF/X–1a or PDF/X–3 verification.pdfx1a | pdfx3
Lets you specify whether to output each page as a separate file.
Lets you specify whether to include blank plates.yes | no
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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 43
USING THE WEB INTERFACE
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.
Render modifier parameters
layoutstart
layoutend
page
pages
spread
Integer
Integer
range)
Integer
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 (Server/QuarkXPress Server > Preferences > PDF pane > PDF to Folder). The first layout in a project is layout 0. For example:
http://localhost:8080/pdf/multilayout.qxp? layoutstart=0&layoutend=3
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 (Server/QuarkXPress Server > Preferences > PDF pane > PDF to Folder). The first layout in a project is layout 0. For example:
http://localhost:8080/pdf/multilayout.qxp? layoutstart=0&layoutend=3
Lets you specify a single page.Integer
Lets you specify a range of pages.String (page
Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
layout
spreads
A PDF file.Response
requested contains only blank pages.
This Output Style cannot be used with this render type.
String
true | false | yes | no
HTTP Error #500This page range is invalidAlerts
QuarkXPress Server Error #147
Lets you specify a layout by name or ID. The first layout is Layout 1.
Lets you specify that the output use spreads.Boolean 1 | 0 |
This alert displays if you try to render an invalid page range.
HTTP Error #500No file produced. The project
This alert displays if you try to render a a project that contains only blank pages.
This alert displays if you specify a nonexistent output style.This Output Style does not exist.
This alert displays if you specify an output style that is incompatible with this render type.
44 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Logs
Example, GET URL
Example, object model
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/2/2005 17:17:17 pdf/sample.qxp Type: application/pdf Size: 1927016 Client: 127.0.0.1.
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
8/2/2005 18:17:44 Error Error Code: 10364 Invalid Parameter Value.
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
Request object name: PDFRenderRequest
//STEP1: Create the QuarkXPress Server Request Context //and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.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);
Notes
//STEP3: Create the WIG service and //call the processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
For more information about the object model, see the samples.
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 QuarkXPress Server > Preferences, click PDF in the list on the left, and then click PDF Direct, PDF to Folder, or 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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 45
USING THE WEB INTERFACE
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.
png
The png render type returns a PNG rendering of a page or spread.
Namespace
Parameters
Render modifier parameters
PNG
pngcompression
upadateimage
boxes
page
scale
box
spread
layout
1 | 2 | 3 | 4
true | false
Float .1 to
6.92 for Windows .1 to 8 on Mac OS
Integer
String
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.
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.
Lets you request multiple boxes.String
Lets you specify a single page.Integer
Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on Windows.
Lets you request a single box.String
Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is Layout 1.
A PNG file.Response
Logs
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:52:59 png/sample.qxp Type: image/png Size: 5454 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
8/3/2005 11:27:24 Error Error Code: 10008 The renderer for this image type has no way of rendering the desired objects.
46 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Example, GET URL
Example, object model
http://localhost:8080/png/sample.qxp?pngcompression=1
Request object name: PNGRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the nescessary properties sdk.QRequestContext rc = new sdk.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 WIG service and call the processRequest( //) API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(rc);

postscript

The postscript render type returns a PostScript rendering of a project.
Namespace
Parameters
PostScript
prntbleed
clip<Boolean>, top<float>, bottom<float>, left<float>, right<float> | sym, clip<Boolean>, amount<float>
Lets you specify bleed values for a page.Page | asym,
To specify an asymmetric bleed, use the following format:
prntbleed=asym,clip,top,bottom, left, right
The 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
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 47
USING THE WEB INTERFACE
Render modifier parameters
Alerts
outputstyle
page
pages
spread
layout
A PostScript file.Response
invalid.
stylename, document
range)
Integer
String
HTTP Error #500This page range is
QuarkXPress Server Error #147
This alert displays if you try to render an invalid page range.
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
Lets you specify a single page.Integer
Lets you specify a range of pages.String (page
Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Logs
HTTP Error #500No file produced. The document requested contains only blank pages.
mapped to file not found
does not exist.
This Output Style cannot be used with this render type.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/2/2004 20:04:08 postscript/Sample.qxp Type: application/postscript Size: 1143346 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
8/2/2005 19:58:27 Error Error Code: 10121 No file produced. The document requested contains only blank pages.
This alert displays if you try to render a a project that contains only blank pages.
HTTP Error #500PostScript printer
This alert displays if the PostScript printer or driver is not set to Print to File.
This alert displays if you specify a nonexistent output style.This Output Style
This alert displays if you specify an output style that is incompatible with this
render type.
48 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Example, GET URL
Example, object model
http://localhost:8080/postscript/Sample.qxp
Request object name: PostScriptRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.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 WIG service and call the //processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
To create a PostScript file, you must have a PostScript driver on the server computer.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 a PostScript-compatible output style, the default PostScript-compatible output style is used.
Namespace
Parameters

ppml

The ppml render type returns a PPML rendering of a page or spread.
PPML
outputstyle
path
stylename
String
Lets you specify an output style. To use a named output style, use the name of that output style. For example:
http://localhost:8080/ppml/ 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/ppml/ sample.qxp?outputstyle=document
Lets you specify a location for PPML output. For example:
path=C:\output
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 49
USING THE WEB INTERFACE
Render modifier parameters
Alerts
layout
PPML output.Response
image type has no way of rendering the desired objects.
does not exist.
This Output Style cannot be used with this render type.
invalid.
XMLthexmldoc
XMLpaginate
String
HTTP Error #406The renderer for this This alert displays if you submit a render request with the pages or box
parameter.
This alert displays if you specify a nonexistent output style.This Output Style
This alert displays if you specify an output style that is incompatible with this render type.
HTTP Error #500The file path is This alert displays if you specify an invalid path parameter.
Lets you supply XML that matches the placeholders in the project.
Lets you supply XML that matches the placeholders in the project. This parameter creates a new layout containing the imported and formatted XML.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Logs
Example, GET URL
Example, object model
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 10:03:30 ppml/sample.qxp Type: application/postscript Size: 2654464 Client:
127.0.0.1
If any alert is displayed, an error message is written to the QuarkXPress Server Error Log file. The transaction entry in an 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 log transaction entry:
8/3/2005 11:27:24 Error Error Code: 10008 The renderer for this image type has no way of rendering the desired objects.
http://localhost:8080/ppml/sample.qxp? paginate=file:MacintoshHD:file.xml &path=C:\abc&includefont=true
Request object name: PPMLRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName);
//STEP 2(SPECIFIC TO REQUESTS): //Create the PPML renderer //request and embed it in the request context. PPMLRenderRequest ppmlreq = new PPMLRenderRequest(); ppmlreq.setExportPath(request.getParameter("path")); ppmlreq.setLayout(request.getParameter("layout")); ppmlreq.setOutputStyle( request.getParameter("outputstyle")); requestCtx.setRequest(ppmlreq);
50 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
//STEP3: Create the WIG service and //call the processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
USING THE WEB INTERFACE
Notes
Namespace
Parameters
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/ppml/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 PPML output style, the default PPML output style is used.

qcddoc

The qcddoc render type returns a QuarkCopyDesk article.
qcddoc
article
component
String
String
Lets you specify which article in a project to render. For example:
http://localhost:8080/qcddoc/ abc.qxp?article=article1
Lets you specify which component in an article to render. For example:
http://localhost:8080/copydesk/ abc.qcd?component=comp1
format
saveastemplate
includepagepicture
lightweight | fullfeatured
true | false
true | false | 1 | 0
Lets you render an article in lightweight or full-featured format. For example:
http://localhost:8080/qcddoc/ abc.qxp?article=article1& format=fullfeatured
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=true
You 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
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)
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 51
USING THE WEB INTERFACE
For example:
http://localhost:8080/saveas/qcddoc/
4.qxp?includepagepicture=1& quality=blackandwhite&picdpi=144& spreadrange=first
http://localhost:8080/saveas/qcddoc/ PagePicture.qxp?includepagepicture=true
Render modifier parameters
Alerts
Logs
Example, GET URL
XMLmodify
A QuarkCopyDesk article.Response
There is no box with the specified identifier.
in the article name can't be greater than max limit.
The article/component name is not unique.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 12:15:21 qcddoc/sample.qcd Type: application/vnd.Quark.QuarkCopyDesk Size: 1519616 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. The transaction entry in the error log contains the date and time of the request, the error code, and the error message.
http://localhost:8080/qcddoc/copydesk/sample.qcd
This alert displays if the box corresoponding to a referenced component does not exist.
This alert displays if an article name is longer than 32 characters.The number of characters
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.
Lets you modify the article with XML. For more information, see "Using XML modify."
Example, object model
Request object name: CopyDeskDocRequest

qxpdoc

The qxpdoc render type returns a QuarkXPress project.
Namespace
Parameters
qxpdoc
qxpdocver
upadateimage
saveastemplate
7 | 8 | korean6 | japanese6
true | false
true | false
52 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
Indicates the QuarkXPress version format to use. For example:
http://localhost:8080/qxpdoc/ construct/project1.qxp?qxpdocver=7
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.
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=true
USING THE WEB INTERFACE
You 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
Alerts
Logs
layout
A QuarkXPress project.Response
document return is disabled.
this image type has no way of rendering the desired objects.
QuarkXPress Project down to an earlier version.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 12:15:21 qxpdoc/sample.qxp Type: application/vnd.Quark.QuarkXPress Size: 1519616 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. 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 log transaction entry:
8/3/2005 12:05:00 Error Error Code: 10123 QuarkXPress document return is disabled.
String
HTTP Error #500QuarkXPress
This alert displays if Disable QuarkXPress Document Return is checked in the Server tab of the QuarkXPress Server Server Configuration dialog box (QuarkXPress Server > Server Configuration).
HTTP Error #406The renderer for This alert displays if you submit a qxpdoc render request with the page, pages,
box, or spread parameter.
HTTP Error #500Cannot save a
This alert displays if you attempt to save a QuarkXPress 6.x project to an earlier version of QuarkXPress with the qxpdocver parameter.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Example, GET URL
Example, object model
http://localhost:8080/qxpdoc/sample.qxp
Request object name: QuarkXPressRenderRequest
//STEP1: Create the QuarkXPress Server Request //Context and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.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 WIG service and call the processRequest( ) API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator();
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 53
USING THE WEB INTERFACE
QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);

screenpdf

The screenpdf render type returns a low-resolution PDF rendering of a project. This
render type overrides the setting in the PDF Workflow area of the PDF pane in the
QuarkXPress Server Preferences dialog box (QuarkXPress Server > Preferences) and always
sends the PDF file to the browser.
Namespace
Parameters
Screenpdf
outputstyle
title
subject
author
keywords
includehyperlinks
exportlistsashyperlinks
stylename
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
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
Lets you specify the title of the PDF file.String
Lets you specify the subject of the PDF file.String
Lets you specify the author of the PDF file.String
Lets you specify keywords of the PDF file.String
Lets you specify whether to include hyperlinks in the PDF file.
Lets you specify whether to export lists as hyperlinks. To use this parameter, you must set
includehyperlinks to true.
exportindexesashyperlinks
exportlistsasbookmarks
mode
printcolors
plates
1 | 0 | true | false | yes | no
1 | 0 | true | false | yes | no
composite or separations
cmyk, rgb, grayscale, cmykandspot, asis
converttoprocess, processandspot, inripseps
54 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
Lets you specify whether to export the index as hyperlinks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether to export lists as bookmarks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether the PDF file is a composite or includes separations.
Lets you specify the color space of the PDF file. This option is available only when mode is set to
composite.
Lets you specify a separation method. This option is available only when mode is set to
separations.
USING THE WEB INTERFACE
produceblankpages
useopi
images
registration
offset
bleed
offsetbleed
spreads
lowresolution
1 | 0 | true | false | yes | no
yes | no
includeimages, omittiff, omittiffandeps
off, centered, offcenter
symmetric
0–6 (in inches)
yes | no
yes | no
Lets you specify whether to include blank pages. This option is available only when mode is set to
composite.
Lets you specify whether to use OPI.1 | 0 | true | false |
Lets you specify whether to include TIFF and EPS images from an OPI server.
Lets you include, omit, and configure registration marks.
Lets you specify the offset of registration marks.0–30 (in points)
Lets you specify a bleed type.pageitemsonly,
Lets you specify a bleed offset to use. This option is available only when bleed is set to symmetric.
Lets you specify whether to output spreads.1 | 0 | true | false |
Lets you request a low-resolution (36 dpi) PDF.1 | 0 | true | false |
colorimagedownsample
grayscaleimagedownsample
monochromeimagedownsample
colorcompression
grayscalecompression
monochromecompression
pdffile
psfile
9–2400
9–2400
true | false
true | false
true | false
String
String
Lets you specify the resolution of color images.9–2400
Lets you specify the resolution of grayscale images.
Lets you specify the resolution of monochrome images.
Lets you specify whether medium-quality manual JPEG compression should be applied to color images.
Lets you specify whether medium-quality manual JPEG compression should be applied to grayscale images.
Lets you specify whether ZIP compression should be applied to monochrome images.
Lets you specify the PDF name. This option is available only when PDF to Folder is selected in QuarkXPress Server PDF preferences.
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
mode
Lets you embed a thumbnail in the PDF file.bw | color
Lets you specify the PDF file's color mode.composite |
separations
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 55
USING THE WEB INTERFACE
Render modifier parameters
fontdownload
layers
transparencyres
verification
separate
produceblankplates
page
pages
spread
layout
spreads
yes | no
String
Integer value from 36 to 3600
yes | no
Integer
String
| false | yes | no)
Lets you turn font download on or off. You cannot specify which fonts are downloaded.
Lets you specify which layers should be included, as a comma-separated list.
Lets you specify the resolution for flattened content.
Lets you use PDF/X–1a or PDF/X–3 verification.pdfx1a | pdfx3
Lets you specify whether to output each page as a separate file.
Lets you specify whether to include blank plates.yes | no
Lets you specify a single page.Integer
Lets you specify a range of pages.String (page range)
Lets you specify a spread. The first spread is spread
1. In a facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Lets you specify that the output use spreads.Boolean (1 | 0 | true
Logs
Example, GET URL
Example, object model
A screen-resolution PDF fileResponse
HTTP Error #500This page range is invalid.Alerts
QuarkXPress Server Error #147
This alert displays if you try to render an invalid page range.
HTTP Error #500No file produced. The document requested contains only blank pages.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/16/2005 15:20:28 screenpdf/sample.qxp Type: application/pdf Size: 2209561 Client:
127.0.0.1.
If an alert is displayed, a transaction message is written to the QuarkXPress Server Error Log file. The transaction entry in the error log file 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:
8/2/2005 18:17:44 Error Error Code: 10364 Invalid Parameter Value.
http://localhost:8080/screenpdf/sample.qxp? colorimagedownsample=72&colorcompression=0
Request object name: ScreenPDFRenderRequest
//STEP1: Create the QuarkXPress Server Request Context //and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.QRequestContext(); String docName = request.getParameter("documentName") ;
This alert displays if you try to render a a project that contains only
blank pages.
56 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
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 WIG service and //call the processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
swf
The swf render type returns a SWF (Flash) rendering of a Print layout or an Interactive
layout.
Parameters
SWFNamespace
version
layout
page
pages
fullscreen
embedallfonts
compressswf
compressaudio
jpegquality
swf6 | swf7
string
true | false
true | false
true | false
true | false
1–100
Lets you specify the minimum compatible version of Flash Player.
Lets you specify a layout by name or ID. The first layout is Layout 1.
Lets you specify a single page.string
Lets you specify a range of pagesstring
Lets you specify whether the SWF file should run in full-screen mode by default.
Lets you indicate whether to include any fonts that are necessary to correctly render text in Text Box objects within the exported SWF file
Lets you specify whether to compress the exported file.
Lets you specify whether to compress audio in the exported file.
Lets you specify the quality of JPEG images in the exported file, with 100 being highest quality.
download
true | false
When download is true, the browser always displays a dialog box that lets the end user save
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 57
USING THE WEB INTERFACE
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.
Alerts
Logs
spreads
A single SWF file or a multipart reply containing an SWF file and a set of support files.Response
A multipart reply can result if you render an Interactive layout that uses external assets -- for example, if the layout includes a Video object containing a video file that has been specified by choosing Choose from a drop-down menu. In this case, the reply includes a "RelativePath" parameter for each file, and each file is saved in the directory indicated by this "RelativePath" parameter
You can use the saveas request handler to save the files that are included in a multipart reply in a particular directory, using the relative folder hierarchy that was specified in the multipart reply.
exist.
exist.
Unknown swf player version.
Value of jpegquality is outside range, valid values are 1 - 100.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/2/2005 17:17:17 swf/sample.qxp Type: application/pdf Size: 1927016 Client: 127.0.0.1.
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
8/2/2005 18:17:44 Error Error Code: 10364 Invalid Parameter Value.
Boolean 1 | 0 | true | false | yes | no
This alert displays if you try to render a nonexistent page.The requested page does not
This alert displays if you try to render an invalid page range.This page range is invalid.
This alert displays if you try to render a nonexistent leyout.The requested layout does not
This alert displays if you specify an invalid version parameter.
This alert displays if you specify an invalid jpegquality parameter.
Lets you specify that the output use spreads. Applicable only to Print layouts.
Example, GET URL
Example, object model
This URL renders the Interactive layout named "Presentation" in the "sample.qxp" file as a free-standing SWF file set to display in full-screen mode:
http://localhost:8080/swf/sample.qxp? layout=Presentation&fullscreen=true
Request object name: SWFRenderRequest
//STEP1: Create the QuarkXPress Server Request Context //and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.QRequestContext(); Boolean responseAsURL = false; requestCtx.setDocumentName(docName);
//STEP 2(SPECIFIC TO REQUESTS):Create the SWF renderer request //and embed it in the request context. SWFRenderRequest swfreq = new SWFRenderRequest(); swfreq.setVersion(request.getParameter("Version"));
58 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
swfreq.setLayout(request.getParameter("Layout")); swfreq.setPage(request.getParameter("Page")); swfreq.setFullscreen(request.getParameter("Fullscreen")); swfreq.setEmbedallfonts(request.getParameter( "Embedallfonts")); swfreq.setCompressswf(request.getParameter("Compressswf")); swfreq.setCompressaudio(request.getParameter( "Compressaudio")); swfreq.setJpegquality(request.getParameter("Jpegquality")); swfreq.setDownload(request.getParameter("Download")); requestCtx.setRequest(swfreq);
//STEP3: Create the WIG service and call the processRequest( //) API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest(requestCtx);
@@@Notes

Understanding render modifiers

USING THE WEB INTERFACE
Box
Boxes
Layer
Layout
Movepages
Page
Pages
Scale
Spread
Spreads
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:
DescriptionProperty
The box render modifier lets you render a single box.
The boxes render modifier lets you render multiple boxes.
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.
The layout render modifier lets you render a particular layout.
The movepages render modifier lets you move pages prior to rendering.
The page render modifier lets you render a single page.
The pages render modifier lets you render multiple pages.
The scale render modifier lets you specify the scale at which content is rendered.
The spread render modifier lets you render a single spread.
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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 59
USING THE WEB INTERFACE
Box
The box render modifier lets you render a single box.
Parameters
Compatible with
Alerts
Logs
box
overlap
jpeg, png, raw
the specified identifier.
The box must be within the page boundaries.
image type has no way of rendering the desired objects.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 15:04:35 sample.qxp Type: image/jpeg Size: 4366 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. 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 log transaction entry:
8/3/2004 15:00:33 Error Error Code: 10006 There is no box with the specified identifier.
String
HTTP Error #500There is no box with
This alert displays if you request a box that does not exist.
HTTP Error #500Cannot render box.
This alert displays if you request a box that is outside the page boundary.
HTTP Error #406The renderer for this This alert displays if you try to use the box parameter with the eps, pdf,
or qxpdoc render types.
Lets you specify which box to render.String
Lets you specify whether to show the area overlapped by the specified box.
Example GET URL
Notes
Parameters
Compatible with
http://localhost:8080/png/sample.qxp?box=pictbox
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=textbox
When 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.
boxes
overlap
jpeg, png, raw
String
Lets you specify which boxes to render.String
Lets you specify whether to show the area overlapped by the specified boxes.
60 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Alerts
Logs
Example GET URL
Notes
HTTP Error #500There is no box with the specified identifier.
The box must be within the page boundaries.
image type has no way of rendering the desired objects.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 15:04:35 sample.qxp Type: image/jpeg Size: 4366 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. 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 log transaction entry:
8/3/2004 15:00:33 Error Error Code: 10006 There is no box with the specified identifier.
http://server:port/jpeg/doc.qxp?boxes=box1,box2
To render boxes in a particular layout, use a URL like the following:
http://localhost:8080/png/sample.qxp? layout=2&page=3&box=textbox
This alert displays if you request a box that does not exist.
HTTP Error #500Cannot render box.
This alert displays if you request a box that is outside the page boundary. .
HTTP Error #406The renderer for this
This alert displays if you try to use the boxes parameter with the eps, pdf,
or qxpdoc render types.
Parameters
Compatible with
Alerts
When 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.
compositionzone
compositionzones
xml
Param.
String
String
Error #10401Invalid box given in Box
This alert displays if you request a box that is not a Composition Zones item.
Lets you specify which Composition Zones item to return. For example:
http://localhost:8080/xml/sample.qxp? compositionzone=czbox
Lets you specify which Composition Zones items to return. For example:
http://localhost:8080/xml/sample.qxp? compoxitionzones=czbox1, czbox2
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 61
USING THE WEB INTERFACE
Logs
Parameters
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
12/1/2005 10:41:14 xml/sample.qxp Type: text/xml Size: 63940 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log file. 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 log transaction entry:
12/1/2005 10:39:45 Error Error Code: 10401 Invalid box given in Box Param.

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.
layer
addlayer
deletelayer
alllayers
String
String
String
Boolean (1 | 0 | true | false | yes | no)
Lets you specify which layer to render. You can specify multiple layer names in one request.
Lets you add a new layer. You can add one layer per request.
Lets you delete a layer and the items on that layer. You can delete one layer per request.
Lets you render every layer in the project, including hidden and suppressed layers.
layerattribute
name
visible
suppressoutput
locked
keeprunaround
String
String
Boolean (1 | 0 | true | false | yes | no)
Boolean (1 | 0 | true | false | yes | no)
Boolean (1 | 0 | true | false | yes | no)
Boolean (1 | 0 | true | false | yes | no)
Lets you modify the attributes of a layer. You can modify one layer per request.
Lets you specify a new name for a layer. You must use this parameter in conjunction with the
layerattribute parameter.
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.
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.
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.
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, ppml, qcddoc, qxpdoc, raw, pdf, screenpdf, swf, xml
62 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Alerts
exist. Please verify the layer name.
same name already exists.
name of the default layer.
default layer.
value.
locked and cannot be modified.
HTTP Error #500This layer does not This alert displays if you specify an invalid layer name with the layer,
layerattribute, or deletelayer parameter.
HTTP Error #500Specify a layer name. This alert displays if you do not specify a layer name with the layer,
layerattribute, addlayer, or deletelayer parameter.
HTTP Error #500A layer with the
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.
HTTP Error #500Cannot change the
This alert displays if you try to change the name of the default layer.
HTTP Error #500Cannot delete the
This alert displays if you try to delete the default layer.
HTTP Error #500Invalid parameter
This alert displays if you do not specify additional attributes or specify attributes with invalid values in an addlayer or layerattribute request.
HTTP Error #500This layer has been
This alert displays if you try to add or modify an item on a locked layer.
Logs
Example GET URL
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
11/17/2005 17:19:48 qxpdoc/layerlayout.qxp Type: application/vnd.Quark.QuarkXPress Size: 84992 Client: 127.0.0.1
If an alert is displayed, an 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 log transaction entry:
11/16/2005 19:42:48 Error Error Code: 10358 A layer with the same name already exists.
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";
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 63
USING THE WEB INTERFACE
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 < Layer
To delete a layer, set its operation attribute to "DELETE".
You cannot add, modify, or delete multiple layers in a single request.Notes 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 (QuarkXPress Server > Preferences > Default Print Layout > Layers).
If the visible property is set to false, the suppressoutput property is automatically set to
true.
Parameters
Compatible with
Alerts
Logs
Example GET URL

Layout

The layout render modifier lets you render a specific layout.
layout
eps, jpeg, png, postscript, ppml, raw, pdf, screenpdf, swf
layout does not exist.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
12/1/2005 10:41:14 jpeg/sample.qxp Type: image/jpeg Size: 63940 Client: 127.0.0.1
If an alert is displayed, an 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 a transaction entry:
12/1/2005 10:39:45 Error Error Code: 10125 The requested layout does not exist.
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
String
HTTP Error #500The requested
This alert displays if you supply an invalid layout value.
Lets you specify which layout to render. The first layout is layout
1.

Movepages

The movepages render modifier lets you move pages prior to rendering.
64 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Parameters
Compatible with
Alerts
Logs
movepages
afterpage
eps, jpeg, png, postscript, ppml, qcddoc, qxpdoc, raw, pdf, screenpdf, swf, xml
exist.
range cannot be moved there.
invalid.
value.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
3/24/2009 10:42:01 pdf/5pagedoc.qxp?movepages=AB-AD&afterpage=end Type: application/pdf Size: 12074 Client: 127.0.0.1
If an error occurs, an 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 log transaction entry:
3/24/2009 10:45:45 Error Error Code: 61 This page does not exist. RequestURL: pdf/5pagedoc.qxp?movepages=AB-AD&afterpage=AF.
String
String
QuarkXPress Server Error #61This page does not
QuarkXPress Server Error #62Invalid page range.
QuarkXPress Server Error #51The specified page
QuarkXPress Server Error #146This page range is
QuarkXPress Server Error #10108Invalid parameter
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).
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.
Example GET URL
Example, object model
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
To move pages before rendering a layout, use code like the following:
//STEP1: Create the QuarkXPress Server Request Context //and set the nescessary properties sdk.QRequestContext requestCtx = new sdk.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);
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 65
USING THE WEB INTERFACE
//STEP3: Create the WIG service and call the //processRequest() API QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); sdk.QContentData data = service.processRequest( requestCtx);
Notes
Parameters
Compatible with
Alerts
Logs
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.
page
eps, jpeg, png, postscript, qcddoc, raw, pdf, screenpdf, swf
HTTP Error #500The requested page does
not exist.
image type has no way of rendering the desired objects.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 12:24:13 png/sample.qxp Type: image/png Size: 2645 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. The transaction entry in an 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 log transaction entry:
8/3/2005 12:48:15 Error Error Code: 10000 The requested page does not exist.
This alert displays if you attempt to render a page that does not exist.
HTTP Error #406The renderer for this This alert displays if you use a page parameter with the qxpdoc render
type.
Lets you specify which page to render.Integer
Example GET URL
Example, object model
Notes
http://localhost:8080/png/sample.qxp?page=2
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 < Page
To delete a page, set its operation attribute to "DELETE".
To render a page in a particular layout, use a URL like the following:
http://localhost:8080/png/sample.qxp?layout=2&page=3
66 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE

Pages

The pages render modifier lets you render multiple pages. The pdf and postscript
namespaces support this parameter.
Parameters
Compatible with
Alerts
Logs
Example, GET URL
pages
eps, jpeg, png, postscript, raw, pdf, screenpdf, swf
HTTP Error #500This page range is
invalid.
this image type has no way of rendering the desired objects.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 14:04:44 pdf/2000.qxp Type: application/pdf Size: 13271 Client: 127.0.0.1
If an alert is dispayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
8/3/2005 14:01:44 Error Error Code: 147 This page range is invalid.
http://localhost:8080/pdf/sample.qxp?pages=2–4
QuarkXPress Server Error #147
This alert displays if you try to render a page range that exceeds the number of pages in the project.
HTTP Error #406The renderer for This alert displays if you use the pages parameter with the jpeg, eps, png,
or qxpdoc render type.
Lets you specify which pages to render.String (page range)
Notes
Parameters
Compatible with
Alerts
Logs
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.
scale
eps, jpeg, png, raw
parameter.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 15:19:04 jpeg/sample.qxp Type: image/jpeg Size: 1647112 Client: 127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server Error Log file. 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 log transaction entry:
Float
HTTP Error #500Invalid scale
This alert displays if an invalid scale value is provided.
What to do: Enter a valid scale value.
Lets you specify a scaling percentage. The valid values are from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on Windows.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 67
USING THE WEB INTERFACE
8/3/2004 15:47:50 Error Error Code: 10060 Invalid scale parameter.
Example, GET URL
Parameters
Compatible with
Alerts
Logs
http://localhost:8080/png/sample.qxp?scale=2

Spread

The spread render modifier lets you render a single spread.
spread
eps, jpeg, png, postscript, raw, pdf, screenpdf, swf
spread does not exist.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 15:19:04 sample.qxp Type: image/jpeg Size: 1647112 Client: 127.0.0.1 If an alert is displayed, a transaction error message is written to the QuarkXPress Server Error Log file. The transaction entry in the error log file 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:
8/5/2005 9:43:02 Error Error Code: 10072 The requested spread does not exist.
Integer
HTTP Error #500The requested
This alert displays if you specify an invalid spread.
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.
Example, GET URL
Example, Object Model
Parameters
Compatible with
Logs
http://localhost:8080/png/sample.qxp?spread=2
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 < Spread
To 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.
spreads
eps, jpeg, png, postscript, raw, pdf, screenpdf, swf
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
1/16/2006 11:14:03 pdf/project23.qxp Type: application/pdf Size: 1084 Client: 127.0.0.1
Boolean (1 | 0 | true | false | yes | no)
Lets you specify whether to render spreads (true) or individual pages (false).
68 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Example, GET URL

Using content modifiers

http://localhost:8080/pdf/sample.qxp?spreads=true
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.
The name of the target box.String[box name]Parameters Specify the name and location of the imported file with the file:
prefix. The imported file must be present in the document pool.
To import a file that is in a subfolder of the document pool on Mac OS, use a path like the following:
file:subfolder:MyFile.ext
To import a file that is in a subfolder of the document pool on Windows, use a path like the following:
file:subfolder\MyFile.ext
A preview of the project with the imported text.Response
Logs
Example, GET URL
Example, object model
HTTP Error #404File not found.Alerts
QuarkXPress Server Error #–43
This alert displays if the imported file is not present in the document pool.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If 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.
http://localhost:8080/sample.qxp?Author=NewText http://localhost:8080/sample.qxp?TopStory=file:TopStory.doc
Request object name: RequestParameters
sdk.QRequestContext rc = new sdk.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};
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 69
USING THE WEB INTERFACE
rc.request = request; //Create the service and //call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);
Box names are case-sensitive.Notes
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.doc
You 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
Alerts
Logs
Example, GET URL
Example, object model
fontname
A preview of the project with the font applied to the imported text.Response
This alert displays if you specify a font that is unavailable.The specified font is not
available.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
12/2/2005 16:24:13 project2.qxp Type: image/jpeg Size: 11380 Client: 127.0.0.1
If 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 log transaction entry:
12/2/2005 16:16:26 Error Error Code: –43 File not found.
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&Story:fontname=Comic Sans MS
Request object name: RequestParameters
sdk.QRequestContext rc = new sdk.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals("")) rc.documentName = this.DocumentSettings1.documentName.Text;
The name of the font to be applied.String
//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;
70 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
//Create the service and //call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.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
Logs
[box name[
A preview of the project with the imported picture.Response
HTTP Error #404File not found.Alerts
QuarkXPress Server Error #–43
This alert displays if the imported file is not present in the document pool.
HTTP Error #500The specified file failed to load in the picture box.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If 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.
This alert displays if you attempt to import an invalid picture file.
The name of the target box.String Specify the name and location of the imported file with the file:
prefix. The imported file must be present in the document pool.
To import a file that is in a subfolder of the document pool on Mac OS, use a path like the following:
file:subfolder:MyFile.ext
To import a file that is in a subfolder of the document pool on Windows, use a path like the following:
file:subfolder\MyFile.ext
Example, GET URL
Example, object model
http://localhost:8080/sample.qxp? PictureBox=file:FrenchOpen.pdf
Request object name: RequestParameters
sdk.QRequestContext rc = new sdk.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;
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 71
USING THE WEB INTERFACE
request.params = new NameValueParam[]{nameValue1}; rc.request = request; //Create the service and call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);
Box names are case-sensitive.Notes
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

Applying picture effects

QuarkVista XTensions software lets you apply and remove sets of preset picture effects to
imported pictures. To use this feature, you must first create a preset file containing the
effects you want to use and put that file in the document pool. For information on how
to create preset files, see A Guide to QuarkXPress.
To specify the location where QuarkXPress Server looks for preset files, display the Picture
Effects pane of the QuarkXPress Server Preferences dialog box (QuarkXPress Server >
Preferences), then click Preferences to use the "Picture Effects Presets" folder in the
QuarkXPress Server root folder or Other Folder to use a different location. (Note that the
Picture Effects pane is present only if QuarkVista XTensions software is loaded.)
Parameters
Alerts
This feature works only with projects saved in QuarkXPress 6.0 and later.
When you install QuarkXPress Server, QuarkVista XTensions software is enabled by default.
To disable this module in QuarkXPress Server, display the XTensions Manager dialog box
(QuarkXPress Server > Server XTensions Manager), uncheck Vista, click OK, and then
restart QuarkXPress Server.
If QuarkXPress Server opens a project that uses picture effects when QuarkVista XTensions
software is not loaded, the following error message is written to the QuarkXPress Server
error logs (if error reporting is on): "Error. Vista XTensions module is not present."
applyvistaeffect
vistabox
deletevistaeffect
A preview of the project with the effect applied to the picture.Response
specified identifier.
String
String
HTTP Error #500There is no box with the
This alert displays if you specify an invalid box name.
Lets you specify a the name of a preset file.String
A comma-separated list of box IDs or box names indicatign the boxes to which the preset should be applied.
A comma-separated list of box IDs or box names indicatign the boxes to which presets should be removed.
compatible with the Preset.
72 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
HTTP Error #500The picture is not
to this box.
USING THE WEB INTERFACE
This alert displays if the target picture is in a format that is not compatible with the picture effects feature
HTTP Error #500Cannot load picture effects
This alert displays if you try to apply picture effects to a non-picture box or to an empty box.
Logs
This Layout uses Picture Effects that are not supported in QuarkXPress v5 format. Downsaving the document without picture effects.
with that name.
The Vista effects were not applied to one or more images. boxes specified in the request. This alert is not displayed in the status
This document may not display or print correctly because the Vista XTensions software is not present.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
11/21/2005 17:09:32 qxpdoc/project3.qxp Type: application/vnd.Quark.QuarkXPress Size: 10273792 Client: 127.0.0.1
If an error occurs, an 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 log transaction entry:
11/21/2005 16:40:13 Error Error Code: 10400 The picture is not compatible with the Preset.
This alert is recorded in the QuarkXPress Server error log file if you try to apply picture effects to a document saved in QuarkXPress 5.0 or earlier. This alert is not displayed in the status monitor.
HTTP Error #500Invalid Preset File!
This alert displays if the preset file is invalid.
HTTP Error #500There is no Picture Effect
This alert displays if the preset file does not exist.
This alert is recorded in the QuarkXPress Server error log file if QuarkXPress Server is unable to apply picture effects to some of the
monitor.
This alert is recorded in the QuarkXPress Server error log file if QuarkVista XTensions software is not present or has been disabled. This alert is not displayed in the status monitor.
Example, GET URL
Example, object model
To apply a picture effects preset to the pictures in the boxes named "pb2" and "box2", use a URL like the following:
http://localhost:8080/abc.qxp?applyvistaeffect= color.vpf&vistabox=pb2,box2
To remove a picture effects preset from the picture in the box named "pb2", use a URL like the following:
http://localhost:8080/abc.qxp?deletevistaeffect=pb2
Request object names: VistaRequest
sdk.QRequestContext rc = new sdk.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals("")) rc.documentName = this.DocumentSettings1.documentName.Text;
//STEP 2(SPECIFIC TO REQUESTS): //Create the QuarkVista
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 73
USING THE WEB INTERFACE
//request and embed it in request context VistaRequest vistareq = new VistaRequest(); vistareq.deleteVistaEffect = this.deletevistaeffect.Text; vistareq.vistaBox = this.vistabox.Text; vistareq.applyVistaEffect = this.applyvistaeffect.Text; rc.request = vistareq;
//STEP 3(SPECIFIC TO REQUESTS): //Create the JPEG renderer //request and embed it in JPEGRenderRequest jpreq = new JPEGRenderRequest(); vistareq.request = jpreq; //Create the service and //call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);
This feature works only in master-subrender mode.Notes If you delete and apply QuarkVista effects in the same URL parameter, the deletevistaeffect
parameter takes precedence.
Parameters

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.
newname
path
savetopool
replace
String
true | false
true | false
Lets you specify a name for the saved-as project.String
Lets you specify a location for the saved-as project (other than the document pool).
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.
Lets you specify whether the saved project should replace a project with the same name. The default value is true.
The message "Document successfully saved."Response
HTTP Error #404File not found.Alerts
QuarkXPress Server Error #–43
This alert displays if you supply an incorrect file name or the file is not in document pool.
74 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
pathname.
invalid.
folder is Read-Only.
USING THE WEB INTERFACE
HTTP Error #404Bad filename/
QuarkXPress Server Error #–43
This alert displays if you supply an incorrect file name or the file is not in document pool.
HTTP Error #500The file path is This alert displays if you supply an invalid path parameter.
What to do: Specify the correct file path with the path parameter.
HTTP Error #500The specified
This alert displays if you try to save a project to a folder with read-only access.
Logs
Example, GET URL
Example, object model
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
11/16/2005 15:41:42 saveas/5mb.qxp Type: Size: 28 Client: 127.0.0.1
If 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.
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
Request object name: SaveAsRequest
sdk.QRequestContext rc = new sdk.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 QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);

Importing XML with placeholders

This topic explains how to import XML data into boxes using QuarkXPress placeholders.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 75
USING THE WEB INTERFACE
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
Alerts
Logs
thexmldoc
layout
paginate
The layout with the imported XML.Response
String
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.1
If 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.
XML
String
XML
HTTP Error #500Invalid XML This alert displays if you supply an invalid XML string in the thexmldoc parameter.
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.
Lets you specify which layout to render. The first layout is layout 1. You can also specify a layout by name.
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, qxp, and ppml
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.
Example, GET URL
Example, object model
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 Mac OS, 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
Request object names: XMLImportRequest
sdk.QRequestContext rc = new sdk.QRequestContext();
76 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
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 QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);

Using XML modify

USING THE WEB INTERFACE
Parameters
Example GET URL
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
Modifier DTDDTD
modify
http://QXPServer8:8080/project1.qxp?modify=file:sample.xml
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.
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" />
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 77
USING THE WEB INTERFACE
</PAGE> </SPREAD> </LAYOUT> </PROJECT>
The updated QuarkXPress project.Response
Logs
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If 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 DTD:
• "BOX (Modifier DTD)"
• "ID (Modifier DTD)"
• "TEXT (Modifier DTD)"
• "PICTURE (Modifier DTD)"
• "GEOMETRY (Modifier DTD)"
• "CONTENT (Modifier DTD)"
• "SHADOW (Modifier DTD)"
• "FRAME (Modifier DTD)"
• "PLACEHOLDER (Modifier DTD)"
• "METADATA (Modifier DTD)"
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>
78 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
</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>
Logs
A preview of the QuarkXPress project with a new box created in the specified position.Response
File not found.Alerts
filename/pathname.
document is not valid or well formed.
document contains an invalid tag value.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:
HTTP Error #404
QuarkXPress Server Error #–43
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
HTTP Error #404Bad
QuarkXPress Server Error #–37
This alert displays if you specify an invalid file name or path.
HTTP Error #500The XML
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
HTTP Error #500The XML
This alert displays if you supply an invalid value in the XML.
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 Mac OS, use a URL like the following:
http://localhost:8080/sample.qxp?modify= file:MacHD:xml:updateBox.xml
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 79
USING THE WEB INTERFACE
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 ModifierFileRequest
For ModifierFileRequest, the member contents are used to set the file path or send
the XML itself.
sdk.QRequestContext rc = new sdk.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.contents = contents; rc.request = request;
//Create the service and call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.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
80 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
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
USING THE WEB INTERFACE

Creating boxes

To create a new box, use the following parameters in the Modifier DTD:
• "BOX (Modifier DTD)"
• "ID (Modifier DTD)"
• "TEXT (Modifier DTD)"
• "PICTURE (Modifier DTD)"
• "GEOMETRY (Modifier DTD)"
• "CONTENT (Modifier DTD)"
• "SHADOW (Modifier DTD)"
• "FRAME (Modifier DTD)"
The following XML shows how some of these parameters work.
<PROJECT> <LAYOUT> <ID UID="layout 1"/> <SPREAD> <ID UID="1"/>
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 81
USING THE WEB INTERFACE
<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>
A preview of the QuarkXPress project with new box created in specified position.Response
Logs
File not found.Alerts
pathname.
is not valid or well formed.
contains an invalid tag value.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. 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.1
If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:
HTTP Error #404
QuarkXPress Server Error #–43
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–37
This alert displays if you specify an invalid file name or path.
HTTP Error #500The XML document
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
HTTP Error #500The XML document
This alert displays if you supply an invalid value in the XML.
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 Mac OS, 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>
82 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
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 DTD:
• "BOX (Modifier DTD)"
• "ID (Modifier DTD)"
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>
A preview of the QuarkXPress project with the box deleted.Response
File not found.Alerts
pathname.
HTTP Error #404
QuarkXPress Server Error #–43
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–37
This alert displays if you specify an invalid file name or path.
document is not
HTTP Error #500The XML
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 83
USING THE WEB INTERFACE
Logs
Example GET URL
valid or well formed.
document contains an invalid tag value.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:
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 Mac OS, 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>
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
HTTP Error #500The XML
This alert displays if you supply an invalid value in the XML.
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>
84 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
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.

Creating tables

To create a new table, use the following parameters in the Modifier DTD:
• "SPREAD (Modifier DTD)"
• "TABLE (Modifier DTD)"
• "COLSPEC (Modifier DTD)"
• "COLUMN (Modifier DTD)"
• "ROW (Modifier DTD)"
• "CELL (Modifier DTD)"
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>
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 85
USING THE WEB INTERFACE
</LAYOUT> </PROJECT>
A preview of the QuarkXPress project with new table created in the specified position.Response
Logs
Example GET URL
Example, object model
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
4/10/2007 17:54:37 tab.qxp Type: image/jpeg Size: 9049 Client: 127.0.0.1
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 Mac OS, 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>
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 < Table
To delete a table, provide the table's name or ID and set the operation attribute to "DELETE".

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 DTD:
86 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
• "BOX (Modifier DTD)"
• "ID (Modifier DTD)"
• "TEXT (Modifier DTD)"
• "STORY (Modifier DTD)"
• "PARAGRAPH (Modifier DTD)"
• "FORMAT (Modifier DTD)"
• "DROPCAP (Modifier DTD)"
• "TABSPEC (Modifier DTD)"
• "TAB (Modifier DTD)"
• "RULE (Modifier DTD)"
• "RICHTEXT (Modifier DTD)"
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"/> <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>
A preview of a QuarkXPress project with the values in the ModifierXT tags applied on text boxes.Response
File not found.Alerts
HTTP Error #404
QuarkXPress Server Error #–43
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 87
USING THE WEB INTERFACE
pathname.
document is not valid or well formed.
with the specified identifier.
value is outside the valid range.
color is not available to the document
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–37
This alert displays if you specify an invalid file name or path.
HTTP Error #500The XML
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
HTTP Error #500There is no box This alert displays if the box specified by the child text node of an <ID> element
does not exist.
HTTP Error #500The text size This alert displays if the value specified in a <SIZE> element is invalid.
What to do: Specify a value between 2 and 720 points.
HTTP Error #500The specified This alert displays if the value specified in a <COLOR> element is invalid.
Logs
Example GET URL
HTTP Error #500The specified font is not available
document contains an invalid tag value.
box cannot be modified.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If 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.
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 Mac OS, 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"/>
This alert displays if the value specified in a <FONT> element is invalid or the
specified font is not present on the server.
HTTP Error #500The XML
This alert displays if you supply an invalid value in the XML.
HTTP Error #500The specified
This alert displays if you try to modify text properties on a box that is not a text
box.
88 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
<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 ModifierFileRequest
For ModifierFileRequest, the member contents are used to set the file path or send
the XML itself.
sdk.QRequestContext rc = new sdk.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;
Example 2, object model
//Create the service and call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);
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.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 89
USING THE WEB INTERFACE
Notes
The <FITTEXTTOBOX> element type 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 DTD:
• "BOX (Modifier DTD)"
• "ID (Modifier DTD)"
• "PICTURE (Modifier DTD)"
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>
A preview of the QuarkXPress project with image modifier tags applied to the picture boxes.Response
File not found.Alerts
pathname.
document is not
HTTP Error #404
QuarkXPress Server Error #–43
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–37
This alert displays if you specify an invalid file name or path.
HTTP Error #500The XML
90 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
valid or well formed.
with the specified identifier.
Across should be between 10% and 1000%.
Down should be between 10% and 1000%.
Offset Across is in invalid range.
Offset Down is in invalid range
Picture Angle must be between –360 and 360 degrees.
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
HTTP Error #500There is no box This alert displays if the box specified by the child text node of the <ID> element
does not exist.
HTTP Error #500The value of Scale This alert displays if the value of the child text node of a <SCALEACROSS>
element is invalid.
HTTP Error #500The Value of Scale This alert displays if the value of the child text node of a <SCALEDOWN> element
is invalid.
HTTP Error #500The value of This alert displays if the value of the child text node of the <OFFSETACROSS>
element is invalid.
HTTP Error #500The value of This alert displays if the value of the child text node of the <OFFSETDOWN>
element is invalid.
HTTP Error #500The value of This alert displays if the value of the child text node of the <ANGLE> element
is invalid.
Logs
Example GET URL
HTTP Error #500The value of Picture Skew must be between –75 and 75 degrees.
document contains an invalid tag value.
cannot be modified.
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2005 11:27:42 jpeg/sample.qxp Type: image/jpeg Size: 31715 Client: 127.0.0.1
If 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.
When QuarkXPress Server is running on Windows, use a URL like the following:
http://localhost:8080/sample.qxp?modify= file:C:\imageProperties.xml
This alert displays if the value of the child text node of the <SKEW> element is
invalid.
HTTP Error #500The XML
This alert displays if you supply an invalid value in the XML.
HTTP Error #500The specified box
This alert displays if you try to modify picture properties on a box that is not a
picture box.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 91
USING THE WEB INTERFACE
When QuarkXPress Server is running on Mac OS, 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 ModifierFileRequest
For ModifierFileRequest, the member contents are used to set the file path or send
the XML itself.
QRequestContext rc = new sdk.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 QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.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.
92 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
You cannot replace an image with the Modifier XTensions software.Notes 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.
To import text or image data into a project, use the following parameters in the Modifier
DTD:
• "BOX (Modifier DTD) "
• "ID (Modifier DTD)"
• "PICTURE (Modifier DTD)" (this is not a required element when importing data)
• "TEXT (Modifier DTD)"
• "STORY (Modifier DTD)"
• "CONTENT (Modifier DTD)"
Response
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>
A preview of a QuarkXPress project with a value in the data import XML tags applied to the text boxes.
File not found.Alerts
HTTP Error #404
QuarkXPress Server Error #–43
This alert displays if you specify an invalid XML file or request a document that is not in the document pool.
document is not valid or well formed.
HTTP Error #500The XML
This alert displays if the XML you supply is not well-formed or does not adhere to the Modifier DTD.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 93
USING THE WEB INTERFACE
with the specified identifier.
box is not a picture or text box.
cannot be manipulated.
picture (#106)
pathname
HTTP Error #500There is no box This alert displays if the box specified by the child text node of the <ID> element
does not exist.
HTTP Error #500The specified
This alert displays if you request a box that is not a text box or a picture box.
HTTP Error #500A locked layer
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.
HTTP Error #500Unable to read
QuarkXPress Server Error #–109
This alert displays if you try to import a text file into a picture box.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–37
This alert displays if you try to import an invalid or nonexistent file into a box.
Logs
Example GET URL
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/5/2005 18:11:54 sample.qxp Type: image/jpeg Size: 65982 Client: 127.0.0.1
If 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.
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 Mac OS, 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
94 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
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 ModifierFileRequest
For ModifierFileRequest, the member contents are used to set the file path or send
the XML itself.
sdk.QRequestContext rc = new sdk.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;
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 95
USING THE WEB INTERFACE
//Create the service and call it with QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.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 located anywhere on the server computer or any accessible network location.

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 DTD. 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 DTD, 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 DTD used for XML construction and deconstruction is completely Unicode-compliant,
making it ideal for use in international publishing. Furthermore, the use of this DTD
ensures that the schema of XML output created by Constructor does not change when
server preferences change. For more information, see "Modifier DTD (annotated)."
96 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
Some minor QuarkXPress features are not available through the Modifier DTD. However,
this DTD 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 DTD (see "Modifier DTD
(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 sheets name, like so:
Namespace
<PARAGRAPH PARASTYLE="BodyText"> <RICHTEXT>The sun has risen.</RICHTEXT> </PARAGRAPH>
The above information is included in the deconstructed projects 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 DTD. You can use the returned XML to create or modify a QuarkXPress document using the construct namespace or modify parameter.
xml
Modifier DTDDTD
Parameters
box
boxes
XSL
Returns XML only for the box with the given ID or name.
Returns XML only for the boxes with the IDs or names supplied as a comma -separated list.
Specifies the path of an XSL file for transforming the returned XML. Use the file: indicator to specify the path.
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 97
USING THE WEB INTERFACE
Response
layout
relativegeometry
relativetopage
copyfitinfo
Refer to the Modifier DTD
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>
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.
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.
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").
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
<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""
98 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
USING THE WEB INTERFACE
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>
Logs
Example GET URL
Example, Object Model
</SPREAD> </LAYOUT> </PROJECT>
If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. This message includes the date, time, request type, project name, response type, response size in bytes, and client IP address. For example:
8/3/2004 17:16:11 xml/sample.qxp Type: text/xml Size: 2364 Client: 127.0.0.1
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
Request object name: XMLRequest
XMLRequest xmlRequest = new XMLRequest(); QRequestContext context = new QRequestContext(); context.setDocumentName("SAMPLE_DOCUMENT.qxp"); context.setResponseAsURL(false); context.setRequest(xmlRequest); QContentData response = QRequestProcessor.getInstance().processRequest(context); System.out.println(response.getTextData());
QXP SERVER 8.1 WEB INTEGRATION GUIDE | 99
USING THE WEB INTERFACE

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.
Namespace
Parameters
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
DTD. For more information, see "Modifier DTD (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.
construct
Modifier DTDDTD
modify
qxpdocver
String
7 | 8 | japanese6 | korean6
The string or the path of the XML file that describes how to create the project. Use the file: indicator to specify the path.
Indicates the QuarkXPress version format to use. For example:
http://QXPServer8:8080/construct/ qxpdoc/project1.qxp?qxpdocver=7
100 | QXP SERVER 8.1 WEB INTEGRATION GUIDE
Loading...