| <
USING QUARKXPRESS SERVER } else { document.getElementById("box1File").name = ""; } document.getElementById("Page").name = "Page"; document.getElementById("Layout").name = "Layout"; url = prefix + port + renderer + file; document.getElementById("form1").action = url; } The Submit_onclick() function reads the values from the formand builds a request URL using the server, port, and render type.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER If you’ve written a Server XTensions module, you can extend the XML interface to include any changes it makes to the Modifier schema 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.
USING QUARKXPRESS 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 bypassFileInfo Boolean info should be fetched before executing the command.
USING QUARKXPRESS SERVER Processes the request context and returns the result. Parameter Type Description Argument passed to RequestService. Contains processRequest requestCmd QRequestCont settings that must be set ext once per request. All chained requests are set inside the request context. Creates a new session and returns a session ID. Parameter Type Description Timeout for the session in milliseconds.
USING QUARKXPRESS SERVER not exist, an error is returned. Parameter Type sessionId String Description Session whose open documents are sought. getOpenSessions Gets all open sessions. getPreferences Gets QuarkXPress Server preferences. setPreferences Sets QuarkXPress Server preferences. getXPressDOM Creates a DOM for the specified document. Creates a new document for modification and keeps it open until further notice. The document is created with a single layout.
USING QUARKXPRESS SERVER the session does not exist, an error is returned. Parameter Type docName String Description Document (along with relative path if required) to be opened for modification. QuarkXPress Server instance which should be used for this document modification. host String 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 port Integer specified in the host parameter.
USING QUARKXPRESS SERVER Parameter Type Description Relative path where open documents should be saved. If this value is provided, copies of open documents relativePath String 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. sessionId String Session in which the document exists. Saves the open document.
USING QUARKXPRESS SERVER object model rc.responseAsURL = false; JPEGRenderRequest jpegRequest = new JPEGRenderRequest(); rc.request = jpegRequest; RequestService svc = new RequestService(); QContextData response = svc.processRequest(rc); QRequest Base class for all request objects (such as PDFRenderRequest). All request Description objects share some common data members, which are described below.
USING QUARKXPRESS SERVER Type Web service data object Name Type Description Name of the paramName String parameter. In most cases this will be the name/ID of the box. Text value of the box. Members textValue String (You can set either textValue or streamValue.) Stream value of the streamValue byte[] box. (You can set either textValue or streamValue.) contentType String The MIME content type of the parameter. QContentData Description A response to a Web Services call to QuarkXPress Server.
USING QUARKXPRESS SERVER example, UTF-8 or ANSI). actualServerPortUsed String actualServerUsed String Identifies the server port. Identifies the server. If the response returned by the server headers String is a set of headers, this array contains the header response. If the response returned by the server multipartResponse String is multipart, this array contains the multipart response parts. QRequestContext context = new QRequestContext(); context.setDocumentName(“sample.qxp”); context.
USING QUARKXPRESS SERVER 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()); } QXP Server Manager 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.
USING QUARKXPRESS SERVER 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. For information on how to submit a render request, see “Getting Started.” Cannot open this document type.
USING QUARKXPRESS SERVER If an alert is displayed, an error message is written to the QuarkXPress Server transaction log file. The transaction entry contains the date and time of the request, the error code, and the error message. The following is a sample of an error log transaction entry: 09/03/2011 13:54:33 - RequestURI = /sample.qcd TransactionUUID = dffc3a7e-11fd-4d97-b3fe-8f2129353d58 Client = 10.91.30.216 Error #10120 - Cannot open this document type. Please select a QuarkXPress document or template.
USING QUARKXPRESS SERVER Function QuarkXPress Server Manager object model Description classes output. 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.
USING QUARKXPRESS SERVER App Studio Publishing Portal. For example:http://localh ost:8080/ appstudio/clearcreden tial Lets you retrieve the current publication hierarchy from the config String App Studio Publishing Portal. For example:http://qxpser ver:port/ appstudio/config Lets you specify a layout String Response The first layout is Layout 1. Render modifier parameters layout by name or ID. page Integer pages String (page range) Lets you specify a page. Lets you specify a range of pages. A .
USING QUARKXPRESS SERVER service.processRequest(requestCtx); ave The ave render type returns a .zip file containing an AVE issue file and its corresponding manifest. Namespace AVE Lets you specify an output style. To use a named output style, use the name of that output style. For example:http://localh ost:8080/ave/ sample.
USING QUARKXPRESS SERVER This Output Style This alert displays if you specify a nonexistent does not exist. output style. This Output Style cannot be used with this render type. This alert displays if you specify an output style that is incompatible with this render type. Cannot open this document type. Please select a HTTP Error #10120This alert displays if you submit QuarkXPress an ave request for a QuarkCopyDesk article. document or template.
USING QUARKXPRESS SERVER been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example:http://localh ost:8080/pdf/ sample.qxp?outputsty le=document Lets you specify an epsformat color EPS format. The default value is color. Lets you include or epspreview omit a TIFF preview. tiff | none The default value is tiff. Lets you specify a data epsdata ascii | binary | clean8bit type for the EPS file. The default value is clean8bit.
USING QUARKXPRESS SERVER facing-page document, spread 1 consists of the first page. Lets you specify a layout String layout by name or ID. The first layout is Layout 1. Lets you specify downloadlayoutFont s whether to download 1 | 0 | true | false | yes | no all fonts used in the layout and all system fonts. Lets you specify downloadImportedP dfEpsFonts whether to download 1 | 0 | true | false | yes | no all fonts required by imported PDF and EPS files. Response An EPS file.
USING QUARKXPRESS SERVER style named “mystylename”, you can specify a bleed setting with a URL like the following:http://localhost:8080/eps/sample.qxp? outputstyle=mystylename?bleed=symmetric 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 an EPS output style, the default EPS output style is used.
USING QUARKXPRESS SERVER jpeg The jpeg render type returns a JPEG rendering of a page or spread. Namespace JPEG Lets you specify the image quality of a rendered JPEG image. The valid values are: 1 jpegquality 1|2|3|4 (highest quality), 2 (high quality), 3 (medium quality), and 4 (lowest quality). The default value is 1. Lets you specify upadateimage true | false whether to update imported pictures.
USING QUARKXPRESS SERVER boxes String page Integer Lets you request multiple boxes. Lets you request a single page. Lets you specify a scaling percentage. scale Float .1 to 6.92 for The valid values are Windows .1 to 8 on from .1 (10%) to 8 macOS) (800%) on macOS or 6.92 (692%) on Windows. Render modifier box parameters Lets you request a String single box. Lets you specify a spread. The first spread is spread 1. In a spread Integer facing-page document, spread 1 consists of the first page.
USING QUARKXPRESS SERVER Lets you specify a layout String Render modifier layout by name or ID. The first layout is Layout 1. parameters Lets you specify a outputstyle String Kindle output style by name or ID. Response A Kindle (.mobi) file. The renderer for this image type has no HTTP Error #406 This alert displays if you submit a way of rendering the render request with the pages or box parameter. desired objects. Alerts Kindle not created.
USING QUARKXPRESS SERVER n realm name and password set in the Authentication pane of the username General Preferences dialog box (Administration > Preferences > and General) in the QuarkXPress Server Web interface. password. Logs See “Understanding logging.” Example, GET http://localhost:8080/literal/Story.doc URL Request object name: LiteralRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); Example, object model if(!this.DocumentSettings1.documentName.Text.
USING QUARKXPRESS SERVER keywords for the PDF file. Lets you specify includehyperlinks 1 | 0 | true | false | yes | no whether to include hyperlinks in the PDF file. Lets you specify whether to export lists exportlistsashyperlin ks as hyperlinks. To use 1 | 0 | true | false | yes | no this parameter, you must set includehyperlinks to true. Lets you specify whether to export the exportindexesashype rlinks index as hyperlinks.
USING QUARKXPRESS SERVER only when mode is set to composite. useopi 1 | 0 | true | false | yes | no Lets you specify whether to use OPI. Lets you specify images includeimages, omittiff, whether to include omittiffandeps TIFF and EPS images from an OPI server. Lets you include, registration off, centered, offcenter omit, and configure registration marks. Lets you specify the offset 0–30 (in points) offset of registration marks. bleed pageitemsonly, symmetric Lets you specify a bleed type.
USING QUARKXPRESS SERVER compression should be applied to grayscale images. Lets you specify monochromecompre ssion whether ZIP true | false compression should be applied to monochrome images. Lets you specify the PDF name. This option is available pdffile String only when PDF to Folder is selected in QuarkXPress Server PDF preferences. Lets you specify the PostScript file name.
USING QUARKXPRESS SERVER 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 1 | 0 | true | false 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.
USING QUARKXPRESS SERVER Preference > General > Server > Document Root Folder). The first layout in a project is layout 0. For example:http://localh ost:8080/pdf/multilay out.qxp? layoutstart=0&layoute nd=3 Lets you specify updateimage true | false whether to update imported pictures. Lets you specify whether to update the updateflow true | false text flow version of a project to the current version. page Integer pages String (page range) Lets you specify a single page.
USING QUARKXPRESS SERVER This Output Style cannot be used with this render type. Logs This alert displays if you specify an output style that is incompatible with this render type. See “Understanding logging.” This URL renders “sample.qxp” as a PDF with a symmetric bleed: http://localhost:8080/pdf/sample.
USING QUARKXPRESS SERVER output style. Output style names are case-sensitive and should be precise.
USING QUARKXPRESS SERVER multiple boxes. page Lets you specify a Integer single page. Lets you specify a scaling percentage. scale Float .1 to 6.92 for The valid values are Windows .1 to 8 on from .1 (10%) to 8 macOS (800%) on macOSmacOSor 6.92 (692%) on Windows. box parameters Lets you request a String single box. Lets you specify a spread. The first spread is spread 1. In a spread Integer facing-page document, spread 1 consists of the first page.
USING QUARKXPRESS SERVER Lets you specify bleed values for a page.To specify an asymmetric bleed, use the following format:prntbleed=asy m,clip,top,bottom, left, rightThe clip value is Boolean (yes/no). The top, bottom, left, and right values are float values. For example:http://localh ost:8080/ postscript/Sample.
USING QUARKXPRESS SERVER ost:8080/ postscript/ sample.qxp?outputsty le=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example:http://localh ost:8080/ postscript/ sample.qxp?outputsty le=document Lets you specify updateimage true | false whether to update imported pictures. Lets you specify whether to update the updateflow true | false text flow version of a project to the current version.
USING QUARKXPRESS SERVER This Output Style This alert displays if you specify a nonexistent does not exist. output style. This Output Style cannot be used with this render type. This alert displays if you specify an output style that is incompatible with this render type. Logs See “Understanding logging.” Example, GET URL http://localhost:8080/postscript/Sample.
USING QUARKXPRESS SERVER component in an article to render. For example:http://localh ost:8080/copydesk/ abc.qcd?component=c omp1 Lets you render an article in lightweight or full-featured format. For format lightweight | fullfeatured example:http://localh ost:8080/qcddoc/ abc.qxp?article=article 1& format=fullfeatured Lets you save a copy of an article that was created in QuarkCopyDesk as a template. The default value is true.
USING QUARKXPRESS SERVER ure=1& quality=blackandwhit e&picdpi=144& spreadrange=firsthttp: //localhost:8080/savea s/qcddoc/ PagePicture.qxp?inclu depagepicture=true Lets you modify the Render modifier parameters modify XML article with XML. For more information, see “XML modify.” Response A QuarkCopyDesk article. There is no box with the specified identifier. This alert displays if the box corresoponding to a referenced component does not exist.
USING QUARKXPRESS SERVER 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:http://localh ost:8080/saveas/ qxpdoc/project.qxp?sa saveastemplate true | false veastemplate=trueYou can also use this parameter to save a copy of a template as a project. For example:http://localh ost:8080/saveas/ qxpdoc/template.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER Lets you specify whether to export lists exportlistsashyperlin ks as hyperlinks. To use 1 | 0 | true | false | yes | no this parameter, you must set includehyperlinks to true. Lets you specify whether to export the exportindexesashype rlinks index as hyperlinks. 1 | 0 | true | false | yes | no To use this parameter, you must set includehyperlinks to true. Lets you specify whether to export lists exportlistsasbookma rks as bookmarks.
USING QUARKXPRESS SERVER TIFF and EPS images from an OPI server. Lets you include, registration off, centered, offcenter omit, and configure registration marks. Lets you specify the offset 0–30 (in points) offset of registration marks. bleed pageitemsonly, symmetric Lets you specify a bleed type. Lets you specify a bleed offset to use. offsetbleed 0–6 (in inches) This option is available only when bleed is set to symmetric.
USING QUARKXPRESS SERVER be applied to monochrome images. Lets you specify the PDF name. This option is available pdffile String only when PDF to Folder is selected in QuarkXPress Server PDF preferences. Lets you specify the PostScript file name. This option is psfile available only when String PostScript for later Distilling is selected in QuarkXPress Server PDF preferences. Lets you embed a thumbnail bw | color thumbnail in the PDF file.
USING QUARKXPRESS SERVER Lets you specify whether to update the updateflow true | false text flow version of a project to the current version. page Integer pages String (page range) Lets you specify a single page. Lets you specify a range of pages. Lets you specify a spread. The first spread is spread 1. In a spread Integer facing-page Render modifier document, spread 1 parameters consists of the first page. Lets you specify a layout String layout by name or ID. The first layout is Layout 1.
USING QUARKXPRESS SERVER RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx); html5 To Export as responsive HTML5 publication(Multi Device Output): • Create/Duplicate different layouts in a QXP project where each layout corresponds to a digital device/orientation. • Optionally create an HTML5 output style. • Optionally specify a name for the section to be exported as a Table of Contents.
USING QUARKXPRESS SERVER HTML5 Modifier XML Markup The following table pertains to HTML5 publications: Namespace html5 Lets you generate an HTML5 article and returns it as a .zip file. Parameters html String For example:http://localh ost:8080/ appstudio/html/templ ate.qxp Lets you specify a layout String layout by name or ID. Render modifier The first layout is parameters Layout 1. page 82 | A GUIDE TO QUARKXPRESS SERVER 2020 Integer Lets you specify a page.
USING QUARKXPRESS SERVER pages Response String (page range) Lets you specify a range of pages. A .zip file containing an HTML5 article. The renderer for this image type has no HTTP Error #406 This alert displays if you submit a way of rendering the render request with the box parameter. desired objects. Cannot open this Alerts document type. Please select a HTTP Error #10120 This alert displays if you submit QuarkXPress an appstudio request for a QuarkCopyDesk article. document or template.
USING QUARKXPRESS SERVER In the QuarkXPress Server Manager API, render modifiers are properties of render request classes. Render modifier names are not case-sensitive. annotateerrors The annotateerrors render modifier lets you include descriptions of rendering errors as notes in the layout itself. 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.
USING QUARKXPRESS SERVER There is no box with the specified identifier. HTTP Error #500 This alert displays if you request a box that does not exist. Cannot render box. Alerts The box must be HTTP Error #500 This alert displays if you request a within the page box that is outside the page boundary. boundaries. The renderer for this image type has no way of rendering the desired objects. HTTP Error #406 This alert displays if you try to use the box parameter with the eps, pdf, or qxpdoc render types.
USING QUARKXPRESS SERVER compositionzone The compositionzone parameter lets you return an XML representation of one or more Composition Zones items. Lets you specify which Composition Zones item to return. For compositionzone String example:http://localh ost:8080/xml/sample. qxp? compositionzone=czb ox Parameters Lets you specify which Composition Zones items to return. For compositionzones String example:http://localh ost:8080/xml/sample.
USING QUARKXPRESS SERVER attributes of a layer. You can modify one layer per request. Lets you specify a new name for a layer. You must use this name String parameter in conjunction with the layerattribute parameter. Lets you make a layer visible or invisible. You can use this parameter in visible Boolean (1 | 0 | true | false | yes | no) conjunction with the addlayer and layerattribute parameters. This parameter overrides QuarkXPress layer visibility preferences.
USING QUARKXPRESS SERVER addlayer and layerattribute parameters. This parameter overrides QuarkXPress Keep Runaround preferences. Compatible with eps, jpeg, png, postscript, qcddoc, qxpdoc, raw, pdf, screenpdf, swf, xml This layer does not HTTP Error #500 This alert displays if you specify exist. Please verify an invalid layer name with the layer, layerattribute, the layer name. or deletelayer parameter. HTTP Error #500 This alert displays if you do not Specify a layer name.
USING QUARKXPRESS SERVER You cannot add, modify, or delete multiple layers in a single request.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 Notes types.
USING QUARKXPRESS SERVER move pages to the end of a layout, use afterpage=end. Compatible with eps, jpeg, png, postscript, qcddoc, qxpdoc, raw, pdf, screenpdf, xml This page does not exist. Invalid page range. QuarkXPress Server Error #61 QuarkXPress Server Error #62 The specified page range cannot be Alerts QuarkXPress Server Error #51 moved there. This page range is invalid. Invalid parameter value. Logs QuarkXPress Server Error #146 QuarkXPress Server Error #10108 See “Understanding logging.
USING QUARKXPRESS SERVER way of rendering the desired objects. Logs See “Understanding logging.” Example GET URL http://localhost:8080/png/sample.qxp?page=2 To add a new page to an existing spread in a project, use code like the following:Spread spread = new Spread(); Page page = new Page(); page.UID Example, object = “5”; page.operation = “CREATE”; spread.
USING QUARKXPRESS SERVER parameter. scale value is provided. What to do: Enter a valid scale value. Logs See “Understanding logging.” Example, GET URL http://localhost:8080/png/sample.qxp?scale=2 spread The spread render modifier lets you render a single spread. Lets you specify which spread to render. Spread numbers start with 1. The first Parameters spread Integer spread is spread 1. In a facing-page document, spread 1 consists of the first page.
USING QUARKXPRESS SERVER suppresserrors The suppresserrors render modifier forces QuarkXPress Server to render as much of a layout as it can, despite any errors that occur. Forces the layout to Parameters suppresserrors String render despite any errors that may occur. Compatible with pdf, qxpdoc, xml, postscript Logs See “Understanding logging.” Example GET URL http://localhost:8080/png/sample.
USING QUARKXPRESS SERVER jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/10/2005 10:32:57 — Error — Error Code: –43 — File not found. Example, GET URL http://localhost:8080/sample.qxp?Author=NewText http://localhost:8080/sample.qxp?TopStory=file:TopStory.doc Request object name: RequestParameterscom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();; if(!this.
USING QUARKXPRESS SERVER Error Code: –43 — File not found. To apply Comic Sans MS to text in the box named “HeadBox,” use a URL Example, GET URL like the following:http://localhost:8080/png/sample.qxp?HeadBox=Headline&font name=Comic Sans MS Request object name: RequestParameterscom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(“”)) rc.documentName = this.DocumentSettings1.documentName.
USING QUARKXPRESS SERVER HTTP Error #404 QuarkXPress Server Error #–43 File not found. This alert displays if the imported file is not available to QuarkXPress Server. Alerts The specified file failed to load in the picture box. HTTP Error #500 This alert displays if you attempt to import an invalid picture file. If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example:8/3/2005 11:27:42 — jpeg/sample.
USING QUARKXPRESS SERVER Lets you specify a path location for the saved- String 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 savetopool true | false 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.
USING QUARKXPRESS SERVER URL will cause the saved-as file to replace any existing file with the same name.http://localhost:8080/saveas/pdf/sample.qxp? newname=Customer1&path=HDD:temp&savetopool=true Request object name: SaveAsRequestcom.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(“”)) rc.documentName = this.DocumentSettings1.documentName.
USING QUARKXPRESS SERVER 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?pagin ate), QuarkXPress Server attempts to use the XML file that was associated with the layout in QuarkXPress. Response The layout with the imported XML.
USING QUARKXPRESS SERVER 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; rc.request = xmlimportreq; // STEP 3(SPECIFIC TO REQUESTS): Create the JPEG renderer request JPEGRenderRequest jpreq = new JPEGRenderRequest(); xmlimportreq.
USING QUARKXPRESS SERVER String. To update the geometry of an article using the geometry of another article, use a URL like the following:http://localhost:8080/updategeometry/destination.qcd?updatefr omfile=source.qcd To update the geometry of an article in a QuarkXPress file using the geometry of a QuarkCopyDesk article file, use a URL like the Example, GET URL following:http://localhost:8080/updatecontent/destination.qxp?updatefro mfile=source.
USING QUARKXPRESS SERVER schema Modifier schema 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 Parameters modify the document pool. String Use the file: indicator to specify the path.Note that you can also include an XML file as part of a multipart HTTP request. Example GET URL http://QXPServer8:8080/project1.qxp?modify=file:sample.
USING QUARKXPRESS SERVER • “METADATA“ The following XML shows how some of these parameters work. 50 30 true HD:QuarkXPress:DocPool:Services.
USING QUARKXPRESS SERVER Text before external file file:NewText.doc Text after external file Response A preview of the QuarkXPress project with a new box created in the specified position. HTTP Error #404 QuarkXPress Server Error #–43 File not found.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER 5 5 10 10 Response A preview of the QuarkXPress project with new box created in specified position. HTTP Error #404 QuarkXPress Server Error #–43 This alert File not found. displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server. Bad filename/ HTTP Error #404 QuarkXPress Server Error #–37 This alert pathname.
USING QUARKXPRESS SERVER “CT_TEXT”; box.operation = “CREATE”; spread.box = new Box[]{box}; Use the following object hierarchy:ModifierRequest < Project < Layout < Spread < Box < Geometry Deleting boxes To delete a box, use the following parameters in the Modifier schema: • “BOX“ • “ID“ The following XML shows how these parameters work.
USING QUARKXPRESS SERVER OPERATION=”DELETE”> Notes You can use the xml namespace or Telegraph XTensions software to determine the ID or name of the box you want to delete.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER This text is 12pt and right justified. This is bold text. This text is bold, red, italic, and 20pt.
USING QUARKXPRESS SERVER If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/3/2005 11:27:42 — Logs jpeg/sample.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/5/2005 13:32:10 — Error — Error Code: 10006 — There is no box with the specified identifier.
USING QUARKXPRESS SERVER 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 schema: • “BOX “ • “ID“ • “PICTURE“ The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER There is no box with HTTP Error #500 This alert displays if the box the specified specified by the child text node of the identifier. element does not exist. The value of Scale Across should be between 10% and 1000%. The Value of Scale Down should be between 10% and 1000%. HTTP Error #500 This alert displays if the value of the child text node of a element is invalid.
USING QUARKXPRESS SERVER ANGLE=”30” FIT=”CENTERPICTURE” SKEW=”30” FLIPHORIZONTAL=”false”/> Request object names:ModifierRequest ModifierStreamRequest Project Box Picture Layout ModifierFileRequestFor ModifierFileRequest, the member contents are used to set the file path or send the XML itself. com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); if(!this.DocumentSettings1.documentName.Text.Equals(“”)) rc.documentName = this.DocumentSettings1.
USING QUARKXPRESS SERVER The following XML shows how some of these parameters work. C:\docs\file1.jpg file:C:\docs\file2.txt PAGE 125
USING QUARKXPRESS SERVER pathname If the request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file. For example: 8/5/2005 18:11:54 — Logs sample.qxp — Type: image/jpeg — Size: 65982 — Client: 127.0.0.1If an alert displays, an error message is written to the QuarkXPress Server error log file. For example:8/5/2005 18:01:59 — Error — Error Code: 10343 — A locked Layer cannot be manipulated.
USING QUARKXPRESS SERVER Layout[]{layout1}; request.contents = requestContents; rc.request = request; // Create the service and call it with QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.processRequest(rc); BoxParam XTensions software lets you import only files in the document pool.
USING QUARKXPRESS SERVER Some minor QuarkXPress features are not available through the Modifier schema. However, this schema represents the majority of all user-editable aspects of a QuarkXPress project. The deconstruct namespace/request no longer exists. If you try to use it in this version of QuarkXPress Server, an error is returned. Deconstructing a project The xml namespace returns an XML representation of the target project.
USING QUARKXPRESS SERVER parameter works only with the box parameter. Tells the xml namespace to describe elements using rather than . relativegeometry This allows an item’s position to be defined either in relation to the page or in relation to the entire spread. Use only with the relativegeometry parameter. Tells the xml namespace to describe elements using relativetopage elements in which ORIGIN@RELATIVETO=”page” (as opposed to “spread”).
USING QUARKXPRESS SERVER If the request succeeds, a transaction success message is written to the Logs QuarkXPress Server transaction log file. For example: 8/3/2004 17:16:11 — xml/sample.qxp — Type: text/xml — Size: 2364 — Client: 127.0.0.1 Example GET URL http://localhost:8080/xml/sample.
USING QUARKXPRESS SERVER Construct The construct namespace lets you create a QuarkXPress project using XML. Namespace construct schema Modifier schema The string or the path of the XML file that modify describes how to String create the project. Use the file: indicator to specify the path. Parameters Indicates the QuarkXPress version format to use. For qxpdocver 8|9 example:http://QXPSe rver8:8080/construct/ qxpdoc/project1.
USING QUARKXPRESS SERVER file failed to load in the picture box. Request Object Names:XMLRequest ConstructRequest ConstructFileRequest ConstructStreamRequest To construct a new QuarkXPress project by editing an existing document, first deconstruct a QuarkXPress project using code like the following:XMLRequest dcnstrq = new XMLRequest(); rc.request = dcnstrq; Next, alter the project by manipulating the XML.
USING QUARKXPRESS SERVER Working with pages and spreads The root element of a deconstructed QuarkXPress project is . Within each element are one or more elements. Each layout contains one or more elements, and each contains one or more elements. Each layout, spread, and page has a unique name, indicated by its element. Each layout can have a unique name, indicated by its element’s NAME attribute.
USING QUARKXPRESS SERVER For example, to create a master page based on the first user-defined master page in the Job Jackets file, you could use XML like the following: ...
USING QUARKXPRESS SERVER Scrollable Layout To create a layout using a specific height and width, use XML like the following: Scrollable Layout
USING QUARKXPRESS SERVER file:MyFile.jpg Column1 Column2 When QuarkXPress Server creates a new layout this way, it adds an automatic text box.
USING QUARKXPRESS SERVER 200 80 450 475 This is text in a box.
USING QUARKXPRESS SERVER can use different types of and elements in a element, but you can use only one element and one element per element. The FIT@POINT attribute lets you indicate the direction in which the box should grow or shrink. The available options are TOPLEFT, BOTTOMLEFT, TOPRIGHT, and BOTTOMRIGHT. The FIT@AVOIDBOXESBY attribute lets you specify the distance between the POINT side or corner of a resized box and any other items around it.
USING QUARKXPRESS SERVER Text in the second anchored box. More text in the second anchored box. Test between anchored boxes. file:example.
USING QUARKXPRESS SERVER Automatic column balancing The INLINEBOX@WIDTH attribute lets you specify the width of the anchored box as a percentage of its parent column or box. If you fill an anchored box with so much text that it expands to the height of its parent box, the text is adjusted to fit in the box. The INLINEBOX@SCALEUP attribute lets you control sizing for picture boxes. The childSHADOW element lets you specify drop shadow effects.
USING QUARKXPRESS SERVER file:Images/2pdf.PNG openfile 1 PDF/EconomicResearch.
USING QUARKXPRESS SERVER You can nest one group within another by adding a that refers to the child group, like so:
USING QUARKXPRESS SERVER determined by the order of the elements in the XML, from rearmost to frontmost. Working with pictures The element supports a variety of features, including the ability to specify runaround, opacity, and drop shadow characteristics. For more information, see the Modifier schema.
USING QUARKXPRESS SERVER Working with text Every element for text contains a element, and every element contains a element. A element can contain elements, each of which contains elements. A element can also simply contain elements. A text element can also contain a element that indicates the origin of the text in that box.
USING QUARKXPRESS SERVER Applying local formatting To apply local formatting to text, use the attributes of the element. For example: The sun has risen. To apply paragraph formatting, use a element. For example: The sun has risen.
USING QUARKXPRESS SERVER • Specify a pre-defined text shading style using the SHADINGSTYLENAME attribute of the element. • Specify a pre-defined text shading style using the NAME attribute of the element, within the PARAGRAPH/FORMAT nodes.
USING QUARKXPRESS SERVER In a element, the element indicates where the current box overflows when there is no subsequent box for text to flow into. A element also contains a element indicating how many words, characters, and lines should be allowed to fit in that box and whether the text currently fits in the box, is too short, or is too long. This information can be useful for on-the-fly copyfitting.
USING QUARKXPRESS SERVER To specify horizontal and vertical lines in a table, use XML like the following:
Creating tables To create a new table, use the following parameters in the Modifier schema: • “SPREAD“ • “TABLE“ • “COLSPEC“ • “COLUMN“ • “ROW“ • “CELL“ The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER file:MacHD:xml:createTable.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.
USING QUARKXPRESS SERVER