2015

Table Of Contents
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>
Request object names:
ModifierRequest
ModifierRequestContents
Example 1,
object model
Layout
ID
Box
Geometry
Runaround
ModifierFileRequest
For 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);
To edit the geometrical properties of an existing box in a QuarkXPress project, use the following
object hierarchy:
ModifierRequest < Project < Layout < Spread < Box < Geometry
Example 2,
object model
A GUIDE TO QUARKXPRESS SERVER 2015 | 93
USING QUARKXPRESS SERVER