USING QUARKXPRESS SERVER The code above adds @dataimport to the end of the box name to accommodate data import. The action of the form is defined by this line: document.getElementById("form1").action = url; This form's method is GET. The user agent gets the value (the URL) of the action, appends a ? to it, adds the form data set, and submits the URL. In this scenario, form data must be in ASCII.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER Example, object model com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext(); rc.documentName = this.DocumentSettings1.documentName.Text; rc.responseAsURL = this.DocumentSettings1.responseAsURL.Checked; rc.useCache = this.DocumentSettings1.useCache.Checked; rc.bypassFileInfo = this.DocumentSettings1.bypassFileInfo.Checked; //Create the service and call it QRequestContext object RequestService svc = new RequestService(); com.quark.qxpsm.QContentData qc = svc.
USING QUARKXPRESS SERVER closeSession getOpenDocs docName String Document to be closed. sessionId String Session in which document was opened. 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. Parameter Type Description sessionId String Session to be closed. Gets all the open documents in the session. If the session does not exist, an error is returned.
USING QUARKXPRESS SERVER sessionId openDoc String Session in which the document should be opened. 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. Parameter Type Description docName String Document (along with relative path if required) to be opened for modification. host String QuarkXPress Server instance which should be used for this document modification.
USING QUARKXPRESS SERVER far are saved in the new location. The open documents are not saved but have all of the changes made so far. sessionId saveDoc getXPressDOMEx String Session in which the document exists. 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).
USING QUARKXPRESS SERVER Members Name Types Description request QRequest QuarkXPress Server request that includes instances of request objects chained together. RequestParameters Description Generic class for executing any request and for adding dynamic properties to a request. Type Web service data object Members Name Type Description requestNamespace String Namespace of the request (for example, jpeg).
USING QUARKXPRESS SERVER Members Name Types Description contentType String The type of the response. For example, "text/xml" or "text/plain." textData String If the response type is text, this contains the text. Otherwise, this value is null. responseURL String If the responseAsURL parameter was set to "true" in the request, this contains the URL of the response. Otherwise, this value is null. streamValue binary If the response type is binary, this contains the byte array.
USING QUARKXPRESS SERVER Example, object model 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.
USING QUARKXPRESS SERVER • 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.
USING QUARKXPRESS SERVER 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. Understanding logging If a request succeeds, a transaction success message is written to the QuarkXPress Server transaction log file.
USING QUARKXPRESS SERVER Function Description QuarkXPress Server Manager object model classes qxpdoc Returns a QuarkXPress project file. QuarkXPressRenderRequest qxpr Returns an RLE Raw Custom format image. RLERawCustomRenderRequest raw Returns a project in a QuarkXPress internal format. RawCustomRenderRequest screenpdf Returns a low-resolution PDF file. ScreenPDFRenderRequest swf Returns a SWF file. SWFRenderRequest The default render type is JPEG.
USING QUARKXPRESS SERVER Studio Publishing Portal. For example: http://qxpserver:port/ appstudio/config Render modifier parameters layout String Lets you specify a layout by name or ID. The first layout is Layout 1. page Integer Lets you specify a page. pages String (page range) Lets you specify a range of pages. Response A .zip file containing an HTML5 article. Alerts The renderer for this image type has no HTTP Error #406 way of rendering the desired objects.
USING QUARKXPRESS SERVER name of that output style. For example: http://localhost:8080/ave/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Export AVE for iPad dialog box, use document. For example: http://localhost:8080/ave/ sample.qxp?outputstyle=document Render modifier parameters format String Lets you specify an output format. Use avemag for AVE-Mag or avedoc for AVE-Doc. The default is avemag.
USING QUARKXPRESS SERVER //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); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.
USING QUARKXPRESS SERVER produceblankpages 1 | 0 | true | false Lets you specify whether to render | yes | no blank pages. scale Float .1 to 6.92 Lets you specify a scaling for Windows .1 percentage. The valid values are to 8 on Mac OS from .1 (10%) to 8 (800%) on Mac OS or 6.92 (692%) on Windows. spread Integer Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page. layout String Lets you specify a layout by name or ID.
USING QUARKXPRESS SERVER requestCtx.setRequest(epsreq); //STEP3: Create the service and call the //processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx); Notes You can specify an output style and set additional local parameters of that output style.
USING QUARKXPRESS SERVER 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); Notes You can only create an ePUB file from a project that includes a reflow article. jpeg The jpeg render type returns a JPEG rendering of a page or spread.
USING QUARKXPRESS SERVER Example, GET URL http://localhost:8080/jpeg/sample.qxp?jpegquality=1 Example, object model Request object name: JPEGRenderRequest // 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.
USING QUARKXPRESS SERVER //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.
USING QUARKXPRESS SERVER Parameters outputstyle stylename, document Lets you specify an output style. To use a named output style, use the name of that output style. For example: http://localhost:8080/pdf/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Export as PDF dialog box, use document. For example: http://localhost:8080/pdf/ sample.qxp?outputstyle=document title String Lets you specify the title of the PDF file.
USING QUARKXPRESS SERVER offset 0–30 (in points) bleed pageitemsonly, Lets you specify a bleed type. symmetric offsetbleed 0–6 (in inches) Lets you specify a bleed offset to use. This option is available only when bleed is set to symmetric. spreads 1 | 0 | true | false | yes | no Lets you specify whether to output spreads. lowresolution 1 | 0 | true | false | yes | no Lets you request a low-resolution (36 dpi) PDF. colorimagedownsample 9–2400 Lets you specify the resolution of color images.
USING QUARKXPRESS SERVER produceblankplates yes | no Lets you specify whether to include blank plates. download 1 | 0 | true | false 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.
USING QUARKXPRESS SERVER This alert displays if you try to render an invalid page range. No file produced. The project requested contains only blank pages. HTTP Error #500 This alert displays if you try to render a a project that contains only blank pages. This Output Style does not exist. This alert displays if you specify a nonexistent 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.
USING QUARKXPRESS SERVER 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: http://localhost:8080/pdf/sample.qxp? outputstyle=mystylename&bleed=symmetric You can override settings in an output style.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER Render modifier parameters updateimage true | false Lets you specify whether to update imported pictures. updateflow true | false Lets you specify whether to update the text flow version of a project to the current version. page Integer Lets you specify a single page. pages String (page range) Lets you specify a range of pages. spread Integer Lets you specify a spread. The first spread is spread 1. In a facing-page document, spread 1 consists of the first page.
USING QUARKXPRESS SERVER requestCtx.setRequest(pscreq); // STEP3: Create the service and call the // processRequest() API RequestService service = new RequestServiceStub(); com.quark.qxpsm.QContentData data = service.processRequest(requestCtx); Notes To create a PostScript file, you must have a PostScript driver on the server computer. You can specify an output style and set additional local parameters of that output style.
USING QUARKXPRESS SERVER picdpi (72, 144, or 200) spreadrange (all or first) For example: http://localhost:8080/saveas/qcddoc/ 4.qxp?includepagepicture=1& quality=blackandwhite&picdpi=144& spreadrange=first http://localhost:8080/saveas/qcddoc/ PagePicture.qxp?includepagepicture=true Render modifier parameters modify Response A QuarkCopyDesk article. Alerts There is no box with the specified identifier. XML Lets you modify the article with XML. For more information, see "Using XML modify.
USING QUARKXPRESS SERVER Render modifier parameters layout String Lets you specify a layout by name or ID. The first layout is Layout 1. Response A QuarkXPress project. Alerts QuarkXPress document return is disabled. HTTP Error #500 The renderer for this image type has no way of rendering the desired objects. HTTP Error #406 This alert displays if Disable QXD Return is checked in the QuarkXPress Server administration interface (Administration > Preferences > General > Server).
USING QUARKXPRESS SERVER Parameters outputstyle stylename Lets you specify an output style. To use a named output style, use the name of that output style. For example: http://localhost:8080/screenpdf/ sample.qxp?outputstyle=stylename To use settings that have been captured with the Capture Settings in the QuarkXPress Print dialog box, use document. For example: http://localhost:8080/screenpdf/ sample.qxp?outputstyle=document title String Lets you specify the title of the PDF file.
USING QUARKXPRESS SERVER offset 0–30 (in points) Lets you specify the offset of registration marks. bleed pageitemsonly, symmetric Lets you specify a bleed type. offsetbleed 0–6 (in inches) Lets you specify a bleed offset to use. This option is available only when bleed is set to symmetric. spreads 1 | 0 | true | false | yes | no Lets you specify whether to output spreads. lowresolution 1 | 0 | true | false | yes | no Lets you request a low-resolution (36 dpi) PDF.
USING QUARKXPRESS SERVER Render modifier parameters produceblankplates yes | no Lets you specify whether to include blank plates. updateimage true | false Lets you specify whether to update imported pictures. updateflow true | false Lets you specify whether to update the text flow version of a project to the current version. page Integer Lets you specify a single page. pages String (page range) Lets you specify a range of pages. spread Integer Lets you specify a spread.
USING QUARKXPRESS SERVER com.quark.qxpsm.QContentData data = service.processRequest(requestCtx); swf The swf render type returns a SWF (Flash) rendering of a Print layout or an Interactive layout. Namespace SWF Parameters version swf6 | swf7 Lets you specify the minimum compatible version of Flash Player. layout string Lets you specify a layout by name or ID. The first layout is Layout 1. page string Lets you specify a single page.
USING QUARKXPRESS SERVER Response A single SWF file or a multipart reply containing an SWF file and a set of support files. A multipart reply can result if you render an Interactive layout that uses external assets -- for example, if the layout includes a Video object containing a video file that has been specified by choosing Choose from a drop-down menu.
USING QUARKXPRESS SERVER 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: Property Description box The box render modifier lets you render a single box. boxes The boxes render modifier lets you render multiple boxes. layer The layer render modifier lets you show and hide layers prior to rendering.
USING QUARKXPRESS SERVER • Creation of an anchored box or table without any reference to it from the parent box • Invalid ROWCOUNT, COLUMNCOUNT, or MERGE element • Invalid TABLEBREAK element • Invalid gridline attribute for a row or column • Invalid row or column creation • Invalid cell attributes • Invalid paragraph style sheet • Invalid character style sheet • Invalid conditional style • Invalid bullet or numbering style Parameters annotateerrors String Includes descriptions of rendering errors as not
USING QUARKXPRESS SERVER • Invalid row or column creation • Invalid cell attributes • Invalid paragraph style sheet • Invalid character style sheet • Invalid conditional style • Invalid bullet or numbering style Parameters appenderrors String Includes descriptions of rendering errors after the last page in the layout. Compatible with pdf, qxpdoc, xml, postscript Logs See Understanding logging Example GET URL http://localhost:8080/png/sample.
USING QUARKXPRESS SERVER When you render using the box parameter, the box ID has a higher priority than the box name. boxes The boxes render modifier lets you render multiple boxes. Parameters boxes String Lets you specify which boxes to render. overlap String Lets you specify whether to show the area overlapped by the specified boxes. Compatible with jpeg, png, raw Alerts There is no box with the specified identifier. HTTP Error #500 Cannot render box.
USING QUARKXPRESS SERVER Compatible with xml Alerts Invalid box given in Box Param. Logs Error #10401 This alert displays if you request a box that is not a Composition Zones item. See Understanding logging layer 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. Parameters layer String Lets you specify which layer to render. You can specify multiple layer names in one request.
USING QUARKXPRESS SERVER Alerts This layer does not exist. Please verify the layer name. HTTP Error #500 This alert displays if you specify an invalid layer name with the layer, layerattribute, or deletelayer parameter. Specify a layer name. HTTP Error #500 This alert displays if you do not specify a layer name with the layer, layerattribute, addlayer, or deletelayer parameter. A layer with the same name already exists. HTTP Error #500 Cannot change the name of the default layer.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER This page range is invalid. QuarkXPress Server Error #146 Invalid parameter value. QuarkXPress Server Error #10108 Logs See Understanding logging Example GET URL To move pages 2–3 to after page 5, use a URL like the following: http://localhost:8080/abc.qxp?movepages=2–3&afterpage=5 To move page 7 to the beginning of a layout, use a URL like the following: http://localhost:8080/abc.
USING QUARKXPRESS SERVER Example GET URL http://localhost:8080/png/sample.qxp?page=2 Example, object model 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 = "5"; page.operation = "CREATE"; spread.page = new Page[]{page}; To edit the properties of an existing page, use the following object hierarchy: ModifierRequest < Project < Layout < Spread < Page To delete a page, set its operation attribute to "DELETE".
USING QUARKXPRESS SERVER Alerts Invalid scale parameter. HTTP Error #500 This alert displays if an invalid 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. Parameters spread Integer Lets you specify which spread to render. Spread numbers start with 1. The first spread is spread 1.
USING QUARKXPRESS SERVER Example, GET URL http://localhost:8080/pdf/sample.qxp?spreads=true suppresserrors The suppresserrors render modifier forces QuarkXPress Server to render as much of a layout as it can, despite any errors that occur. Parameters suppresserrors String Forces the layout to 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 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.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER This alert displays if you supply an incorrect file name or the file is not available to QuarkXPress Server. The file path is invalid. HTTP Error #500 This alert displays if you supply an invalid path parameter. What to do: Specify the correct file path with the path parameter. The specified folder is Read-Only. Logs HTTP Error #500 This alert displays if you try to save a project to a folder with read-only access.
USING QUARKXPRESS SERVER layout String Lets you specify which layout to render. The first layout is layout 1. You can also specify a layout by name. paginate XML 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.
USING QUARKXPRESS SERVER 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.
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); Highlighting text in rendered output To apply highlighting to text in rendered output, use XML like the following.
USING QUARKXPRESS SERVER Response The updated QuarkXPress project. Logs 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.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1 If an alert is displayed, an error message is written to the QuarkXPress Server error log.
USING QUARKXPRESS SERVER 44 30 false 30 30 BRINGTOFRONT PAGE 97USING QUARKXPRESS SERVER contains an invalid tag value. Logs 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.qxp — Type: image/jpeg — Size: 31715 — Client: 127.0.0.1 If an alert displays, an error message is written to the QuarkXPress Server error log file. For example: Example GET URL When QuarkXPress Server is running on Windows, use a URL like the following: http://localhost:8080/sample.
USING QUARKXPRESS SERVER 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.
USING QUARKXPRESS SERVER • "TEXT (Modifier schema)" • "PICTURE (Modifier schema)" • "GEOMETRY (Modifier schema)" • "CONTENT (Modifier schema)" • "SHADOW (Modifier schema)" • "FRAME (Modifier schema)" The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER Example, GET URL When QuarkXPress Server is running on Windows, use a URL like the following: http://localhost:8080/sample.qxp?modify= file:C:\createBox.xml When QuarkXPress Server is running on Mac OS, use a URL like the following: http://localhost:8080/sample.qxp?modify= file:MacHD:xml:createBox.xml You can also supply a string that consists of valid XML commands. For example: http://localhost:8080/sample.
USING QUARKXPRESS SERVER Response A preview of the QuarkXPress project with the box deleted. Alerts File not found. HTTP Error #404 QuarkXPress Server Error #–43 This alert displays if you specify an invalid XML file or request a document that is not available to QuarkXPress Server. Bad filename/ pathname. HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path. Logs The XML document is not valid or well formed.
USING QUARKXPRESS SERVER To add a box to an existing group, use XML like the following: To remove a box from an existing group, use XML like the following:
USING QUARKXPRESS SERVER • "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.
USING QUARKXPRESS SERVER There is no box with the specified identifier. HTTP Error #500 The text size value is outside the valid range. HTTP Error #500 The specified color is not available to the document HTTP Error #500 The specified font is not available HTTP Error #500 This alert displays if the box specified by the child text node of an element does not exist. This alert displays if the value specified in a element is invalid. What to do: Specify a value between 2 and 720 points.
USING QUARKXPRESS SERVER For 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.documentName.
USING QUARKXPRESS SERVER • "PICTURE (Modifier schema)" The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER between 10% and 1000%. The value of HTTP Error #500 Offset Across is in This alert displays if the value of the child text node of the invalid range. element is invalid. The value of HTTP Error #500 Offset Down is in This alert displays if the value of the child text node of the invalid range element is invalid. The value of Picture Angle must be between –360 and 360 degrees.
USING QUARKXPRESS SERVER Project Box Picture Layout ModifierFileRequest For 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.documentName.
USING QUARKXPRESS SERVER To import text or image data into a project, use the following parameters in the Modifier DTD: • "BOX (Modifier schema) " • "ID (Modifier schema)" • "PICTURE (Modifier schema)" (this is not a required element when importing data) • "TEXT (Modifier schema)" • "STORY (Modifier schema)" • "CONTENT (Modifier schema)" The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER A locked layer cannot be manipulated. HTTP Error #500 Unable to read picture (#106) HTTP Error #500 This alert displays if you request data from a box on a locked layer. What to do: Open the project in QuarkXPress, display the Layers palette, and unlock the box's layer. QuarkXPress Server Error #–109 This alert displays if you try to import a text file into a picture box.
USING QUARKXPRESS SERVER RichText Text ID Box Layout ModifierFileRequest For 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.documentName.
USING QUARKXPRESS SERVER You can then use the construct namespace to create new QuarkXPress projects that are based on that Job Jackets file's resources and layout specifications. The jjname parameter exports QuarkXPress project resources and layout specifications to a Job Ticket. Resources defined at the Job Jackets level are not exported to the Job Ticket. Using XML deconstruct and construct The xml namespace deconstructs a project according to the Modifier DTD.
USING QUARKXPRESS SERVER An XML file that represents a deconstructed project does not contain all of the information necessary to reconstruct the project. The definitions of the project's resources (such as style sheets, colors, and master page definitions) are stored in a Job Jackets file. For example, you can apply a style sheet to a paragraph by indicating the style sheet’s name, like so: The sun has risen.
USING QUARKXPRESS SERVER deconstructing a QuarkXPress project, include copyfitinfo=true in the xml request. For example: http://localhost:8080/xml/sample.qxp? copyfitinfo=true Refer to the Modifier DTD Response Sample response: PAGE 115USING QUARKXPRESS SERVER 0 0 800 600 false
Logs If the request succeeds, a transaction success message is writ
USING QUARKXPRESS SERVER Every project created with the construct namespace must be based on a Job Ticket in a Job Jackets file. Using construct to create a project is roughly equivalent to using the File > New > Project from Ticket command in QuarkXPress. When you create a project using the construct namespace, you must supply the path to the Job Jackets file that will supply the project's resources.
USING QUARKXPRESS SERVER occur if an image or text file file mentioned in a element is invalid or missing. Bad filename/pathname. HTTP Error #404 QuarkXPress Server Error #–37 This alert displays if you specify an invalid file name or path. The XML document is HTTP Error #500 not valid or well formed. This alert displays if the XML you supply is not well-formed or do not adhere to the Modifier DTD. The XML document contains an invalid tag value.
USING QUARKXPRESS SERVER Notes The construct namespace takes two arguments: The name of the project to be created and a modify parameter with the string or the path of the XML file that describes how to create the project: http://localhost:8080/qxpdoc/construct/project1.qxp? modify=file:path to XML file on server http://localhost:8080/qxpdoc/construct/project1.qxp? modify= Construct and modify The modify parameter lets you modify existing projects.
USING QUARKXPRESS SERVER ... Each page has a POSITION attribute that indicates which side of the spine it is on. (In single-sided layouts, every page is given a POSITION of RIGHTOFSPINE). You can assign items to a page using the GEOMETRY element, which is a child of the BOX and TABLE elements.
USING QUARKXPRESS SERVER To create a layout using the server Job Jackets file's default settings, use XML like the following: Scrollable Layout To create a layout using a layout specification in the template's Job Jackets structure, use XML like the following:
USING QUARKXPRESS SERVER ...
This is the Heading This is the text file:MyFile.
USING QUARKXPRESS SERVER Working with boxes To add text and pictures to a project, you must add text boxes and picture boxes to the project’s element. Both are represented by elements, but text boxes have a BOXTYPE attribute of CT_TEXT, and picture boxes have a BOXTYPE attribute of CT_PICT.
USING QUARKXPRESS SERVER Fitting a box to text or a picture The element type lets you automatically adjust the size of a box to fit the text or picture in that box. The default behaivior is to not fix a box to its content. To use this feature, you must supply and elements. Each or element lets you specify a maximum or minimum size for the box, a maximum or minimum location for the resized box, or a maximum or minimum scale percentage for the box.
USING QUARKXPRESS SERVER Test before an anchored text box. file:example.docx Test between anchored text boxes. Text in the second anchored box. More text in the second anchored box.
USING QUARKXPRESS SERVER You can nest one group within another by adding a that refers to the child group, like so: <
USING QUARKXPRESS SERVER image.
USING QUARKXPRESS SERVER If you know the UID attribute of a box or story, you can insert text into that box or story without having to specify where the or element is. For example: New text New text Story IDs are unique across layouts.
USING QUARKXPRESS SERVER sun has risen. However, this XML would result in "has risen" being plain: The sun has risen. The default value for is "false.
USING QUARKXPRESS SERVER Working with tables To construct tables in XML, use a structure like the following:
100 100 600 400 PAGE 130USING QUARKXPRESS SERVER The following XML shows how some of these parameters work.
USING QUARKXPRESS SERVER table.geometry = geometry; table.rows = "2"; table.columns = "4"; table.maintainGeometry = "true"; table.operation = "CREATE"; spread.tables = new Table []{table}; Use the following object hierarchy: ModifierRequest < Project < Layout < Spread < Table To delete a table, provide the table's name or ID and set the operation attribute to "DELETE".
USING QUARKXPRESS SERVER Breaking a table across pages To break a table across pages, use XML like the following: ...USING QUARKXPRESS SERVER The number of rows in such a table is determined by the number of elements. The number of columns is determined by the maximum number of elements in a . In the element, each contains one or more elements. If you don't style the text in an element, it uses the default styling, which can be defined in a or element (see below). The element lets you create a repeating header for the table.USING QUARKXPRESS SERVER ...
USING QUARKXPRESS SERVER section start, you can specify a number format, a starting page number, and an optional prefix. For example: Once you have inserted a element, QuarkXPress Server will apply section-specific numbering and formatting to automatic page numbers.
USING QUARKXPRESS SERVER ... ... You can create a shared layout for use in a Composition Zones item like so: ...
USING QUARKXPRESS SERVER Working with lists The element allows you to construct and deconstruct QuarkXPress lists. Lists allow a user to automatically create a table of contents (TOC) or list of figures. For more information, see the Modifier DTD . PAGE 138USING QUARKXPRESS SERVER 210 Hello Box7 , world 0 0 50 75
USING QUARKXPRESS SERVER There are two types of placeholders supported in Modifier XML: Text placeholders and Text Node placeholders. Text placeholders can be placed around a run of text to identify particular metadata with that text content.
USING QUARKXPRESS SERVER To avoid hierarchy conflicts between the placeholder hierarchy and the paragraph hierarchy, the paragraph structure is flattened, which means that PARAGRAPH and RICHTEXT elements become siblings. In this case, the PARACHAR attribute is not applied, and the Modifier XML should include the &hardReturn; entity to represent paragraph break characters.
USING QUARKXPRESS SERVER Working with hidden text In QuarkXPress, hidden text is used by features which need to include information within the flow of text without that information being visible in its raw form, either on screen or at output. XTensions modules for QuarkXPress and QuarkXPress Server can use the data area in hidden text to store their custom data without changing the surrounding text.
USING QUARKXPRESS SERVER ID + the unique ID (more often than not, 1) + the sum of types of paren you wish to see (for example, to see OPENPAREN and CLOSEPAREN, you would calculate 0x20 + 0x40 = 0x60). For example, if you wanted to get only hidden text from the Custom Underline XTensions module, you would pass the request with the additional request parameter opcode=51526B61.
USING QUARKXPRESS SERVER The data within the RICHTEXT element inside a HIDDEN element is a Base 64-encoded representation of the raw data that is stored within the hidden text. Considering that hidden text in QuarkXPress can contain any type of data, and the structure of that data is specified by the XTensions software that creates it, this method ensures that the data can be safely represented in XML.
USING QUARKXPRESS SERVER 1 true60 true false false 4 Slideshow interactivity Below is an example of App Studio Slideshow interactivity.
USING QUARKXPRESS SERVER Video interactivity Below is an example of App Studio Video interactivity. false false false false 1 Video\abc.
USING QUARKXPRESS SERVER Web View interactivity Below is an example of App Studio Web View interactivity. true false false 2 http://www.gsmarena.
USING QUARKXPRESS SERVER • Page (PAGE). You must define Anchor hyperlinks at the level. Web hyperlinks You must define Web hyperlinks at the level. For example, to create a Web hyperlink named Quark-dot-com, you could add the following as a child of the element: To add a Web hyperlink to a layout, add HYERLINKREF and HLTYPE attributes to a or element.
USING QUARKXPRESS SERVER • QuarkXPress templates. • Picture files used in the template. • Modifier XML. • Picture and text files used in the Modifier XML. • Assets used by digital publishing enrichments. The Streaming Document Provider feature also supports keepdocopen requests. QuarkXPress Server searches for assets used in a call in the following order: 1 In the HTTP request. 2 At the supplied file path (if specified). 3 In the document pool.
USING QUARKXPRESS SERVER Addfile Use the addfile request handler to put a document or image file in the document pool. An addfile request is always a POST request because it uses binary content. If you send an addfile 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 uploaded to all registered QuarkXPress Server instances.
USING QUARKXPRESS SERVER const int BUFFER_SIZE = 10000; int nBytesRead = 0,iCount = 0; long remainingBytes = length — BUFFER_SIZE; if(remainingBytes > BUFFER_SIZE) { nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE); while(0 != nBytesRead) { iCount++; remainingBytes = length — (iCount * BUFFER_SIZE); if(remainingBytes > BUFFER_SIZE) nBytesRead = theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE); else { nBytesRead = theStream.
USING QUARKXPRESS SERVER To use this form: 1 Enter the name or IP address of the computer on which QuarkXPress Server is running. 2 Enter the port number in the port number field. 3 Enter the file name along with the extension in the file field. Click Browse if you need to find the file on your computer. The file will be uploaded with this name. 4 Click Submit. The file uploads to the document pool of the specified server. After the file is successfully uploaded, the "File upload completed.
USING QUARKXPRESS SERVER