2017

Table Of Contents
USING QUARKXPRESS SERVER
A Guide to QuarkXPress Server 2017 | 107
not valid or well
formed.
you supply is not well-formed or does not adhere
to the Modifier DTD.
The XML document
contains an invalid tag
value.
H
TTP Error #500 This alert displays if you supply
an invalid value in the XML.
L
ogs
If the request succeeds, a transaction success message is written to the
QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 —
j
peg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If
an alert displays, an error message is written to the QuarkXPress Server
error log file. For example:
Example GET URL
When QuarkXPress Server is running on Windows, use a URL like the
following:http://localhost:8080/sample.qxp?modify=
file:C:\updateBox.xml When QuarkXPress Server is running on Mac OS,
use a URL like the following:http://localhost:8080/sample.qxp?modify=
file:MacHD:xml:updateBox.xml You can also supply a string that consists
of valid XML commands. For
example:http://localhost:8080/sample.qxp?modify=
<PROJECT><LAYOUT><ID UID=”Layout1”/><SPREAD><ID UID=”1”/>
<BOX BOXTYPE=”CT_PICT” COLOR=”Blue” SHADE=”50”
OPACITY=”50”> <ID NAME=”MOUNTAINS”/><CONTENT>
file:Services.eps</CONTENT> </BOX></SPREAD></LAYOUT></PROJECT>
Example 1, object
model
Request object names:ModifierRequest ModifierRequestContents Layout
ID Box Geometry Runaround ModifierFileRequestFor ModifierFileRequest,
the member contents are used to set the file path or send the XML itself.
com.quark.qxpsm.QRequestContext rc = new
com.quark.qxpsm.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals(“”))
rc.documentName = this.DocumentSettings1.documentName.Text;
//STEP 2(SPECIFIC TO REQUESTS): //Create the BOX modifier renderer
request and //embed it in request context ModifierRequest request = new
ModifierRequest(); Project contents = new Project(); Geometry geo = new
Geometry(); geo.moveUp = this.moveup.Text; geo.color = this.color.Text;
geo.growDown = this.growdown.Text; geo.shrinkAcross =
this.shrinkacross.Text; Box box = new Box(); box.UID = this.Boxid.Text;
box.geometry = geo; Layout layout1 = new Layout(); layout1.name =
this.layout.Text; layout1.boxes = new Box[]{box};
if(this.runaround.Checked == true) { Runaround runaround = new
Runaround(); runaround.type = this.runaroundtype.Text;
runaround.top = this.top.Text; runaround.left = this.left.Text;
runaround.right = this.right.Text; geo.runaround = runaround; }
contents.layouts = new Layout[]{layout1}; request.project = contents;
rc.request = request; //Create the service and call it with
QRequestContext object RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Example 2, object
model
To edit the geometrical properties of an existing box in a QuarkXPress
project, use the following object hierarchy:ModifierRequest < Project <
Layout < Spread < Box < Geometry The Geometry object has the following
properties:allowBoxOffPage allowBoxOnToPasteBoard angle growAcross
growDown layer linestyle (of type ‘Linestyle’) moveDown moveLeft
moveRight moveUp page position (of type ‘Position’) runaround (of type