2016

Table Of Contents
png
The png render type returns a PNG rendering of a page or spread.
PNG
Namespace
Lets you specify the compression of a PNG response. The
valid values are: 1 (lowest compression), 2 (medium
1 | 2 | 3 | 4
pngcompression
Parameters
compression), 3 (high compression), and 4 (highest
compression). The default value is 1.
Lets you specify whether to generate a PNG file that uses
transparency.
true | false
transparentpng
Lets you specify whether to update imported pictures.true | false
upadateimage
Lets you specify whether to update the text flow version of
a project to the current version.
true | false
updateflow
Lets you request multiple boxes.String
boxes
Render modifier
parameters
Lets you specify a single page.Integer
page
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.
Float .1 to
6.92 for
Windows .1
to 8 on
Mac OS
scale
Lets you request a single box.String
box
Lets you specify a spread. The first spread is spread 1. In a
facing-page document, spread 1 consists of the first page.
Integer
spread
Lets you specify a layout by name or ID. The first layout is
Layout 1.
String
layout
A PNG file.Response
See Understanding loggingLogs
http://localhost:8080/png/sample.qxp?pngcompression=1
Example, GET
URL
Request object name: PNGRenderRequest
// STEP1: Create the QuarkXPress Server Request
// Context and set the nescessary properties
Example, object
model
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);
A GUIDE TO QUARKXPRESS SERVER 2016 | 65
USING QUARKXPRESS SERVER