2020

Table Of Contents
USING QUARKXPRESS SERVER
pathname
Logs
If the request succeeds, a transaction success message is written to the
QuarkXPress Server transaction log file. For example: 8/5/2005 18:11:54 —
sample.qxp — Type: image/jpeg — Size: 65982 — 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 18:01:59 — Error — Error Code: 10343 — A locked Layer
cannot be manipulated.
Example GET
URL
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 macOS, 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 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 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 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
116 | A GUIDE TO QUARKXPRESS SERVER 2020