2017

Table Of Contents
USING QUARKXPRESS SERVER
182 | A Guide to QuarkXPress Server 2017
Setprefs
The setprefs request handler lets you set server preferences. To use this request
handler, issue a
getprefs request, determine the name of the tag that needs to be
m
odified, and then submit a
s
etprefs
r
equest with the using the name of this tag.
For example, to turn off memory caching, you would first submit a
getprefs
request to the server. In the resulting XML, you would note that the name of the tag
for memory caching tag is AllowMemoryCaching. Finally, you would submit a
setprefs request to the server, like so:
http://localhost:8080/setprefs?AllowMemoryCaching=false
For a full list of preferences, see “General preferences“ and “Renderer preferences.”
General preferences
The /getprefs handler lets clients remotely retrieve an XML representation of the
current QuarkXPress Server preferences, as described below.
The
/setprefs handler lets clients remotely control QuarkXPress Server
preferences. For example,
http://<servername>:<port>/setprefs?AddConnectionFilter=action=al
if(!this.DocumentSettings1.documentName.Text.Equals(“”))
rc.documentName = this.DocumentSettings1.documentName.Text;
rc.request = new PreflightRequest(); //Create the service and call it with
QRequestContext object RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Namespace setprefs
Response The message “Preferences successfully set.”
Alerts
Incorrect administration realm
user name and password.
HTTP Error #401 This alert
displays if you specify an
invalid administrator user name
and password. What to do: Use
the user name and password set
in the QuarkXPress Server
Manager client Server
Configuration dialog box.
Logs See “Understanding logging.”
Example GET URL http://localhost:8080/setprefs?CacheSize=200
Example, object model
EMailPreferences emailPrefs = new EMailPreferences();
emailPrefs.emailFrom = “from@email.com”; emailPrefs.emailTo =
“to@email.com”; emailPrefs.smtpPort = “25”;
emailPrefs.smtpServerIP = “SMTPServerIP”; Preferences prefs =
new Preferences(); prefs.setEmailPreferences(emailPrefs); // Create
the service and call setPreferences method RequestService svc =
new RequestService(); svc.setPreferences(“ServerName”,
“ServerPort”, “Username”, “Password”, prefs);
Notes
If a user name and password have been set in the Server
Configuration dialog box, the browser requests that user name
and password when you submit a setprefs parameter request.