10.1

Table Of Contents
kindle
The kindle render type returns a rendering of a layout that can be viewed on Amazon
Kindle readers.
kindle
Namespace
Lets you specify a layout by name
or ID. The first layout is Layout 1.
String
layout
Render modifier
parameters
Lets you specify a Kindle output
style by name or ID.
String
outputstyle
A Kindle (.mobi) file.Response
HTTP Error #406The renderer for this image type has
no way of rendering the desired
objects.
Alerts
This alert displays if you submit a render request
with the pages or box parameter.
HTTP Error #10543Kindle not created. There is no reflow
layout in the document.
This error appears if there is no reflow layout.
See Understanding loggingLogs
http://localhost:8080/kindle/sample.qxp?
outputstyle=kindle&layout=2
Example, GET URL
Request object name: KindleRenderRequest
//STEP1: Create the QuarkXPress Server Request
//Context and set the necessary properties
Example, object
model
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);
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
Namespace
A GUIDE TO QUARKXPRESS SERVER 10.1 | 59
USING QUARKXPRESS SERVER