2020

Table Of Contents
USING QUARKXPRESS SERVER
Logs
If the request succeeds, a transaction success message is written to the
QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 —
jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If
an alert displays, an error message is written to the QuarkXPress Server
error log file. For example:8/5/2005 13:32:10 — Error — Error Code: 10006
— There is no box with the specified identifier.
Example GET URL
When QuarkXPress Server is running on Windows, use a URL like the
following:http://localhost:8080/sample.qxp?modify= file:C:\modifier.xml
When QuarkXPress Server is running on macOS, use a URL like the
following:http://localhost:8080/sample.qxp?modify=
file:MacHD:xml:modifier.xml You can also supply a string that consists of
valid XML commands. For example:
http://localhost:8080/sample.qxp?modify= <PROJECT><LAYOUT><ID
UID=”1”/><SPREAD><ID UID=”1”/> <BOX BOXTYPE=”CT_TEXT”><ID
NAME=”BACKGROUND”/> <TEXT><STORY><RICHTEXT
FONT=”Castella” PLAIN=”true”> This is
text.</RICHTEXT></STORY></TEXT></BOX>
</SPREAD></LAYOUT></PROJECT>
Example 1, object
model
Request object names: ModifierRequest ModifierStreamRequest Project
RichText Text ID Box Layout ModifierFileRequestFor ModifierFileRequest,
the member contents are used to set the file path or send the XML itself.
com.quark.qxpsm.QRequestContext rc = new
com.quark.qxpsm.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals(“”))
rc.documentName = this.DocumentSettings1.documentName.Text; //
STEP 2 (SPECIFIC TO REQUESTS):Create the Text Modifier // renderer
request and embed it in request context ModifierRequest textReq = new
ModifierRequest(); Project contents = new Project(); RichText richText1 =
new RichText(); richText1.value = this.text1.Text; richText1.color =
this.color1.Text; Text boxText1 = new Text(); Story story = new Story();
story.richText = new RichText[]{richText1}; boxText1.story = story;
if(this.fittextbox1.Checked) boxText1.fitTextToBox = “true”;
if(this.clearoldtext1.Checked) boxText1.clearOldText = “true”; Box box1 =
new Box(); box1.UID = txtBox1; box1.text = boxText1; Layout layout1 =
new Layout(); layout1.name = layoutText; layout1.boxes = new
Box[]{box1}; contents.layouts = new Layout[]{layout1}; textReq.contents =
contents; rc.request = textReq; // Create the service and call it with
QRequestContext object RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Example 2, object
model
To edit the properties of an existing text box in a QuarkXPress project, use
the following object hierarchy:ModifierRequest < Project < Layout < Spread
< Box < Text < Story < Paragraph < RichText For a list of the RichText
object’s properties, see the JavaDoc installed with QuarkXPress Manager.
The Story object also contains some text-related properties: fitTextToBox,
includeStylesheets, convertQuotes, and clearOldText.
Notes
The <FITTEXTTOBOX> attribute depends on two preferences: Allow Text
to Grow and Font Size. To set these preferences in QuarkXPress Server,
choose QuarkXPress > Server > Preferences and then click Modifier in the
list on the left.
A GUIDE TO QUARKXPRESS SERVER 2020 | 111