2017

Table Of Contents
USING QUARKXPRESS SERVER
A Guide to QuarkXPress Server 2017 | 61
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).
The first layout is
Layout 1.
outputstyle String
Lets you specify a
Kindle output style by
name or ID.
Response A Kindle (.mobi) file.
Alerts
The renderer for this
i
mage type has no way
of rendering the desired
objects.
HTTP Error #406 This alert displays if you submit
a render request with the pages or box
parameter.
Kindle not created.
There is no reflow
layout in the
document.
HTTP Error #10543This error appears if there is
no reflow layout.
Logs See “Understanding logging.”
Example, GET URL http://localhost:8080/kindle/sample.qxp? outputstyle=kindle&layout=2
Example, object model
Request object name: KindleRenderRequest //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 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);
Notes
You can only create a Kindle file from a project that includes a reflow
article.
Namespace literal
Response The requested file returned in the HTTP response.
Alerts
Incorrect administration realm
username and password.
HTTP Error #401 This alert
displays if you specify an
invalid administrator user name
and password.What to do: Use
the user name and password set
in the Authentication pane of
the General Preferences dialog