2015

Table Of Contents
When QuarkXPress Server is running on Windows, use a URL like the following:
http://localhost:8080/sample.qxp?modify=
file:C:\modifier.xml
Example GET
URL
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"/>
<TEXT><STORY><RICHTEXT FONT="Castella" PLAIN="true">
This is text.</RICHTEXT></STORY></TEXT></BOX>
</SPREAD></LAYOUT></PROJECT>
Request object names:
ModifierRequest
ModifierStreamRequest
Example 1,
object model
Project
RichText
Text
ID
Box
Layout
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 Text Modifier
// renderer request and embed it in request context
ModifierRequest textReq = new ModifierRequest();
Project contents = new Project();
RichText richText1 = new RichText();
richText1.value = this.text1.Text;
richText1.color = this.color1.Text;
Text boxText1 = new Text();
Story story = new Story();
story.richText = new RichText[]{richText1};
boxText1.story = story;
if(this.fittextbox1.Checked)
boxText1.fitTextToBox = "true";
if(this.clearoldtext1.Checked)
boxText1.clearOldText = "true";
Box box1 = new Box();
box1.UID = txtBox1;
box1.text = boxText1;
Layout layout1 = new Layout();
layout1.name = layoutText;
layout1.boxes = new Box[]{box1};
contents.layouts = new Layout[]{layout1};
textReq.contents = contents;
rc.request = textReq;
// Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
100 | A GUIDE TO QUARKXPRESS SERVER 2015
USING QUARKXPRESS SERVER