Formatting conventions highlight information to help you quickly find what you
need.
• Bold type style: The names of all dialog boxes, fields, and other controls are set in bold
type. For example: "Click OK."
• References: In descriptions of features, parenthetical references guide you in accessing
those features. For example: "The Find/Change dialog box (Edit menu) lets you find
and replace text."
CONVENTIONS
• Arrows: You will often see arrows (>), which map out the menu path to a feature. For
example: "Choose Edit > Style Sheets to display the Style Sheets dialog box."
• Icons: Although many tools and buttons are referenced by name, which you can see
by displaying ToolTips, in some cases icons are shown for easy identification. For
example, "Click the button on the Measurements palette to center text."
• Cross-platform issues: This application is quite consistent across operating systems.
However, some labels, buttons, key combinations, and other aspects of the application
must differ between Mac OS® and Windows® because of user interface conventions
or other factors. In such cases, both the Mac OS and Windows versions are presented,
separated by a slash, with the Mac OS version presented first. For example, if the
Mac OS version of a button is labeled Select, and the Windows version is labeled
Browse, you are directed to "Click Select/Browse." More complex cross-platform
differences are mentioned in notes or parenthetical statements.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 9
GETTING STARTED WITH QUARKXPRESS SERVER
Getting started with
QuarkXPress Server
QuarkXPress Server lets you render QuarkXPress projects in a variety of formats.
QuarkXPress Server architecture
The QuarkXPress Server architecture is shown in the following diagram.
QuarkXPress Server architecture diagram
Understanding QuarkXPress Server
QuarkXPress Server lets you output customized QuarkXPress layouts in a variety of
formats — including JPEG, Portable Document Format (PDF), and PostScript®— from
a centralized QuarkXPress Server application. To send a request to a QuarkXPress Server
10 | A GUIDE TO QUARKXPRESS SERVER 10.1
GETTING STARTED WITH QUARKXPRESS SERVER
application, all you need to do is enter a URL into your Web browser's address field.
For example, the following URL instructs the QuarkXPress Server application named
"QXPServer" to return the file "MyProject.qxp" as a PDF file:
http://QXPServer:8080/pdf/MyProject.qxp
The QuarkXPress Server application receives these requests, renders (creates) the
requested projects in the requested formats, and then returns the rendered file to the
client application (in this case, the Web browser).
The format of QuarkXPress Server URL requests is described in detail in "Creating URL
requests" and in "Using QuarkXPress Server."
You can also create custom applications that communicate with a QuarkXPress Server
application using HTTP, Simple Object Access Protocol (SOAP), or another protocol.
For more information, see "Using QuarkXPress Server."
You can think of QuarkXPress Server as a special version of QuarkXPress that runs on
a server with the following main differences:
• Instead of accepting input from a keyboard and mouse, QuarkXPress Server accepts
input in the form of URLs and other types of requests.
• Instead of sending a project to a printer, QuarkXPress Server renders (creates) output
in a particular format and sends the rendered file to a client.
Server templates and static projects
QuarkXPress Server can open, render, and serve two types of projects:
• Static projects are QuarkXPress projects that can be rendered and served as-is in a variety
of formats by the QuarkXPress Server application. For example, you might make a
product manual available as a static project and allow customers to download that
manual in a variety of formats.
• Server templates are QuarkXPress projects that can be manipulated by the
QuarkXPress Server application before being rendered and served. For example, you
might make a sales piece available as a server template so that each person who
downloads it receives a personalized copy.
QuarkXPress Server can open QuarkXPress documents, projects, and templates created
in any language edition of QuarkXPress 7.0 or later. QuarkXPress Server can save and
export projects in QuarkXPress 8.x, 9.x and 10.x format.
The document pool and the Streaming Document Provider
QuarkXPress Server has two main ways to find or receive content for rendering.
• The document pool
• The Streaming Document Provider
QuarkXPress Server can read templates and static projects from a directory called the
document pool. The document pool can be any directory that is available to
A GUIDE TO QUARKXPRESS SERVER 10.1 | 11
GETTING STARTED WITH QUARKXPRESS SERVER
QuarkXPress Server through a file system or an FTP server. You can use any of the
following methods to place files in the document pool:
• Drag the files to the document pool directory.
• Use the Add Files command in the Document Pool screen of the QuarkXPress Server
Web interface.
• Upload the files using FTP to the document pool directory.
• Use Telegraph XTensions® software to upload the files to the document pool from
within QuarkXPress. (For more information about Telegraph XTensions software, see
"Telegraph XTensions software.")
For more information about the document pool, see "The QuarkXPress Server user
interface."
The document pool directory cannot be an encrypted directory.
QuarkXPress Server can also receive templates, projects, and other files as part of a
multipart HTTP request. For more information, see "Using the Streaming Document
Provider."
In addition, QuarkXPress Server can serve documents from a database, a content
management system, or other sources. Collectively, the document pool and any other
source of files to be served are referred to as document providers.
Projects and layouts
QuarkXPress projects can contain one or more layouts, and only one layout can be
rendered at any given time. If you do not specify a layout when you send a rendering
request, QuarkXPress Server renders the first layout in the project.
Job Jackets and resources
In QuarkXPress, resources are things such as style sheets, colors, H&Js, output styles,
and item styles. Resources are stored in a Job Jackets structure, which can be either
embedded in a project or stored in a separate Job Jackets file.
QuarkXPress Server uses a default Job Jackets file to make a default set of resources
available to all projects handled by QuarkXPress Server, regardless of whether they are
included in the projects and articles you render. You can update this file in two ways:
• Using the QuarkXPress Server Web interface. For more information, see "Job Jackets
dialog box."
• Using request handlers. For more information, see "Jobjacket" and "updateprefsfromjj."
Once you've downloaded the default Job Jackets file, you can update its resources using
QuarkXPress. For more information, see "Job Jackets" in A Guide to QuarkXPress.
The location of the default Job Jackets file is stored in the QuarkXPress Server
preferences folder. For more information, see "QuarkXPress Server preferences."
12 | A GUIDE TO QUARKXPRESS SERVER 10.1
Caching
To maximize efficiency, QuarkXPress Server uses cached versions of all rendered projects
whenever possible. You can configure projects so that they are never cached, so that
they are cached for a particular amount of time, or so that they are rendered every
time they are served.
QuarkXPress Server preferences
When you launch QuarkXPress Server, the application creates preferences files that
are functionally and structurally equivalent to the preferences files created by
QuarkXPress. These preferences files reside in the QuarkXPress Server "Preferences"
folder. QuarkXPress Server also creates a "QuarkXPress Server.prf" file in the "Preferences"
folder. This file contains preference settings that are specific to QuarkXPress Server.
QuarkXPress Server uses these preferences the same way QuarkXPress uses them. If an
XTensions module creates a project in QuarkXPress Server, that project draws its
settings from the QuarkXPress Server preferences just as a new QuarkXPress project
draws its settings from the QuarkXPress preferences.
Preferences files are stored in the following locations:
GETTING STARTED WITH QUARKXPRESS SERVER
•
Mac OS: [User]/Library/Preferences/Quark/QuarkXPress Server Renderer
10.0/
• Windows Vista, Windows 2008, or Windows 2008 R2 64-bit when QuarkXPress Server
is running normally or as a service under a domain user account: C:\Users\[user
name]\AppData\Roaming\Quark\QuarkXPress Server Renderer 10.0\
• Windows 2008 or Windows Vista, when QuarkXPress Server is running as a service
under a local user account:
C:\Windows\System32\config\systemprofile\AppData\Roaming\Quark\QuarkXPress
Server Renderer 10.0\
• Windows 2008 R2 64-bit, when QuarkXPress Server is running as a service under a
local user account:
C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\Quark\QuarkXPress
Server Renderer 10.0
For more information about preferences, see "Administration menu."
Quark License Administrator
To prevent unauthorized use, QuarkXPress Server requires the presence of a Quark®
License Administrator (QLA) server to launch. QuarkXPress Server follows the
configuration and control rules that are enforced by QLA. For more information about
QLA, see the QLA documentation included with QuarkXPress Server.
Master-renderer environment
Requests for project renders are stored in a connection queue. The requests in the
rendering queue can be processed by a single QuarkXPress Server application, or by a
master QuarkXPress Server application and several renderers (additional instances of
QuarkXPress Server). The master QuarkXPress Server application launches the available
number of renderers and then passes the requests in the connection queue to those
A GUIDE TO QUARKXPRESS SERVER 10.1 | 13
GETTING STARTED WITH QUARKXPRESS SERVER
renderers as they become available. The number of renderers available for launch is
determined by the number of licenses available from the QLA server.
The master QuarkXPress Server process and all of the renderers it launches share the
following elements:
• The same application preferences (each renderer has its own preferences files, but
QuarkXPress Server keeps them synchronized)
• The same document cache in memory
• The same memory cache
• The same server XTensions modules (a separate instance of each XTensions module
runs with each renderer)
• The same server document pool (if defined in the QuarkXPress Server preferences or
if a document provider is used in place of the document pool)
If a renderer unexpectedly quits, the master QuarkXPress Server restarts the renderer
without requiring any action from you.
Changing logging levels in "log4j.xml"
You can change the logging levels for QuarkXPress Server. Options include ERROR,
INFO, WARN, DEBUG, and TRACE.
•
ERROR = includes messages that indicate disrupted and failed requests.
•
INFO = includes messages that indicate the state of services.
•
WARN = includes non-critical service error messages
•
DEBUG = includes messages that indicate server resource usage.
•
TRACE = includes messages according to activity related to requests.
Refer to Java documentation for more information about logging levels.
To change logging levels:
Open the "conf" folder in your QuarkXPress Server folder.
1
Open "log4j.xml" in a text-editing application.
2
To define the logging level for QuarkXPerss Server errors, scroll to <logger
Understanding QuarkXPress Server XTensions software
QuarkXPress Server ships with a collection of XTensions software that adds capabilities
to QuarkXPress Server. For example, PDF Export XTensions software lets
QuarkXPress Server serve content in PDF format; Modifier XTensions software lets you
retrieve, manipulate, and reconstruct XML representations of projects; and
QuarkCopyDesk® Renderer XTensions software lets you create QuarkCopyDesk articles.
Telegraph XTensions software works with QuarkXPress to allow designers to name
boxes in template files so that those boxes can be addressed by URLs.
For more information about XTensions software included with QuarkXPress Server,
see "QuarkXPress Server XTensions software" and "Telegraph XTensions software."
The QuarkXPress Server XTensions API
In addition to the XTensions modules included with QuarkXPress Server, developers
can create custom XTensions software that add features. The complete server XTensions
Application Programming Interface (API) documentation is available in the
QuarkXPress Server XTensions Developer's Kit (XDK).
As of version 8.0, the QuarkXPress Server XDK is Unicode-compliant.
The QuarkXPress Server XDK lets you create XTensions modules that provide the
following abilities:
• The ability to register request handlers
• The ability to register project providers
• The ability to register new render formats
• The ability to add items to the list of response properties, cookies, and HTTP header
items
• The ability to log messages in log files
• The ability to initiate a new transaction to be processed by the server
• The ability to completely control how projects are processed by the server
In addition, QuarkXPress Server XTensions software can register for the following basic
callbacks:
• Pre-processing
• Content loading
• Layout modification
A GUIDE TO QUARKXPRESS SERVER 10.1 | 15
GETTING STARTED WITH QUARKXPRESS SERVER
• Post-processing
• Removing slugs while running the QuarkXPress project renderer
• Analyzing the server after a transaction is complete
• Pre- and post-transaction callback
Configuring QuarkXPress Server for launch
To configure QuarkXPress Server prior to launch, open the file [QuarkXPress Server
application folder]/conf/ServerApp.properties folder) and modify it as
follows:
•
To make the server run without loading any network interface, use the -nonetwork
option with the qxpservercore.serverRendererParameters. In this mode, the
only transactions a server can run are those passed to it by another process.
• To control whether renderers are monitored, set
qxpservercore.monitorrenderers.value to true or false.
• To specify the query interval for monitoring renderers, set
qxpservercore.monitorrenderers.queryinterval.value to a value in seconds.
• To specify the number of retries for monitoring renderers, set
qqxpservercore.monitorrenderers.noofretries.value to an integer. If a
renderer process has been attempting to fulfill a request for the specified number of
retries (with the specified query interval in seconds between retries), the renderer
monitor recyles that process.
• To control how many renderers the master process launches, specify a number for
qxpserver.subrenders. Note that the number of renderers you can launch depends
on your license.
• To force the renderers to restart on a periodic basis, specify a value in hours for
qxps.render.recycle.interval. The default value is 24, or 24 hours. Decimal
values are permitted. Renderers restart serially, so one renderer doesn't restart until
the other is finished restarting. If a renderer is busy, the master process waits for 15
minutes, and then if the renderer is till busy, postpones the restart until the next
interval elapses. Set this value to zero to turn the automatic restart feature off.
Launching QuarkXPress Server
On Windows, you can install QuarkXPress Server as an application or as a service
(Quark recommends that you always run it as a service). On Mac OS, QuarkXPress
Server always runs as an application.
If you install QuarkXPress Server on Windows as an application, you can launch it
using the Start menu or by double-clicking the "ServerStartup.bat" in the QuarkXPress
Server application folder.
If you want to launch QuarkXPress Server as an application on Windows Server 2008
Quark recommends executing "ServerStartup.bat" as an administrator.
16 | A GUIDE TO QUARKXPRESS SERVER 10.1
For information on launching QuarkXPress Server in a separate Tomcat installation,
see "Deploying QuarkXPress Server externally" in the QuarkXPress Server ReadMe.
QuarkXPress Server offers a browser-based user interface instead of a conventional user
interface.
Quitting QuarkXPress Server
To quit QuarkXPress Server, press Control+C.
GETTING STARTED WITH QUARKXPRESS SERVER
A GUIDE TO QUARKXPRESS SERVER 10.1 | 17
THE QUARKXPRESS SERVER USER INTERFACE
The QuarkXPress Server user interface
QuarkXPress Server offers a browser-based user interface instead of a conventional user
interface. This chapter describes that interface and explains how you can use it to
configure and customize your QuarkXPress Server application and manage your server
XTensions modules.
To view the QuarkXPress Server welcome page, launch a Web browser and enter the
URL http://[server]:[port] (where [server] is the IP address or domain name
of the server and [port] is the TCP/IP port on which the server is running). The
welcome screen displays.
The QuarkXPress Server welcome page
To display the administrative client, click Open Admin Client. If the server has realm
verification enabled, you will be asked to enter your user name and password. The
administrative client displays.
Navigation pane
The navigation pane on the left side of the has two areas. The Server Information
area lets you view server information and the transaction log, and the Document Pool
area lets you view the contents of the document pool. You can collapse and expand
this pane with the button at the right end of the Navigation Pane header.
If you click Server Information, the Status Monitor screen displays. The fields in the
top area provide information about the server. The icons in the area below represent
the renderers that are currently running and show which requests are being processed
by each renderer in real time. This screen also shows how many active and idle renderers
there are.
18 | A GUIDE TO QUARKXPRESS SERVER 10.1
THE QUARKXPRESS SERVER USER INTERFACE
Status Monitor screen
If you click Manage Logs, the Logs screen displays the current transaction log.
Logs screen
• To download the active log, including recent crash reports, click Download Logs at
the top of the Logs header.
• To make the log scroll automatically as events occur, check Auto Scroll.
• To clear all logs, click Clear All Logs.
• To clear the current log, click Clear Log.
• To display the Log Settings dialog box, click Log Settings. In this dialog box, you can
change the maximum log file size, the maximum rolling count, and the logging level
for the general QuarkXPress Server log, the QuarkXPress Server transaction log, and
the QuarkXPress Server fatal log.
• To view a particular log file, choose an option from the Select Log File drop-down
menu.
If you click Show XTensions Information, the XTensions Information screen displays,
allowing yout o view the status of all installed XTensions modules.
If you click Manage Fonts, a list of fonts installed on the Server machine is displayed.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 19
THE QUARKXPRESS SERVER USER INTERFACE
Fonts screen
To search fonts, use the list search box in the top right corner.
To add fonts to the Server machine, click the Add Fonts button. This will copy the
fonts to the "privatefonts" folder in the QuarkXPress Renderer folder.
Administration menu
The administration menu lets you manage QuarkXPress Server.
You do not have to restart the server in GUI mode to set preferences.
General Preferences dialog box
The General Preferences dialog box (Administration > Preferences > General) lets
you set preferences that are not related to rendering. It includes the tabs described in
the following topics.
You can also set general preferences using the setprefs request handler. For more
information, see "Setprefs."
General Preferences — Server
The Server tab (Administration > Preferences > General > Server) includes the
following controls.
Use the Document Root Folder field to specify the location of the document pool.
Putting the document pool on a network connected drive is not recommended, because
this negatively impacts the performance of QuarkXPress Server.
20 | A GUIDE TO QUARKXPRESS SERVER 10.1
THE QUARKXPRESS SERVER USER INTERFACE
Use the Allow Memory Caching check box to control whether memory is cached.
Use the Max Memory Cache Size field to specify the maximum memory size allocated
to the cache memory. Valid values are from 10MB to 1024MB.
Use the Force Served Documents Closed check box to control whether
QuarkXPress Server closes projects from the document pool after it renders them,
regardless of the Telegraph XTensions software setting. Uncheck this box to keep such
projects open on the server.
Use the Default Renderer Type drop-down menu to specify the default rendering
format for the server.
• Appstudio: Returns a .zip file containing an HTML5 App Studio article.
• Appstudio Upload: Exports an HTML5 App Studio article and uploads it to the App
Studio Publishing Portal.
• AVE: Returns a .zip file containing an AVE issue (.zave) file and its manifest.
• ePUB: Returns an ePUB file.
• EPS Document: Returns an Encapsulated PostScript (EPS) file.
• JPEG: Returns a JPEG file.
• PDF: Returns a PDF file.
• PNG: Returns a Portable Network Graphics (PNG) file.
• PostScript: Returns a PostScript file.
• QCDDOC: Returns a QuarkCopyDesk article.
• QuarkXPress Document: Returns a QuarkXPress project.
• Raw Custom: Returns a file in internal QuarkXPress format for use by server XTensions
software developers.
• RLE Raw Custom: Returns a file in internal QuarkXPress format (compressed using
Run Length Encoding) for use by server XTensions software developers.
• SWF: Returns a SWF (Flash) file.
Use the Scale field to specify the default scale percentage at which QuarkXPress Server
should render projects.
Use the Disable QXD Return check box to specify whether QuarkXPress Server can
return QuarkXPress projects to clients.
General Preferences — Log
The Log tab (Administration > Preferences > General > Log) includes the following
controls.
Use the Log Document Problems check box to specify whether to include problem
descriptions in transaction log files. The "Log" folder inside the QuarkXPress Server
application folder contains three log files:
• QuarkXPress Server Fatal Log.log: This log lists all fatal errors.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 21
THE QUARKXPRESS SERVER USER INTERFACE
• QuarkXPress Server Log.log: The log for the Java process. This log contains source
code-level logging information that can be useful in troubleshooting.
• QuarkXPress Server Transaction Log.log: This log lists all transactions and all errors.
Detailed application logging is enabled for these log files only if it is enabled in the
"log4j.xml" file.
To log detailed transaction timing data, check Log Timing Data.
Logged problems include the following:
• Missing Fonts: If fonts are missing from a project that has been requested for rendering,
a one-line description of each missing font is added to the error log. If
QuarkXPress Server receives a request to render a project and does not have access to
the fonts required by the project, it uses the fonts specified in the Fonts tab of the
Preferences dialog box (Administration > Preferences > General). If these fonts are
also unavailable, QuarkXPress Server substitutes Helvetica (Mac OS) or Arial (Windows).
This behavior is the same as it is in QuarkXPress.
• Missing Pictures
• Missing SXTs: If a required server XTensions module is missing when a rendering
request is received, a one-line description of each missing module is added to the error
log. If the name of the missing module is not returnable, the XTensions module ID
number is returned.
• Text Encoding/Character Set Problems: If text is sent to a text box in the template
and the system does not have access to the correct font glyph, the issue is logged. The
log data indicates the character set that the system attempted to convert. For example,
the log entry might show that a request for Japanese characters was sent to an English
project.
Information about missing fonts and missing pictures is also recorded in the
"QuarkXPressServerRenderer.log" file. This file also contains detailed timing information,
including the transaction UID for each transaction. This log file can be found here:
•
Mac OS: [drive]/Users/[user name]/Library/Logs/Quark
•
Windows: [drive]:\Users\[user name]\AppData\Quark\Log or
[drive]:\Documents and Settings\[user name]\Application
Data\Quark\Log
To download all logs to a non-server computer, click Show Transaction Log in the
QuarkXPress Server Web interface, then click Download Logs on the home page.
General Preferences — Email
QuarkXPress Server can automatically notify someone by e-mail when the checked-out
QLA license is about to expire. The Email tab (Administration > Preferences > General
> Email) lets you specify where such e-mail messages should be sent.
Use the Server field to specify the domain name or IP address of the e-mail server that
QuarkXPress Server should use to send messages (for example, mail.quark.com).
22 | A GUIDE TO QUARKXPRESS SERVER 10.1
Use the Port field to specify the port number of the e-mail server that
QuarkXPress Server should use to send messages. Valid values are from 0 to 255.
Use the From to specify the source e-mail address the QuarkXPress Server application
should use to send messages (for example, QXPSserver1@quark.com).
Use the To to specify the e-mail address to which the QuarkXPress Server application
should send messages (for example, QXPServerAdmin@quark.com).
General Preferences — Authentication
The Authentication tab (Administration > Preferences > General > Authentication)
includes the following controls.
Check Authenticate For Admin Requests to enable the Username and Password
fields. These fields let you control access to administrative parameters and features.
You can enter up to 32 characters.
Renderer Preferences dialog box
Use the renderer Preferences dialog box (Administration > Preferences > Renderer)
to set up default preferences for use when projects are created in QuarkXPress Server.
It includes the tabs described in the following topics.
THE QUARKXPRESS SERVER USER INTERFACE
Many of these preferences come into play only when you create a project in
QuarkXPress Server, either using a construct request or through a request handled
by a custom QuarkXPress Server XTensions module.
You can also set renderer preferences using the setrendererprefs request handler.
For more information, see"Setrendererprefs."
In versions of QuarkXPress Server prior to 9.0, these resources were accessed through
the Document Controls submenu.
Preferences — Display
The Display pane (Administration > Preferences > Renderer > Display) includes the
following controls.
Use the Color TIFFs drop-down list to specify the color depth of screen previews created
for color TIFFs when they are imported.
Use the Gray TIFFs drop-down list to specify the resolution of screen previews created
for grayscale TIFFs when they are imported.
Choose a profile that corresponds to your monitor from the Monitor Profile drop-down
menu, or choose Automatic. Profiles can be placed in the "Profiles" folder in the
Use the Modifier pane (Administration > Preferences > Renderer > Modifier) to
control whether and where errors are displayed in rendered layouts.
To include descriptions of rendering errors in the layout itselt, check Annotate errors
in the Output Document. (For more information, see "annotateerrors.") In rendered
QuarkXPress files, errors are displayed as notes. In rendered PDFs, errors are displayed
as comments. In XML output, errors are displayed as notes XML markup.
To append descriptions of rendering errors after the last page, check Append errors
into the Output Document. (For more information, see "appenderrors.") Descriptions
of rendering errors are formatted in 10-point magenta Arial.
Job Jackets dialog box
The Job Jackets dialog box lets you edit the Job Jackets file used by QuarkXPress Server.
To edit the QuarkXPress Server Job Jackets file:
In the QuarkXPress Server Web interface, choose Administration > Job Jackets. The
1
Manage Job Jacket dialog box displays.
Click the Get Job Jacket for editing button and save the Job Jackets file to the desktop.
2
Open the downloaded Job Jackets file in QuarkXPress and make any necessary changes
3
to the QXPSJobTicket Job Ticket.
In the Job Jacket dialog box, click Choose File and select the modified Job Jackets
4
file.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 31
THE QUARKXPRESS SERVER USER INTERFACE
Click Submit. The QuarkXPress Server Job Jackets file is replaced with the modified
5
version.
App Studio preferences
The AppStudio dialog box lets you specify credentials and proxy settings so that
QuarkXPress Server can upload HTML5 App Studio articles to the App Studio Publishing
Portal. Enter your App Studio Publishing Portal user name and password, then enter
the proxy settings for your proxy server (if any).
Check Out License dialog box
To check the QuarkXPress Server license out of Quark License Administrator, choose
Administration > Check Out License. To specify the number of days for checkout,
enter a value in days in the Check out for field. To be warned in advance of license
expiration, check Warn me and use the corresponding fields.
32 | A GUIDE TO QUARKXPRESS SERVER 10.1
Using QuarkXPress Server
The xml namespace deconstructs a project according to the Modifier DTD. The
construct namespace lets the server turn an XML representation of a QuarkXPress
project back into an actual project. With these namespaces, you can deconstruct a
project into an XML representation, change the XML in accordance with the Modifier
DTD, and then have the server generate an updated version of the QuarkXPress project.
You can even create new QuarkXPress projects from scratch using XML.
In addition, you can use the construct namespace to:
USING QUARKXPRESS SERVER
• Create a page based on master page
• Create a project from XML, using a Job Jackets™ file as the basis for the project
• Modify text font and style, including OpenType® styles
• Apply style sheets and local formatting to text
• Create and populate tables
• Import pictures into picture boxes and specify picture attributes
The DTD used for XML construction and deconstruction is completely
Unicode®-compliant, making it ideal for use in international publishing. Furthermore,
the use of this DTD ensures that the schema of XML output created by Constructor
does not change when server preferences change. This DTD is provided in the
QuarkXPress Server application folder and fully documented in "Modifier schema
(annotated)."
Deconstructor XTensions software and the deconstruct namespace are no longer
supported.
Creating URL requests
You can use URL requests to make QuarkXPress Server render projects in a variety of
formats, to use the features of server XTensions modules, and to control the server.
The topics below provide an overview of how to construct server requests and use URL
parameters.
This chapter also lists functions that let you control the server. For detailed information
about constructing other types of URL requests, see "Using QuarkXPress Server."
A GUIDE TO QUARKXPRESS SERVER 10.1 | 33
USING QUARKXPRESS SERVER
Understanding URL requests
QuarkXPress Server URL requests should use the following format:
Some URL parameters require Boolean arguments. For such parameters, valid values
include 1 or 0, true or false, y or n, and yes or no.
You can also send requests to QuarkXPress Server using the HTTP GET and POST
protocols and using XML with XSLT. For more information about these approaches,
see "Using QuarkXPress Server."
Understanding QuarkXPress Server namespaces
QuarkXPress Server namespaces differentiate among types of requests that are otherwise
identical. For example, consider the following three URLs:
http://QXPServer:8080/project1.qxp
http://QXPServer:8080/pdf/project1.qxp
http://QXPServer:8080/postscript/project1.qxp
These requests are identical, except each uses a different namespace (in italic). (The
first request does not specify a namespace, but this simply means the project is to be
rendered using the server's default render type.)
Namespaces can be used to determine the format in which a rendered project is
returned, as indicated above, but they can also be used to direct a request to XTensions
software that performs other functions. For example, if you use Modifier XTensions
34 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
software's xml namespace, Modifier XTensions software can return an XML
representation of the project.
Looking up a namespace
This guide lists the namespaces for every QuarkXPress Server function. There is no
single list of namespaces because some functions do not require a particular namespace
or are available in multiple namespaces. To determine which namespace you want to
use:
In this Guide, go to the page that documents the render type you want to use. (For
1
more information, see "Understanding render types.")
Locate the Namespace row. If the render type or function has an associated namespace,
2
that namespace is listed here.
Third-party XTensions can add their own namespaces. For information about a
third-party namespace, see the documentation for the XTensions module that adds
that namespace.
Understanding QuarkXPress Server parameters
Parameters let you control the details of how a request is executed. For example, you
can use the page parameter to create a request that returns only the third page of a
project:
http://QXPServer:8080/jpeg/project1.qxp?page=3
You can include multiple parameters in the same request; simply separate them with
an ampersand (&). For example, here's a new version of the above URL that returns
Prior to QuarkXPress Server 9.0, you had to use different URL constructions when
sending requests to an instance of QuarkXPress Server Manager in a QPS installation
than you did when sending requests to a free-standing instance of QuarkXPress Server
Manager. In versions 9.0 and later, both can use /qxpsm/request/ after [port]/ .
You can now use both absolute and relative paths when you modify a project with
SDK objects or classes. Relative paths are almost always relative to the document pool.
If you use multiple QuarkXPress Server instances, you should use a common document
pool.
Interpreting the QXP Server Manager response
When QuarkXPress Server Manager successfully processes a request through the HTTP
interface, the response is the same as QuarkXPress Server's response unless the user
has supplied additional parameters to QuarkXPress Manager. For more information,
see "Working with QuarkXPress Server Manager" in A Guide to QuarkXPress Server.
If an error occurs, QuarkXPress Server Manager retries the request, either on the same
QuarkXPress server instance or a different one (depending on the error and global
settings established in the QuarkXPress Server Manager client). If QuarkXPress Server
A GUIDE TO QUARKXPRESS SERVER 10.1 | 37
USING QUARKXPRESS SERVER
Manager cannot process the request, it returns an XML response describing the error,
plus any header error codes returned by QuarkXPress Server. For example:
<?xml version="1.0" encoding="UTF-8" ?>
<error>
<httpresponsecode>500</httpresponsecode>
<xpressservererrorcode>-43</xpressservererrorcode>
<xpressservererrormessage>File not found.</xpressservererrormessage>
<xpressserverextendedmessage> <![CDATA[ Error #-43 - File not found. ]]>
</xpressserverextendedmessage>
<xpressservermanagererrorcode>M8000001</xpressservermanagererrorcode>
<xpressservermanagererrormessage>The server could not locate the specified
file.
</xpressservermanagererrormessage>
</error>
HTTP GET and POST Requests
The topics below describe how you can use HTML to interact with QuarkXPress Server.
QuarkXPress Server supports both the GET and POST HTML methods. When you use
the GET method, the browser encodes form data into a URL. When you use the POST
method, form data is passed within the message body. Use the GET method only when
the form processing is idempotent. In short: GET is for retrieving data, whereas POST
can involve storing or updating data, ordering a product, or sending an e-mail.
Using HTTP GET with QXP Server
Use HTML like the following to specify a server and port where you want to send a
request. You can specify the name of the target project, the output type, and a scaling
value. You can specify the name of a box and the path of a text or picture files to
import into that box, as long as the file's path is on the server's file system. You can
also use HTML like the following to specify the page number and layout number of
the project.
The form section of the HTML should begin with the following line of code:
<form id = form1 method="GET" enctype="application/x-www-form-urlencoded">
For both GET and POST, the browser constructs a form data set and encodes it according
to the ENCTYPE attribute (you can use multipart/form-data for POST and
application/x-www-form-urlencoded (the default) for both POST and GET).
To create fields that let the user specify the server IP address, the port, and the project
The form's method is POST. The user agent conducts an HTTP post transaction using
the value of the action attribute (the URL), and a message is created according to the
content type specified by the enctype attribute.
When you use a multipart HTTP post request, you can include in the request any files
which are required by the rendering process, including QuarkXPress templates, picture
files, modifier XML, and digital publishing assets. For more information, see "Using
the Streaming Document Provider."
Using HTTP POST with QXP Server Manager
HTTP POST with QuarkXPress Server Manager works the same way as HTTP POST with
QuarkXPress Server (see "Using HTTP POST with QXP Server"), except that with
QuarkXPress Server Manager, you must use UTF-8.
Getting started: Web services
The Web services interface is a collection of request classes. You can download the
SDK WSDL class definitions from
http://[server]:[port]/qxpsm/services/RequestService?wsdl (replace
[server] with the QuarkXPress Server Manager computer's IP address and [port]
with the QuarkXPress Server Manager port number.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 41
USING QUARKXPRESS SERVER
These classes can be chained together to form compound QuarkXPress Server requests.
The sample applications (see "Sample applications") show how to use these classes to
invoke a QuarkXPress Server command and manipulate the response.
For more information, see "Using the Web interface." In addition to the classes listed
there, the Web services interface includes the following:
•
RequestService processes QuarkXPress Server requests. This object's generic
processRequest() method takes a QRequestContext argument and returns a
QContentData object containing the response. For more information, see the sample
applications and "Using the Web interface."
•
QRequestContext is the argument you pass to RequestService's generic
processRequest() method.This object contains settings which must be set once per
request. Set all chained requests inside the request context.
•
QRequest is the base class for all request objects (such as PDFRenderRequest).
Consequently, all request objects share some common data members.
•
RequestParameters is a generic class for executing any request and for adding
dynamic properties to a request.
•
NameValueParam is a generic class for adding dynamic properties to a request. This
class is specifically for requests that take a box's name and/or ID as the parameter name
and the box's content as the value.
•
QContentData is the response returned when a request is executed. QContentData
is a hyperlink that follows the same pattern as the classes above.
•
QException is the exception class for QuarkXPress Server Manager. Web services
returns a QException object if an error occurs with any Web service method. You
can use try/catch blocks to handle QException objects.
If you've written a Server XTensions module, you can extend the XML interface to
include any changes it makes to the Modifier DTD by simply modifying an XML file
and regenerating the stubs.
To exclude empty tags in the request HTML, set the value of the appropriate variable
to null.
For Javadocs, WSDL schemas, and JSP samples, see the Welcome page that displays
when you launch QuarkXPress Server Manager.
The following topics describe the general Web services classes.
QRequestContext
Description
An argument passed to RequestService. Contains settings that must be set once per request.
All chained requests must be set inside the request context.
Web service data objectType
NameMembers
documentName
42 | A GUIDE TO QUARKXPRESS SERVER 10.1
DescriptionTypes
File or object name on which the command will be rendered.String
USING QUARKXPRESS SERVER
serverName
serverPort
userName
userPassword
maxRetries
requestTimeout
useCache
responseAsURL
bypassFileInfo
context
String
Integer
Boolean
Boolean
Boolean
Server name. Default is NULL. Load balancer searches for the
host itself in this case.
Port at which the desired server is listening.Integer
Server admin username.String
Server admin password.String
Max number of times to try executing the command before
returning failure.
Max time out in milliseconds.Integer
Indicates whether the cache should be checked for an existing
result or if the command should be executed again.
This value indicates whether the server should send the
response as-is (text or binary) or store the response on the server
and return its location as a URL. Because the object model works
on SOAP, which can be slow when transferring large binary
files, you might choose to set this value to "true" if you suspect
that the response is going to be several megabytes or larger.
Indicates whether file info should be fetched before executing
the command.
Context in which the command is being executed.String
//Create the service and call it QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Web service called to process the QuarkXPress Server request. RequestService has a generic
method named processRequest() that takes QRequestContext as an argument and returns
QContentData as the QuarkXPress Server response.
Web serviceType
processRequest
Processes the request context and returns the result.
QuarkXPress Server request is instances of request objects
chained together.
DescriptionTypeParameter
QRequestContextrequestCmd
Argument passed to
RequestService. Contains
settings that must be set once per
request. All chained requests are
set inside the request context.
createSession
Creates a new session and returns a session ID.
DescriptionTypeParameter
A GUIDE TO QUARKXPRESS SERVER 10.1 | 43
USING QUARKXPRESS SERVER
closeAlldocs
closeDoc
timeout
Closes all open documents in the session without saving them. If the
session does not exist, an error is returned. If an error occurs while closing
the document, it is logged and the document is marked closed in the
internal cache. No error is returned.
sessionId
Closes the specified document without saving it. If the session does not
exist, an error is returned. If the document is not open, and error is
returned. If the document is open in another session, an error is returned.
If an error occurs while closing the document, it is logged and the
document is marked closed in the internal cache. No error is returned.
Long
String
Timeout for the session in
milliseconds. If no call is executed
in that time, session is expired and
all the open documents in that
session are closed without saving.
If 0 is passed as value of timeout,
default timeout is used. If a
negative value is passed as
timeout, the session never expires.
DescriptionTypeParameter
Session whose documents are to
be closed.
DescriptionTypeParameter
closeSession
getOpenDocs
getOpenSessions
getPreferences
setPreferences
getXPressDOM
docName
sessionId
Closes the specified session. If the session does not exist, an error is
returned. If any documents are still open in the session, an error is returned.
sessionId
Gets all the open documents in the session. If the session does not exist,
an error is returned.
sessionId
Gets all open sessions.
Gets QuarkXPress Server preferences.
Sets QuarkXPress Server preferences.
Creates a DOM for the specified document.
String
String
Document to be closed.String
Session in which document was
opened.
DescriptionTypeParameter
Session to be closed.String
DescriptionTypeParameter
Session whose open documents are
sought.
newDoc
Creates a new document for modification and keeps it open until further
notice. The document is created with a single layout. To create a more
complex document, use the processRequestEx API. If a document with the
same name is already open, an error is returned. If the session does not
exist, an error is returned.
44 | A GUIDE TO QUARKXPRESS SERVER 10.1
DescriptionTypeParameter
USING QUARKXPRESS SERVER
docName
jobJacketName
jobTicketName
host
port
sessionId
String
String
String
Integer
String
Document to be opened for
modification. Provide the name
only. You can proivde a relative
path when you save the
document.
Name of the Job Jackets file to be
used. The Job Jackets file is
assumed to be already available on
the QuarkXPress server computer.
Name of the Job Ticket to be used.String
The QuarkXPress Server instance
that should be used for this
document modification. If null,
this value is supplied by the load
balancer. If the indicated server is
not an active registered server, an
error is thrown.
The port for the server specified in
the host parameter.
Session in which the document
should be opened.
openDoc
processRequestEx
Opens the specified document and keeps it open until further notice. If
the document is already open, an error is returned. If the session does not
exist, an error is returned.
DescriptionTypeParameter
docName
host
port
sessionId
Executes the request context. If a session ID is specified, the document is
kept open after the request is executed. If no session ID is specified, the
request is executed normally without keeping the document open. If the
document is open in another session, an error is returned. If the document
is marked dirty, an error is returned (a document is marked dirty when the
server that opened the document has become inactive; in such a case, the
document must be closed and opened again).
String
String
Integer
String
Document (along with relative
path if required) to be opened for
modification.
QuarkXPress Server instance which
should be used for this document
modification. If null, this value is
supplied by the load balancer. If
the indicated server is not an
active registered server, an error is
thrown.
The port for the server specified in
the host parameter.
Session in which the document
should be opened.
DescriptionTypeParameter
QRequestContextreqContextObj
Request to be executed.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 45
USING QUARKXPRESS SERVER
saveAllDocs
sessionId
Saves all open documents in the session. The documents are saved one by
one. If error occurs while saving a document, an error is returned
immediately and the rest of the documents remain unsaved. If a document
is marked dirty, an error is returned (a document is marked dirty when the
server that opened the document has become inactive; in such a case, the
document must be closed and opened again).
relativePath
String
String
Session in which the request
should be executed. This value
may be null. If a session ID is
provided, the document is kept
open. If no session ID is provided,
the request is executed normally,
as if processRequest had been
called.
DescriptionTypeParameter
Relative path where open
documents should be saved. If this
value is provided, copies of open
documents with changes made so
far are saved in the new location.
The open documents are not saved
but have all of the changes made
so far.
saveDoc
sessionId
Saves the open document. If a document is marked dirty, an error is
returned (a document is marked dirty when the server that opened the
document has become inactive; in such a case, the document must be
closed and opened again).
docName
newName
relativePath
String
String
String
String
Session in which the document
exists.
DescriptionTypeParameter
Document to be saved. Must be
the same name that was used
when opening or creating the
document.
New name of the document. If
null, the document is saved with
the old name.
Relative path where the document
should be saved. The relative path
can also contain the new name of
the document. If this is provided,
a copy of the open document with
changes made so far is saved in the
new location. The open document
is not saved but has all of the
changes made so far.
sessionId
getXPressDOMEx
getXMLFromXPressDOM
Lets you create a DOM of a particular layout or portion of a layout.
JPEGRenderRequest jpegRequest = new JPEGRenderRequest();
rc.request = jpegRequest;
RequestService svc = new RequestService();
QContextData response = svc.processRequest(rc);
Takes a raw XML representation of a project as a string and returns an
object model representing that project, with Project as the root class.
QRequest
Base class for all request objects (such as PDFRenderRequest). All request objects share some
common data members, which are described below.
Web service data objectType
NameMembers
QRequestrequest
DescriptionTypes
QuarkXPress Server request that includes instances of request
objects chained together.
RequestParameters
Additional
comments
Example, object
model
NameValueParam
Generic class for executing any request and for adding dynamic properties to a request.Description
Web service data objectType
NameMembers
requestNamespace
You can use this class to send any request for which a specific class does not exist. When this
request exists in the chain, its namespace is concatenated with the namespaces of other
requests. That means the namespace provided here can be null.
The parameters of this class can be used to parameterize a request being sent to the server.
QRequestContext rc = new QRequestContext();
RequestParameters request = new RequestParameters();
request.setRequestNamespace("jpeg");
rc.setRequest = request;
NameValueParam p1 = new NameValueParam();
p1.setParamName = "jpegquality";
p1.setTextValue = "4";
request.setParams(new NameValueParam[]{p1});
String
NameValueParam[]params
DescriptionType
Namespace of the request (for example,
jpeg).
Parameter array for the specified request (for
example, jpegquality).
Description
Generic class for adding dynamic properties to a request. This class is specifically for requests that
take a box name/id as the parameter name and the box content as the parameter value.
Web service data objectType
NameMembers
DescriptionType
A GUIDE TO QUARKXPRESS SERVER 10.1 | 47
USING QUARKXPRESS SERVER
paramName
textValue
streamValue
contentType
QContentData
A response to a Web Services call to QuarkXPress Server.Description
Web service data objectType
NameMembers
contentType
textData
responseURL
String
String
byte[]
Name of the parameter. In most cases this will be the name/ID
of the box.
Text value of the box. (You can set either textValue or
streamValue.)
Stream value of the box. (You can set either textValue or
streamValue.)
The MIME content type of the parameter.String
DescriptionTypes
String
String
String
The type of the response. For example, "text/xml" or
"text/plain."
If the response type is text, this contains the text.
Otherwise, this value is null.
If the responseAsURL parameter was set to "true" in
the request, this contains the URL of the response.
Otherwise, this value is null.
Example, object
model
QException
streamValue
encodingType
actualServerPortUsed
actualServerUsed
headers
multipartResponse
QRequestContext context = new QRequestContext();
context.setDocumentName("sample.qxp");
context.setResponseAsURL(true);
JPEGRenderRequest request = new JPEGRenderRequest();
request.setJPEGQuality("4");
context.setRequest(request);
RequestService requestService = new RequestServiceStub();
QContentData response = requestService.processRequest(context);
System.out.println(response.getResponseURL());
binary
String
String
String
If the response type is binary, this contains the byte
array. Otherwise, this value is null.
If the response type is text, this value indicates the
encoding of the text (for example, UTF-8 or ANSI).
Identifies the server port.String
Identifies the server.String
If the response returned by the server is a set of
headers, this array contains the header response.
If the response returned by the server is multipart, this
array contains the multipart response parts.
Exception class for QuarkXPress Manager.Description
Type
Exception
NameMembers
48 | A GUIDE TO QUARKXPRESS SERVER 10.1
DescriptionTypes
USING QUARKXPRESS SERVER
Example,
object model
QXP Server Manager
httpResponseCode
managerErrorCode
managerErrorMessage
serverErrorCode
serverErrorMessage
serverExtendedMessage
String docName = "notexisting.qxp";
try {
QRequestContext ctx = getRequestContext(docName);
QRequest request = getJPEGRequest();
ctx.setRequest(ctx);
QContentData response = getService().processRequest(ctx);
System.out.println(response.getResponseURL());
} catch (QException ex) {
// QuarkXPress Manager threw an QException and it is not
// a runtime exception. QException object will be returned.
System.out.println(ex.getServerErrorCode());
}
String
HTTP response code.String
QuarkXPress Server Manager error code.String
QuarkXPress Server Manager localized error
message.
QuarkXPress Server error code.String
QuarkXPress Server response message.String
QuarkXPress Server extended error message.String
The following topics are for people who want to enhance QuarkXPress Server Manager
or integrate it with other software.
Please refer to http://localhost:8090/qxpsmdocs/apidocs/index.html for
manager API documentation. (Note that the port number used to retrieve the API
documentation is 8090 by default, but you should use whatever port number you
specified when installing QuarkXPress Server Manager.)
QuarkXPress Server Manager was developed using interface-based programming and
uses the Spring Framework to instantiate pluggable objects. When QuarkXPress Server
Manager starts up, it reads the contents of a Spring context definition file named
"ManagerContainerConfig.xml" and instantiates all of the beans listed in the file.
QuarkXPress Server Manager then initializes by reading various configuration options
from a file named "ManagerConfig.xml."
You can deploy QuarkXPress Server Manager in its own Tomcat container, in an
external Tomcat container, or in a shared Spring context. For more information, see
"Deploying QuarkXPress Server Manager" in the QuarkXPress Server ReadMe.
Using the Web interface
The topics below describe the features available via the QuarkXPress Server Web
interface. The topics covered here include the following:
• Render types are namespaces you can use to return a QuarkXPress project in a specified
file format.
• Render modifiers let you control which parts of a project are rendered and set the scale
of the returned renderings.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 49
USING QUARKXPRESS SERVER
• Content modifiers let you alter the content and formatting of boxes in layouts without
using the XML modify parameter.
• XML modify lets you modify QuarkXPress projects using XML.
•
The xml namespace deconstructs a project according to the Modifier DTD. The
construct namespace lets you turn an XML representation of a QuarkXPress project
back into a QuarkXPress project.
• Administrative request handlers let you change the behavior of QuarkXPress Server.
QuarkXPress Server uses case-sensitive XML.
Understanding rendering
Rendering is the process in which QuarkXPress Server opens a QuarkXPress project,
transforms it into a different format (the render type), and then sends a response to the
requestor. Depending on the type of rendering operation, the response may be a
message or a rendered file.
Alerts
For information on how to submit a render request, see "Getting started: HTTP and
HTTPS."
HTTP Error #500Cannot open this
document type.
Please select a
QuarkXPress
document or
template.
read or write to
disk.
required volume or
folder.
This alert displays if you try to render a file that is not a QuarkXPress
project.
HTTP Error #404File not found
QuarkXPress Server Error #–43
This alert displays if you try to render a project that does not exist.
HTTP Error #500I/O error trying to
QuarkXPress Server Error #–36
This alert displays if QuarkXPress Server is running on Windows and a
shared network folder was selected as the document pool, but the folder
is no longer shared.
What to do: In the QuarkXPress Server administration interface, choose
Administration > Preferences > General and set Document Root Folder
to a shared folder.
HTTP Error #404Cannot find
QuarkXPress Server Error #–35
This alert displays if QuarkXPress Server is running on Mac OS and a
shared network volume was selected as the document pool, but the
volume is no longer shared.
What to do: In the QuarkXPress Server administration interface, choose
Administration > Preferences > General and set Document Root Folder
to a shared folder.
See Understanding loggingLogs
50 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
Example, GET
URL
Understanding logging
http://localhost:8080/sample.qxp
There are two ways to specify a render format:Notes
1. Enter the render type directly in the browser address
field:http://localhost:8080/pdf/project.qxp.
2. In the QuarkXPress Server administration interface, choose Administration > Preferences> General and choose the default render type from the Default Renderer Type drop-down
menu.
If a request succeeds, a transaction success message is written to the QuarkXPress Server
transaction log file. This message includes the transaction ID, date, time, request type,
project name, response type, response size in bytes, and client IP address. For example:
- Cannot open this document type. Please select a QuarkXPress document or
template.
appstudio
ave
The "QuarkXPress Server Log.log" file also contains system-level log information. For
example, if a request makes a renderer stop working, you can figure out which request
it was using the transaction ID and the transaction log.
09/03/2011 014:00:07 ERROR
[com.quark.qxps.core.server.ServerRendererMonitor][pool-1-thread-1] - The
QuarkXPress Server Renderer with processId 2620 had quit while processing
the transaction 87212dae-6ba3-4b3f-97bb-ea8f0c255bf9.
To download all logs to a non-server computer, click Show Transaction Log in the
QuarkXPress Server Web interface, then click Download Logs on the upper right.
Understanding render types
Render types are namespaces you can use to return a QuarkXPress project in a specified
file format. The topics covered here include the following:
Returns a .zip file containing an App Studio
article rendered from the App Studio
layout(s) in the source project.
Returns a .zip file containing an AVE issue
file and its corresponding manifest.
QuarkXPress Server Manager object model classesDescriptionFunction
AppStudioRenderRequest
AVERenderRequest
Returns an EPS file.eps
Returns an ePUB file.epub
Returns a JPEG image.jpeg
Returns a PDF file.pdf
EPSRenderRequest
EPubRenderRequest
JPEGRenderRequest
PDFRenderRequest
A GUIDE TO QUARKXPRESS SERVER 10.1 | 51
USING QUARKXPRESS SERVER
QuarkXPress Server Manager object model classesDescriptionFunction
raw
Returns a PNG image.png
Returns a PostScript file.postscript
Returns a QuarkCopyDesk article.qcddoc
Returns a QuarkXPress project file.qxpdoc
Returns an RLE Raw Custom format image.qxpr
Returns a project in a QuarkXPress internal
format.
Returns a low-resolution PDF file.screenpdf
Returns a SWF file.swf
PNGRenderRequest
PostScriptRenderRequest
CopyDeskDocRequest
QuarkXPressRenderRequest
RLERawCustomRenderRequest
RawCustomRenderRequest
ScreenPDFRenderRequest
SWFRenderRequest
The default render type is JPEG.
Developers can implement additional rendering formats through server XTensions
software.
appstudio
The appstudio render type returns a .zip file containing an App Studio article rendered
from the App Studio layout(s) in the source project. It also includes mechanisms for
uploading an article to the App Studio Publishing Portal, retrieving and updating server
settings, and presenting and clearing App Studio Publishing Portal credentials.
Namespace
Parameters
appstudio
upload
html
setcredential
clearcredential
String
String
String
String
Lets you generate an HTML5
article and upload it to the App
Studio Publishing Portal. For
example:
Lets you log out of the App Studio
Publishing Portal. For example:
http://localhost:8080/
appstudio/clearcredential
52 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
Render modifier
parameters
Alerts
config
layout
page
pages
A .zip file containing an HTML5 article.Response
no way of rendering the desired
objects.
Please select a QuarkXPress document
or template.
See Understanding loggingLogs
String
String
range)
HTTP Error #406The renderer for this image type has
This alert displays if you submit a render request
with the box parameter.
HTTP Error #10120Cannot open this document type.
This alert displays if you submit an appstudio
request for a QuarkCopyDesk article.
Lets you retrieve the current
publication hierarchy from the
App Studio Publishing Portal. For
example:
http://qxpserver:port/
appstudio/config
Lets you specify a layout by name
or ID. The first layout is Layout 1.
Lets you specify a page.Integer
Lets you specify a range of pages.String (page
Example, GET URL
Example, object
model
ave
The ave render type returns a .zip file containing an AVE issue file and its corresponding
manifest.
http://localhost:8080/appstudio/sample.qxp
Request object name: AppStudioRenderRequest
// STEP 1: Create the QuarkXPress Server Request
// Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
// STEP 2 (SPECIFIC TO REQUESTS):
// Create the App Studio renderer
// request and embed it in the request context.
AppstudioRenderRequest req = new AppstudioRenderRequest();
req.setAppStudioData(request.getParameter("AppStudioData"));
requestCtx.setRequest(req);
// STEP 3: Create the service and call the
// processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data = service.processRequest(requestCtx);
Namespace
Parameters
AVE
outputstyle
stylename
Lets you specify an output style.
To use a named output style, use
the name of that output style. For
example:
//STEP1: Create the QuarkXPress Server Request
//Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
//STEP 2(SPECIFIC TO REQUESTS):
//Create the AVE renderer
//request and embed it in the request context.
AVERenderRequest avereq = new AVERenderRequest();
avereq.setAVEData(request.getParameter("AVEData"));
avereq.setFormat(request.getParameter(
"Format"));
avereq.setLayout(request.getParameter(
"Layout"));
requestCtx.setRequest(avereq);
This alert displays if you submit an ave request
with format=avedoc for an App Studio layout.
54 | A GUIDE TO QUARKXPRESS SERVER 10.1
//STEP3: Create the service and call the
//processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
The default AVE output style is used.Notes
eps
The eps render type returns an EPS rendering of a page or spread.
USING QUARKXPRESS SERVER
Namespace
Parameters
EPS
outputstyle
epsformat
epspreview
epsdata
epstransparent
stylename
color
tiff | none
ascii | binary |
clean8bit
1 | 0 | true |
false | yes | no
Lets you specify an output style.
To use a named output style, use
the name of that output style. For
example:
HTTP Error #406The renderer for this image type has
This alert displays if you submit a render request
with the pages or box parameter.
This alert displays if you specify a nonexistent
output style.
This alert displays if you specify an output style
that is incompatible with this render type.
Lets you specify a layout by name
or ID. The first layout is Layout 1.
Lets you specify whether to
download all fonts used in the
layout and all system fonts.
Lets you specify whether to
download all fonts required by
imported PDF and EPS files.
Example, object
model
Notes
Request object name: EPSRenderRequest
//STEP1: Create the QuarkXPress Server Request
//Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
//STEP 2(SPECIFIC TO REQUESTS):
//Create the EPS renderer
//request and embed it in the request context.
EPSRenderRequest epsreq = new EPSRenderRequest();
epsreq.setEPSData(request.getParameter("EPSData"));
epsreq.setEPSFormat(request.getParameter(
"EPSFormat"));
epsreq.setEPSPreview(request.getParameter(
"EPSPreview"));
requestCtx.setRequest(epsreq);
//STEP3: Create the service and call the
//processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
You can specify an output style and set additional local parameters of that output style.
For example, if no bleed setting is specified in the output style named "mystylename", you
can specify a bleed setting with a URL like the following:
You can override settings in an output style. For example, if an asymmetric bleed is specified
in the output style named "mystylename," you could override it with the same URL.
56 | A GUIDE TO QUARKXPRESS SERVER 10.1
If you do not specify an EPS output style, the default EPS output style is used.
epub
The epub render type returns an ePUB rendering of a layout.
//STEP1: Create the QuarkXPress Server Request
//Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
String
String
HTTP Error #406The renderer for this image type has
This alert displays if you submit a render request
with the pages or box parameter.
HTTP Error #10543ePub not created. There is no reflow
This error appears if there is no reflow layout.
Lets you specify a layout by name
or ID. The first layout is Layout 1.
Lets you specify an ePUB output
style by name or ID.
Namespace
Parameters
//STEP 2(SPECIFIC TO REQUESTS):
//Create the ePUB renderer
//request and embed it in the request context.
EPubRenderRequest epubreq = new EPubRenderRequest();
epubreq.setEPubData(request.getParameter("EPubData"));
epubreq.setCreateTOC(request.getParameter(
"CreateTOC"));
epubreq.setLayout(request.getParameter(
"Layout"));
requestCtx.setRequest(epubreq);
//STEP3: Create the service and call the
//processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
You can only create an ePUB file from a project that includes a reflow article.Notes
jpeg
The jpeg render type returns a JPEG rendering of a page or spread.
JPEG
jpegquality
1 | 2 | 3 | 4
Lets you specify the image quality of a rendered JPEG
image. The valid values are: 1 (highest quality), 2 (high
A GUIDE TO QUARKXPRESS SERVER 10.1 | 57
USING QUARKXPRESS SERVER
quality), 3 (medium quality), and 4 (lowest quality). The
default value is 1.
Render
modifier
parameters
upadateimage
updateflow
pasteboard
showboxoutline
boxes
page
scale
box
spread
true | false
true | false
true | false
Float .1 to 6.92 for
Windows .1 to 8
on Mac OS)
Integer
Lets you specify whether to update imported pictures.true | false
Lets you specify whether to update the text flow version
of a project to the current version.
Lets you specify whether to display pasteboard items.
Works only with spread parameter. The default value
is true. For example:
// STEP1: Create the QuarkXPress Server Request
// Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
// STEP2: Create the JPEG renderer request and attach it
// to the request context.
JPEGRenderRequest jpreq = new JPEGRenderRequest();
jpreq.setJPEGQuality(request.getParameter("jpegQuality"));
jpreq.setLayout(request.getParameter("Layout"));
requestCtx.setRequest(jpreq);
// STEP3: Create the service and
// call the processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
String
Lets you specify a layout by name or ID. The first layout
is Layout 1.
58 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
kindle
The kindle render type returns a rendering of a layout that can be viewed on Amazon
//STEP1: Create the QuarkXPress Server Request
//Context and set the necessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
String
String
HTTP Error #406The renderer for this image type has
This alert displays if you submit a render request
with the pages or box parameter.
HTTP Error #10543Kindle not created. There is no reflow
This error appears if there is no reflow layout.
Lets you specify a layout by name
or ID. The first layout is Layout 1.
Lets you specify a Kindle output
style by name or ID.
Namespace
//STEP 2(SPECIFIC TO REQUESTS):
//Create the Kindle renderer
//request and embed it in the request context.
KindleRenderRequest kindlereq = new KindleRenderRequest();
kindlereq.setKindleData(request.getParameter("KindleData"));
kindlereq.setCreateTOC(request.getParameter(
"CreateTOC"));
kindlereq.setLayout(request.getParameter(
"Layout"));
requestCtx.setRequest(kindlereq);
//STEP3: Create the service and call the
//processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
You can only create a Kindle file from a project that includes a reflow article.Notes
literal
The literal render type returns the contents of a file without any attempt to process
it as a template. Depending on the file's MIME type, the requested project can be
displayed within the browser (for example, if the response is a JPEG file) or saved to
disk (for example, if the response is a Microsoft Word document).
literal
A GUIDE TO QUARKXPRESS SERVER 10.1 | 59
USING QUARKXPRESS SERVER
The requested file returned in the HTTP response.Response
Alerts
Example, GET
URL
Example, object
model
pdf
Incorrect
administration
realm username
and password.
See Understanding loggingLogs
http://localhost:8080/literal/Story.doc
Request object name: LiteralRequest
com.quark.qxpsm.QRequestContext rc =
new com.quark.qxpsm.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals(""))
rc.documentName = this.DocumentSettings1.documentName.Text;
rc.request = new LiteralRequest();
//Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
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 Authentication
pane of the General Preferences dialog box (Administration > Preferences> General) in the QuarkXPress Server Web interface.
The pdf render type returns a PDF rendering of a project.
Namespace
Parameters
PDF
outputstyle
title
subject
author
keywords
includehyperlinks
exportlistsashyperlinks
stylename,
document
1 | 0 | true |
false | yes | no
1 | 0 | true |
false | yes | no
Lets you specify an output style. To use a
named output style, use the name of that
output style. For example:
Lets you specify the subject of the PDF file.String
Lets you specify the author of the PDF file.String
Lets you specify keywords for the PDF file.String
Lets you specify whether to include hyperlinks
in the PDF file.
Lets you specify whether to export lists as
hyperlinks. To use this parameter, you must set
includehyperlinks to true.
exportindexesashyperlinks
60 | A GUIDE TO QUARKXPRESS SERVER 10.1
1 | 0 | true |
false | yes | no
Lets you specify whether to export the index
as hyperlinks. To use this parameter, you must
set includehyperlinks to true.
USING QUARKXPRESS SERVER
exportlistsasbookmarks
mode
printcolors
plates
produceblankpages
useopi
images
1 | 0 | true |
false | yes | no
composite or
separations
cmyk, rgb,
grayscale,
cmykandspot,
asis
inripseps
1 | 0 | true |
false | yes | no
false | yes | no
includeimages,
omittiff,
omittiffandeps
Lets you specify whether to export lists as
bookmarks. To use this parameter, you must
set includehyperlinks to true.
Lets you specify whether the PDF file is a
composite or includes separations.
Lets you specify the color space of the PDF file.
This option is available only when mode is set
to composite.
Lets you specify a separation method. This
option is available only when mode is set to
separations.
Lets you specify whether to include blank
pages. This option is available only when mode
is set to composite.
Lets you specify whether to use OPI.1 | 0 | true |
Lets you specify whether to include TIFF and
EPS images from an OPI server.
registration
offset
bleed
offsetbleed
spreads
lowresolution
colorimagedownsample
grayscaleimagedownsample
monochromeimagedownsample
colorcompression
off, centered,
offcenter
points)
symmetric
0–6 (in
inches)
false | yes | no
false | yes | no
9–2400
9–2400
true | false
Lets you include, omit, and configure
registration marks.
Lets you specify the offset of registration marks.0–30 (in
Lets you specify a bleed type.pageitemsonly,
Lets you specify a bleed offset to use. This
option is available only when bleed is set to
symmetric.
Lets you specify whether to output spreads.1 | 0 | true |
Lets you request a low-resolution (36 dpi) PDF.1 | 0 | true |
Lets you specify the resolution of color images.9–2400
Lets you specify the resolution of grayscale
images.
Lets you specify the resolution of monochrome
images.
Lets you specify whether medium-quality
manual JPEG compression should be applied
to color images.
grayscalecompression
monochromecompression
true | false
true | false
Lets you specify whether medium-quality
manual JPEG compression should be applied
to grayscale images.
Lets you specify whether ZIP compression
should be applied to monochrome images.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 61
USING QUARKXPRESS SERVER
pdffile
psfile
thumbnail
mode
fontdownload
layers
verification
separate
produceblankplates
String
String
separations
yes | no
String
yes | no
yes | no
Lets you specify the PDF name. This option is
available only when PDF to Folder is selected
in QuarkXPress Server PDF preferences.
Lets you specify the PostScript file name. This
option is available only when PostScript forlater Distilling is selected in
QuarkXPress Server PDF preferences.
Lets you embed a thumbnail in the PDF file.bw | color
Lets you specify the PDF file's color mode.composite |
Lets you turn font download on or off. You
cannot specify which fonts are downloaded.
Lets you specify which layers should be
included, as a comma-separated list.
Lets you use PDF/X–1a or PDF/X–3 verification.pdfx1a | pdfx3
Lets you specify whether to output each page
as a separate file.
Lets you specify whether to include blank
plates.
download
layoutstart
layoutend
1 | 0 | true |
false
1 | 0 | true |
false | yes | no
Integer
When download is true, the browser always
displays a dialog box that lets the end user save
the returned file, even if the browser can
display it.
When download is false, the browser attempts
to display the returned file. If the browser
cannot display the file, it lets the end user save
the returned file.
The default value is false.
Lets you specify the number of the first layout
to render when you render multiple layouts as
separate PDF files. PDF files are saved at the
location specified in QuarkXPress Server
preferences (Administration > Preference >General > Server > Document Root Folder).
The first layout in a project is layout 0. For
example:
Lets you specify the number of the last layout
to render when you render multiple layouts as
separate PDF files. PDF files are saved at the
location specified in QuarkXPress Server
preferences (Administration > Preference >General > Server > Document Root Folder).
The first layout in a project is layout 0. For
example:
// STEP1: Create the QuarkXPress Server Request Context
// and set the nescessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
// STEP 2(SPECIFIC TO REQUESTS):
// Create the PDF renderer request
// and embed it in the request context.
PDFRenderRequest pdfreq = new PDFRenderRequest();
pdfreq.setAuthor(request.getParameter("Author"));
pdfreq.setTitle(request.getParameter("Title"));
pdfreq.setLayout(request.getParameter("Layout"));
pdfreq.setSpread(request.getParameter("Spread"));
pdfreq.setPage(request.getParameter("mPage"));
pdfreq.setPages(request.getParameter("Pages"));
This alert displays if you specify an output style that is
incompatible with this render type.
// STEP3: Create the service and
// call the processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
For more information about the object model, see the samples.
Notes
There are three ways to generate PDF files with QuarkXPress Server. You can generate a PDF file
in QuarkXPress Server and return it to the end user, generate the PDF in QuarkXPress server
and save it to a folder on the server computer, or generate a PostScript file for later distilling
and save it to a folder on the server computer. To choose one of these output methods in
QuarkXPress Server, choose Administration > Preferences > Renderer > PDF) and then click
DirectPDF, PDFtoFolder, or PS4D (PostScript for Later Distilling). If you choose either of the
last two options, click Browse and navigate to the target folder, then choose an option from
the Default Name drop-down menu.
You can specify an output style and set additional local parameters of that output style. For
example, if no bleed setting is specified in the output style named "mystylename", you can
specify a bleed setting with a URL like the following:
You can override settings in an output style. For example, if an asymmetric bleed is specified
in the output style named "mystylename," you could override it with the same URL.
If you do not specify a PDF output style, the default PDF output style is used. The default PD
output style is Screen - Low Quality/Low Resolution.
You can still obtain a high resolution PDF by specifying the output style. Output style names
are case-sensitive and should be precise.
The following will return a list of output styles from the server:
http://<server><port>/getserverinfo
<OUTPUTSTYLES>
<OUTPUTSTYLE TYPE = "PDF">Default PDF Output Style</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">Press - High Quality/High
Resolution</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">Print - Medium Quality/Medium
Resolution</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">Screen - Medium Quality/Low
Resolution</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">Screen - Low Quality/Low Resolution</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">PDF/X-3:2002</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">PDF/X-1a:2001</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "Print">Default Print Output Style</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "EPS">Default EPS Output Style</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "ePub">Default ePub Output Style</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "Kindle">Default Kindle Output Style</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "PDF">Default PDF For AVE</OUTPUTSTYLE>
<OUTPUTSTYLE TYPE = "AVE">Default AVE Output Style</OUTPUTSTYLE>
</OUTPUTSTYLES >
png
The png render type returns a PNG rendering of a page or spread.
Namespace
Parameters
PNG
pngcompression
1 | 2 | 3 | 4
64 | A GUIDE TO QUARKXPRESS SERVER 10.1
Lets you specify the compression of a PNG response. The
valid values are: 1 (lowest compression), 2 (medium
compression), 3 (high compression), and 4 (highest
compression). The default value is 1.
USING QUARKXPRESS SERVER
Render modifier
parameters
transparentpng
upadateimage
updateflow
boxes
page
scale
box
spread
layout
A PNG file.Response
true | false
true | false
Float .1 to
6.92 for
Windows .1
to 8 on
Mac OS
Integer
String
Lets you specify whether to generate a PNG file that uses
transparency.
Lets you specify whether to update imported pictures.true | false
Lets you specify whether to update the text flow version of
a project to the current version.
Lets you request multiple boxes.String
Lets you specify a single page.Integer
Lets you specify a scaling percentage. The valid values are
from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on
Windows.
Lets you request a single box.String
Lets you specify a spread. The first spread is spread 1. In a
facing-page document, spread 1 consists of the first page.
Lets you specify a layout by name or ID. The first layout is
Layout 1.
// STEP1: Create the QuarkXPress Server Request
// Context and set the nescessary properties
com.quark.qxpsm.QRequestContext rc =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
rc.setDocumentName(docName);
// STEP 2(SPECIFIC TO REQUESTS):Create the PNG renderer
// request and embed it in the request context.
PNGRenderRequest pngreq = new PNGRenderRequest();
pngreq.setPNGCompression(request.getParameter(
"PNGCompression"));
pngreq.setLayout(request.getParameter("Layout"));
pngreq.setSpread(request.getParameter("Spread"));
pngreq.setPage(request.getParameter("mPage"));
rc.setRequest(pngreq);
// STEP3: Create the service and
// call the processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data = service.processRequest(rc);
Namespace
Parameters
postscript
The postscript render type returns a PostScript rendering of a project.
PostScript
prntbleed
clip<Boolean>,
Lets you specify bleed values for a page.Page | asym,
To use settings that have been captured with the Capture
Settings in the QuarkXPress Print dialog box, use
document. For example:
http://localhost:8080/
postscript/
sample.qxp?outputstyle=document
Render modifier
parameters
Alerts
updateimage
updateflow
page
pages
spread
layout
A PostScript file.Response
invalid.
The document
requested
Lets you specify whether to update imported pictures.true | false
true | false
range)
Integer
String
HTTP Error #500This page range is
QuarkXPress Server Error #147
This alert displays if you try to render an invalid page range.
HTTP Error #500No file produced.
This alert displays if you try to render a a project that contains only blank
pages.
Lets you specify whether to update the text flow version
of a project to the current version.
Lets you specify a single page.Integer
Lets you specify a range of pages.String (page
Lets you specify a spread. The first spread is spread 1. In
a facing-page document, spread 1 consists of the first
page.
Lets you specify a layout by name or ID. The first layout
is Layout 1.
66 | A GUIDE TO QUARKXPRESS SERVER 10.1
contains only
blank pages.
mapped to file
not found
does not exist.
USING QUARKXPRESS SERVER
HTTP Error #500PostScript printer
This alert displays if the PostScript printer or driver is not set to Print toFile.
This alert displays if you specify a nonexistent output style.This Output Style
Example, GET
URL
Example, object
model
This Output Style
cannot be used
with this render
type.
See Understanding loggingLogs
http://localhost:8080/postscript/Sample.qxp
Request object name: PostScriptRenderRequest
// STEP1: Create the QuarkXPress Server Request
// Context and set the nescessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
// STEP 2(SPECIFIC TO REQUESTS):
// Create the Post Script renderer
// request and embed it in the request context.
PostScriptRenderRequest pscreq =
new PostScriptRenderRequest();
pscreq.setPrintBleed(request.getParameter("PrintBleed"));
pscreq.setPrintPPD(request.getParameter("PrintPPD"));
pscreq.setPages(request.getParameter("Pages"));
requestCtx.setRequest(pscreq);
This alert displays if you specify an output style that is incompatible with
this render type.
Namespace
// STEP3: Create the service and call the
// processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
To create a PostScript file, you must have a PostScript driver on the server computer.Notes
You can specify an output style and set additional local parameters of that output style. For
example, if no bleed setting is specified in the output style named "mystylename", you can
specify a bleed setting with a URL like the following:
You can override settings in an output style. For example, if an asymmetric bleed is specified
in the output style named "mystylename," you could override it with the same URL.
If you do not specify a PostScript-compatible output style, the default PostScript-compatible
output style is used.
qcddoc
The qcddoc render type returns a QuarkCopyDesk article.
qcddoc
A GUIDE TO QUARKXPRESS SERVER 10.1 | 67
USING QUARKXPRESS SERVER
Parameters
article
component
format
saveastemplate
String
String
lightweight |
fullfeatured
true | false
Lets you specify which article in a project to render.
For example:
Lets you modify the article with XML. For more
information, see "Using XML modify."
The article/component
name is not unique.
See Understanding loggingLogs
68 | A GUIDE TO QUARKXPRESS SERVER 10.1
This alert displays if you create or change the name of an article or
component so that it is the same as the name of an existing article
or component.
USING QUARKXPRESS SERVER
Example, GET
URL
Example, object
model
qxpdoc
Namespace
Parameters
http://localhost:8080/qcddoc/copydesk/sample.qcd
Request object name: CopyDeskDocRequest
The qxpdoc render type returns a QuarkXPress project.
qxpdoc
qxpdocver
upadateimage
saveastemplate
8 | 9
true | false
true | false
Indicates the QuarkXPress version format to use. For example:
Lets you specify whether to return modified pictures in the
response or not. If set to false, modified pictures are not
returned. If set to true, modified pictures are returned. The
default value is true.
Lets you save a copy of a project as a template. The default
value is true. For example:
this image type
has no way of
rendering the
desired objects.
QuarkXPress
Project down to
an earlier version.
See Understanding loggingLogs
http://localhost:8080/qxpdoc/sample.qxp
Request object name: QuarkXPressRenderRequest
// STEP1: Create the QuarkXPress Server Request
// Context and set the nescessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
String
HTTP Error #500QuarkXPress
This alert displays if Disable QXD Return is checked in the
QuarkXPress Server administration interface (Administration > Preferences> General > Server).
HTTP Error #406The renderer for
This alert displays if you submit a qxpdoc render request with the page,
pages, box, or spread parameter.
HTTP Error #500Cannot save a
This alert displays if you attempt to save a QuarkXPress 6.x project to an
earlier version of QuarkXPress with the qxpdocver parameter.
Lets you specify a layout by name or ID. The first layout is
Layout 1.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 69
USING QUARKXPRESS SERVER
requestCtx.setDocumentName(docName);
// STEP 2(SPECIFIC TO REQUESTS):Create the QuarkXPress
// renderer request and embed it in the request context.
QuarkXPressRenderRequest qxpreq = new
QuarkXPressRenderRequest();
qxpreq.setDocumentVersion(request.getParameter(
"XpressDocVersion"));
qxpreq.setLayout(request.getParameter("Layout"));
requestCtx.setRequest(qxpreq);
// STEP3: Create the service and
call the processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
screenpdf
The screenpdf render type returns a low-resolution PDF rendering of a project. This
render type overrides the PDF Workflow setting in the QuarkXPress Server
Lets you specify the subject of the PDF file.String
Lets you specify the author of the PDF file.String
Lets you specify keywords of the PDF file.String
Lets you specify whether to include hyperlinks
in the PDF file.
Lets you specify whether to export lists as
hyperlinks. To use this parameter, you must set
includehyperlinks to true.
exportindexesashyperlinks
exportlistsasbookmarks
mode
70 | A GUIDE TO QUARKXPRESS SERVER 10.1
1 | 0 | true | false |
yes | no
1 | 0 | true | false |
yes | no
composite or
separations
Lets you specify whether to export the index as
hyperlinks. To use this parameter, you must set
includehyperlinks to true.
Lets you specify whether to export lists as
bookmarks. To use this parameter, you must
set includehyperlinks to true.
Lets you specify whether the PDF file is a
composite or includes separations.
USING QUARKXPRESS SERVER
printcolors
plates
produceblankpages
useopi
images
registration
offset
bleed
offsetbleed
cmyk, rgb,
grayscale,
cmykandspot, asis
inripseps
1 | 0 | true | false |
yes | no
yes | no
includeimages,
omittiff,
omittiffandeps
off, centered,
offcenter
symmetric
0–6 (in inches)
Lets you specify the color space of the PDF file.
This option is available only when mode is set
to composite.
Lets you specify a separation method. This
option is available only when mode is set to
separations.
Lets you specify whether to include blank pages.
This option is available only when mode is set
to composite.
Lets you specify whether to use OPI.1 | 0 | true | false |
Lets you specify whether to include TIFF and
EPS images from an OPI server.
Lets you include, omit, and configure
registration marks.
Lets you specify the offset of registration marks.0–30 (in points)
Lets you specify a bleed type.pageitemsonly,
Lets you specify a bleed offset to use. This
option is available only when bleed is set to
symmetric.
spreads
lowresolution
colorimagedownsample
grayscaleimagedownsample
monochromeimagedownsample
colorcompression
grayscalecompression
monochromecompression
pdffile
yes | no
yes | no
9–2400
9–2400
true | false
true | false
true | false
String
Lets you specify whether to output spreads.1 | 0 | true | false |
Lets you request a low-resolution (36 dpi) PDF.1 | 0 | true | false |
Lets you specify the resolution of color images.9–2400
Lets you specify the resolution of grayscale
images.
Lets you specify the resolution of monochrome
images.
Lets you specify whether medium-quality
manual JPEG compression should be applied
to color images.
Lets you specify whether medium-quality
manual JPEG compression should be applied
to grayscale images.
Lets you specify whether ZIP compression
should be applied to monochrome images.
Lets you specify the PDF name. This option is
available only when PDF to Folder is selected
in QuarkXPress Server PDF preferences.
psfile
String
Lets you specify the PostScript file name. This
option is available only when PostScript forlater Distilling is selected in QuarkXPress Server
PDF preferences.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 71
USING QUARKXPRESS SERVER
thumbnail
mode
fontdownload
layers
transparencyres
verification
separate
produceblankplates
updateimage
updateflow
separations
yes | no
String
Integer value from
36 to 3600
yes | no
yes | no
true | false
true | false
Lets you embed a thumbnail in the PDF file.bw | color
Lets you specify the PDF file's color mode.composite |
Lets you turn font download on or off. You
cannot specify which fonts are downloaded.
Lets you specify which layers should be
included, as a comma-separated list.
Lets you specify the resolution for flattened
content.
Lets you use PDF/X–1a or PDF/X–3 verification.pdfx1a | pdfx3
Lets you specify whether to output each page
as a separate file.
Lets you specify whether to include blank
plates.
Lets you specify whether to update imported
pictures.
Lets you specify whether to update the text flow
version of a project to the current version.
This alert displays if you try to render an invalid page range.
HTTP Error #500No file produced. The
This alert displays if you try to render a a project that contains only
blank pages.
Lets you specify a single page.Integer
Lets you specify a range of pages.String (page range)
Lets you specify a spread. The first spread is
spread 1. In a facing-page document, spread 1
consists of the first page.
Lets you specify a layout by name or ID. The
first layout is Layout 1.
Lets you specify that the output use spreads.Boolean (1 | 0 | true
Example,
object model
Request object name: ScreenPDFRenderRequest
// STEP1: Create the QuarkXPress Server Request Context
// and set the nescessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
String docName = request.getParameter("documentName") ;
requestCtx.setDocumentName(docName);
72 | A GUIDE TO QUARKXPRESS SERVER 10.1
// STEP 2(SPECIFIC TO REQUESTS):
// Create the QuarkXPress renderer
// request and embed it in the request context.
ScreenPDFRenderRequest screenpdfRequest = new
ScreenPDFRenderRequest();
screenpdfRequest.setColorImageDownSample(
request.getParameter("ColorImageDownSample"));
screenpdfRequest.setCompression(request.getParameter(
"Compression"));
requestCtx.setRequest(screenpdfRequest);
// STEP3: Create the service and
// call the processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data =
service.processRequest(requestCtx);
Understanding render modifiers
Render modifiers let you control which parts of a project are rendered and set the scale
of the returned renderings. The topics covered here include the following:
USING QUARKXPRESS SERVER
box
boxes
layer
layout
movepages
page
pages
scale
spread
spreads
DescriptionProperty
The box render modifier lets you render a single box.
The boxes render modifier lets you render multiple boxes.
The layer render modifier lets you show and hide layers prior to rendering. This render modifier
also lets you add and remove layers from a project on the server.
The layout render modifier lets you render a particular layout.
The movepages render modifier lets you move pages prior to rendering.
The page render modifier lets you render a single page.
The pages render modifier lets you render multiple pages.
The scale render modifier lets you specify the scale at which content is rendered.
The spread render modifier lets you render a single spread.
The spreads render modifier lets you render multiple spreads.
Additional render-type-specific parameters are listed on each render type's page.
In the QuarkXPress Server Manager API, render modifiers are properties of render
request classes.
Render modifier names are not case-sensitive.
Annotate and append errors
The annotate and append errors feature allows PDF output to be generated regardless
of the errors in the modifier xml.
Errors recorded by this feature are:
A GUIDE TO QUARKXPRESS SERVER 10.1 | 73
USING QUARKXPRESS SERVER
• Missing image file.
• Missing text file.
•
Box/table node referenced by ANCHOREDBOXREF isn't available in the modifier XML
• Anchored box/table is created but is not referenced in the parent box.
•
Invalid ROWCOUNT/COLUMNCOUNT/MERGE.
•
Invalid TABLEBREAK.
•
Applying INVALID Gridline attribute to row/column.
HTTP Error #500This layer does not
This alert displays if you specify an invalid layer name with the layer,
layerattribute, or deletelayer parameter.
HTTP Error #500Specify a layer
This alert displays if you do not specify a layer name with the layer,
layerattribute, addlayer, or deletelayer parameter.
HTTP Error #500A layer with the
This alert displays if you try to add a layer that already exists or change
the name of a layer to a name is already used in the project.
HTTP Error #500Cannot change the
This alert displays if you try to change the name of the default layer.
Lets you lock or unlock a layer. You can use this
parameter in conjunction with the addlayer and
layerattribute parameters. This parameter
overrides QuarkXPress layer locking preferences.
Lets you set or change a layer's Keep Runaround
setting. You can use this parameter in conjunction
with the addlayer and layerattribute
parameters. This parameter overrides QuarkXPress
Keep Runaround preferences.
default layer.
HTTP Error #500Cannot delete the
This alert displays if you try to delete the default layer.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 77
USING QUARKXPRESS SERVER
value.
locked and cannot
be modified.
See Understanding loggingLogs
HTTP Error #500Invalid parameter
This alert displays if you do not specify additional attributes or specify
attributes with invalid values in an addlayer or layerattribute
request.
HTTP Error #500This layer has been
This alert displays if you try to add or modify an item on a locked layer.
Example GET
URL
Example, object
model
To render a single layer, use a URL like the following:
To add a new layer to a project, use code like the following:
Layer layer = new Layer();
layer.name = "New Layer";
layer.operation = "CREATE";
RGBColor rgbcolor = new RGBColor();
layer.RGBColor = rgbcolor;
layout.layer = new Layer[]{layer};
To edit the properties of an existing layer, use the following object hierarchy:
ModifierRequest < Project < Layout < Layer
To delete a layer, set its operation attribute to "DELETE".
layout
Parameters
Compatible with
You cannot add, modify, or delete multiple layers in a single request.Notes
You cannot print layers whose visible and suppressoutput properties are set to false.
You can render a hidden or suppressed layer by referencing it with the layer parameter.
Suppressed layers are rendered for the jpeg, png, and qxpdoc render types, but not for the
pdf, postscript, and eps render types.
You can use the deconstruct and getdocinfo request handlers to view information about
the layers in a project.
When you add a layer using addlayer, any unspecified attributes use the settings in the
QuarkXPress Server layer preferences (Administration > Preferences > Renderer > Layers).
If the visible property is set to false, the suppressoutput property is automatically set
to true.
The layout render modifier lets you render a specific layout.
layout
eps, jpeg, png, postscript, raw, pdf, screenpdf
String
Lets you specify which layout to render. The first layout is
layout 1.
78 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
Alerts
Example GET
URL
movepages
Parameters
Compatible with
HTTP Error #500The requested
layout does not
exist.
See Understanding loggingLogs
To render a layout by its layer ID, use a URL like the following:
http://localhost:8080/png/sample.qxp?layout=2
To render a layout by its name, use a URL like the following:
This alert displays if you supply an invalid layout value.
The movepages render modifier lets you move pages prior to rendering.
movepages
afterpage
eps, jpeg, png, postscript, qcddoc, qxpdoc, raw, pdf, screenpdf, xml
String
String
Lets you specify which pages to move. You can use a single
page number (for example, 2) or a range of pages with the
starting and ending page numbers separated by a hyphen
(for example, 2–5).
Lets you specify the page after which the page or pages
should be moved. To move pages to the beginning of a
layout, use afterpage=start. To move pages to the end
of a layout, use afterpage=end.
Alerts
Example GET
URL
Example, object
model
QuarkXPress Server Error #61This page does not
exist.
QuarkXPress Server Error #62Invalid page range.
QuarkXPress Server Error #51The specified page
range cannot be
moved there.
QuarkXPress Server Error #146This page range is
invalid.
QuarkXPress Server Error #10108Invalid parameter
value.
See Understanding loggingLogs
To move pages 2–3 to after page 5, use a URL like the following:
To move pages before rendering a layout, use code like the following:
// STEP1: Create the QuarkXPress Server Request Context
// and set the nescessary properties
com.quark.qxpsm.QRequestContext requestCtx =
new com.quark.qxpsm.QRequestContext();
Boolean responseAsURL = false;
requestCtx.setDocumentName(docName);
// STEP 2(SPECIFIC TO REQUESTS):Create the PDF
// renderer request and embed it in the request context. the request
context.
PDFRenderRequest pdfreq = new PDFRenderRequest();
// STEP3: Create the service and call the
// processRequest() API
RequestService service = new RequestServiceStub();
com.quark.qxpsm.QContentData data = service.processRequest(
requestCtx);
Notes
Parameters
Compatible
with
Alerts
Example GET
URL
The movepages operation executes only after all other modifications are complete. For example,
if you use movepages in a modify request, the pages are moved only after the modify request
is complete.
page
The page render modifier lets you render a single page.
The scale render modifier lets you specify the scale at which content is rendered.
scale
eps, jpeg, png, raw
parameter.
See Understanding loggingLogs
http://localhost:8080/png/sample.qxp?scale=2
Float
HTTP Error #500Invalid scale
This alert displays if an invalid scale value is provided.
What to do: Enter a valid scale value.
Lets you specify a scaling percentage. The valid values
are from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%)
on Windows.
spread
Parameters
Compatible with
Alerts
Example, GET
URL
Example, Object
Model
The spread render modifier lets you render a single spread.
spread
eps, jpeg, png, postscript, raw, pdf, screenpdf
spread does not
exist.
See Understanding loggingLogs
http://localhost:8080/png/sample.qxp?spread=2
To add a spread to a project, use code like the following:
Spread spread = new Spread();
spread.UID = "5";
spread.operation = "CREATE";
layout.spread = new Spread[]{spread};
Integer
HTTP Error #500The requested
This alert displays if you specify an invalid spread.
Lets you specify which spread to render. Spread numbers
start with 1. The first spread is spread 1. In a facing-page
document, spread 1 consists of the first page.
A GUIDE TO QUARKXPRESS SERVER 10.1 | 81
USING QUARKXPRESS SERVER
Spread is located at the following place in the object hierarchy:
ModifierRequest < Project < Layout < Spread
To delete a spread, set its operation attribute to "DELETE".
spreads
The spreads render modifier lets you render layouts in spreads mode, so that pages
in spreads are rendered side-by-side rather than as individual pages.
Parameters
Compatible with
Example, GET
URL
suppresserrors
Parameters
Compatible with
Example GET
URL
Using content modifiers
spreads
eps, jpeg, png, postscript, raw, pdf, screenpdf
See Understanding loggingLogs
http://localhost:8080/pdf/sample.qxp?spreads=true
Boolean (1 | 0 | true | false | yes |
no)
Lets you specify whether to render spreads
(true) or individual pages (false).
The suppresserrors render modifier forces QuarkXPress Server to render as much
of a layout as it can, despite any errors that occur.
// STEP 2 (SPECIFIC TO REQUESTS):Create the Box Param
// renderer request and embed it in
RequestParameters request = new RequestParameters();
NameValueParam nameValue1 = new NameValueParam();
nameValue1.paramName = this.boxname1.Text;
if(!this.boxvalue1.Text.Equals(""))
nameValue1.textValue = this.boxvalue1.Text;
request.params = new NameValueParam[]{nameValue1};
rc.request = request;
// Create the service and
// call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Parameters
Alerts
Logs
Box names are case-sensitive.Notes
Use "&" to change the contents of multiple boxes in one request. The general URL for the
multiple-box request is:http://localhost:8080/sample.qxp?text1=
NewText1&text2=NewText2 where text1 and text2 are the names of the two different boxes.
You can use "&" to change the contents of multiple boxes in one request. For example:
If an error occurs, the error message is written to the QuarkXPress Server Error Log. The
transaction entry in the error log contains the date and time of the request, the error code, and
the error message. The following is a sample of an error transaction log entry:
To apply Comic Sans MS to text in the box named "HeadBox," use a URL like the following:
http://localhost:8080/png/sample.qxp?HeadBox=Headline&fontname=Comic Sans
MS
Request object name: RequestParameters
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 fontname
// renderer request and embed it in
RequestParameters request = new RequestParameters();
NameValueParam nameValue1 = new NameValueParam();
nameValue1.paramName = this.boxname.Text;
if(!this.boxvalue1.Text.Equals(""))
nameValue1.textValue = this.fontname.Text;
request.params = new NameValueParam[]{nameValue1};
rc.request = request;
// Create the service and
// call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
This topic explains how to import a picture into an empty box or replace an existing
picture with a new one.
Parameters
Logs
[box name[
A preview of the project with the imported picture.Response
HTTP Error #404File not found.Alerts
QuarkXPress Server Error #–43
This alert displays if the imported file is not available to QuarkXPress Server.
HTTP Error #500The specified file
failed to load in
the picture box.
If the request succeeds, a transaction success message is written to the QuarkXPress Server
transaction log file. For example:
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 Param
//renderer request and embed it in
RequestParameters request = new RequestParameters();
NameValueParam nameValue1 = new NameValueParam();
nameValue1.paramName = this.boxname1.Text;
if(!this.boxvalue1.Text.Equals(""))
nameValue1.textValue = this.boxvalue1.Text;
request.params = new NameValueParam[]{nameValue1};
rc.request = request;
//Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Box names are case-sensitive.Notes
You can use "&" to change the contents of multiple boxes in one request. For example:
The saveas content modifier lets you save modified QuarkXPress projects in any
supported format to the document pool or to any network location accessible to
QuarkXPress Server.
If you send a saveas request to QuarkXPress Server Manager using HTTP or the Web
services interface while the common doc pool switch is set to off in the
QuarkXPress Server Manager client, the file is saved to all registered QuarkXPress Server
instances. If the common doc pool is enabled, the file can be saved to any one registered
QuarkXPress server instance.
newname
path
savetopool
replace
String
true | false
true | false
Lets you specify a name for the saved-as project.String
Lets you specify a location for the saved-as project (other than
the document pool).
Lets you specify whether the project should be saved to the
document pool.
The default value for this paramter is true. However, if you
specify a path value, the default value changes to false, which
means if you want the project saved to the document pool,
you must explicitly set savetopool to true.
Lets you specify whether the saved project should replace a
project with the same name. The default value is true.
The message "Document successfully saved."Response
HTTP Error #404File not found.Alerts
QuarkXPress Server Error #–43
A GUIDE TO QUARKXPRESS SERVER 10.1 | 85
USING QUARKXPRESS SERVER
pathname.
invalid.
folder is
Read-Only.
This alert displays if you supply an incorrect file name or the file is not
available to QuarkXPress Server.
HTTP Error #404Bad filename/
QuarkXPress Server Error #–43
This alert displays if you supply an incorrect file name or the file is not
available to QuarkXPress Server.
HTTP Error #500The file path is
This alert displays if you supply an invalid path parameter.
What to do: Specify the correct file path with the path parameter.
HTTP Error #500The specified
This alert displays if you try to save a project to a folder with read-only
access.
Logs
Example, GET
URL
Example, object
model
If the request succeeds, a transaction success message is written to the QuarkXPress Server
transaction log file. For example:
If an alert displays, an error message is written to the QuarkXPress Server error log file. For
example:
11/16/2005 15:42:12 — Error — Error Code: 10371 — The file path is invalid.
To save a PDF file named "Customer1.pdf" in the folder HDD:temp and also in the document
pool, use a URL like the following. Note that this URL will cause the saved-as file to replace
any existing file with the same name.
// STEP 2 (SPECIFIC TO REQUESTS):
// Create the Save as request and chain it to the document context
SaveAsRequest saveasreq = new SaveAsRequest();
saveasreq.newName = this.newname.Text;
if((this.path.Text != null) &&
(!this.path.Text.Equals("")))
saveasreq.newFilePath = this.path.Text;
saveasreq.replaceFile = this.replace.Checked.ToString();
saveasreq.saveToPool =
this.savetopool.Checked.ToString();
rc.request = saveasreq;
// Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Importing XML with placeholders
This topic explains how to import XML data into boxes using QuarkXPress placeholders.
To use this feature, you must have a QuarkXPress project that has been set up with
placeholders that correspond to the element types in a source XML file. For more
information, see A Guide to XML Import.
86 | A GUIDE TO QUARKXPRESS SERVER 10.1
USING QUARKXPRESS SERVER
Parameters
Alerts
Logs
thexmldoc
layout
paginate
The layout with the imported XML.Response
String
If the project is successfully rendered, a transaction success message is written to the
QuarkXPress Server transaction log file. The transaction entry consists of the date and time of
the request, the render type, the project name, the type of response produced by the server,
the size of the response returned in bytes, and the client IP address. The following is a sample
of a transaction entry:
HTTP Error #500Invalid XML
This alert displays if you supply an invalid XML string in the thexmldoc
parameter.
Lets you specify the XML file containing the data to import. The
path can be absolute or relative to the location of the XML file. You
can also supply XML as a string.
Lets you specify which layout to render. The first layout is layout
1. You can also specify a layout by name.
Lets you specify the XML file containing the data to import. The
paginate parameter reates enough pages in the target layout to
accommodate the records in the XML.
This parameter works only with the pdf, postscript, and qxp
render types. If you use it with any other render type, the server
returns only the first page of the paginated layout.
If you do not supply an XML string or file (for example:
http://localhost:8080/pdf/Sample.qxp?paginate),
QuarkXPress Server attempts to use the XML file that was associated
with the layout in QuarkXPress.
Example, GET
URL
Example, object
model
When QuarkXPress Server is running on Windows, use a URL like the
following:
http://localhost:8080/Sample.qxp?thexmldoc=<?xml
version="1.0"?>
<BookReview><Book><Title>C:\Autumn.jpg</Title>
<Author> Brian Kernighan and Dennis Ritchie</Author>
</Book></BookReview>
When QuarkXPress Server is running on Mac OS, use a URL like the following:
http://localhost:8080/Sample.qxp?thexmldoc=<?xml version=
"1.0"?>
<BookReview><Book><Title>/Volumes/MacHD/Pictures/abc.tiff</
Title>
<Author> Brian Kernighan and Dennis Ritchie</Author>
</Book></BookReview>
Alternatively, you can specify a path to a file containing the XML:
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 XML Import request
XMLImportRequest xmlimportreq = new XMLImportRequest();
xmlimportreq.XMLDocument = this.thexmldoc.Text;
A GUIDE TO QUARKXPRESS SERVER 10.1 | 87
USING QUARKXPRESS SERVER
rc.request = xmlimportreq;
// STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request
JPEGRenderRequest jpreq = new JPEGRenderRequest();
xmlimportreq.request = jpreq;
// Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Updating article geometry and content
This topic explains how to update the geometry and contents of a QuarkCopyDesk
article using another article file or an article in a QuarkXPress project.
Parameter
Alerts
Logs
Example, GET
URL
updategeometry
updatecontent
WHAT DOES THIS RETURN?Response
WHAT
ERRORS
APPLY?
If the project is successfully rendered, a transaction success message is written to the
QuarkXPress Server transaction log file. The transaction entry consists of the date and time of
the request, the render type, the project name, the type of response produced by the server,
the size of the response returned in bytes, and the client IP address. The following is a sample
of a transaction entry:
If you use this parameter with updatefromfile, this lets you specify
the file in which you want to update the geometry. If you use this
parameter with updatetofile, this lets you specify the QuarkXPress
project with which you want to update the geometry of an article.
Lets you specify the file in which you want to update the content.
Can be used only with updatefromfile.
CAN YOU DO THIS WITH QXPSM? IF SO, HOW?Example, object
model
Request object names: XMLImportRequest
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 XML Import request
XMLImportRequest xmlimportreq = new XMLImportRequest();
xmlimportreq.XMLDocument = this.thexmldoc.Text;
88 | A GUIDE TO QUARKXPRESS SERVER 10.1
rc.request = xmlimportreq;
// STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request
JPEGRenderRequest jpreq = new JPEGRenderRequest();
xmlimportreq.request = jpreq;
// Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Highlighting text in rendered output
To apply highlighting to text in rendered output, use XML like the following.
<RICHTEXT BACKGROUNDCOLOR="Yellow">This text is highlighted.</RICHTEXT>
Highlighting is applied only to rendered output. It is not retained in the QuarkXPress
project.
Using XML modify
The modify parameter lets you modify a QuarkXPress project using XML.
USING QUARKXPRESS SERVER
Parameters
Example GET
URL
This topic covers the modify parameter when it is used without the construct
namespace. You can also use the modify parameter to specify an XML file to use when
constructing a project; for more information, see "Constructing a project".
The xml namespace takes two arguments: the name of the project to be modified, and
a modify parameter with the string or the path of the XML file that describes how to
create the project:
http://QXPServer8:8080/project1.qxp?modify=
file:path to XML file on server http://QXPServer8:8080/
project1.qxp?modify=XML string
You can also modify QuarkCopyDesk articles. To modify a QuarkCopyDesk article:
Lets you specify an XML file or string that describes how to create
a project. The path can be absolute or a relative path in the
document pool. Use the file: indicator to specify the path.
Note that you can also include an XML file as part of a multipart
HTTP request.
If you know the UID attribute of a <CONTENT> element, you can insert content into
that <CONTENT> element without having to specify where it is. For example:
//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);
Example 2,
object model
To edit the geometrical properties of an existing box in a QuarkXPress project, use the following
object hierarchy:
The order of the <BOXREF> elements in a <GROUP> indicates the order in which the
boxes were selected prior to grouping. The z-order of boxes in the layout is determined
by the order of the <BOX> elements in the XML, from rearmost to frontmost.
XML representations of groups created by versions of QuarkXPress Server prior to 8.1
are ignored during construct and modify calls, as they were in earlier versions of
QuarkXPress Server.
Modifying text attributes
You can use the modify parameter to change the attributes of text in a QuarkXPress
project. All modifications are done on a text box basis. To modify text properties, use
the following parameters in the Modifier DTD:
• "BOX (Modifier schema)"
• "ID (Modifier schema)"
• "TEXT (Modifier schema)"
• "STORY (Modifier schema)"
• "PARAGRAPH (Modifier schema)"
• "FORMAT (Modifier schema)"
• "DROPCAP (Modifier schema)"
• "TABSPEC (Modifier schema)"
• "TAB (Modifier schema)"
• "RULE (Modifier schema)"
• "RICHTEXT (Modifier schema)"
The following XML shows how some of these parameters work.
// 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);
A GUIDE TO QUARKXPRESS SERVER 10.1 | 99
USING QUARKXPRESS SERVER
Example 2,
object model
Notes
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.
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.
Modifying picture properties
You can modify the properties (such as origin, scale, angle, skew, and orientation) of
pictures in a QuarkXPress project with XML. To modify picture properties, use the
following parameters in the Modifier DTD:
• "BOX (Modifier schema)"
• "ID (Modifier schema)"
• "PICTURE (Modifier schema)"
The following XML shows how some of these parameters work.