[This is preliminary documentation and is subject to change.]
This method is new in CS 5.2
Namespace: ContentStudio.PDFServices
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public string NextInQueue( ConnectionId connectionId, SessionId sessionId, string serverThreadIdentifier )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - serverThreadIdentifier
- Type: SystemString
A value that the PDF server can use to identify its instance and thread. Content Studio uses this value when it logs information to its event log. This parameter can be null (Nothing in Visual Basic but its length cannot exceed MaxServerThreadIdentifierSize characters.
Return Value
Type: String
Xml.
If no item was found, the pdfitem element node will be missing.
<root> <status>0</status> <statustext>Success</statustext> <pdfitem> <queueentryid></queueentryid> <siteurls></siteurls> <documentid></documentid> <documentrevision></documentrevision> <documentname></documentname> <documentguid></documentguid> <destinationcategoryid></destinationcategoryid> <destinationdocumentid></destinationdocumentid> <entrydate></entrydate> <submitter></submitter> <optionsxml></optionsxml> <issynchronous></issynchronous> <synchronousdraftprefered></synchronousdraftprefered> <parsetree></parsetree> <querystrings></querystrings> <autoarchive></autoarchive> <flags></flags> <footerxml></footerxml> </pdfitem> </root>
This xml has the following elements and meaning. If no data is found the root/pdfitem node and its children is missing
element | Description |
---|---|
root/status | The outcome of the call - always 0 (success) |
root/statustext | The textual outcome of the call - always "Success" |
root/pdfitem | Represents the returned item and its data nodes |
root/pdfitem/queueentryid | Integer: The identifier of the queued item. |
root/pdfitem/siteurls |
String: A semi colon separated list of url:s to the web site. Ex.
The first member in the list is always the SiteURL setting which is required and considered as being the default url to use. If there are more url:s that can be used, these follow in the order in which they exist in the MultiHomedSiteURL setting. All values ends with a "/"
A PDF server uses this value to construct the address (url) to the documents to be converted to
a PDF. It does so by constructing a url using the following template:
|
root/pdfitem/documentid |
Integer: The document to use as source of the Pdf.
The PDF server process must have BROWSE permission to this document. If the document is the root of a tree of documents, PDF Server must have BROWSE permission to all of these documents. |
root/pdfitem/documentrevision | Integer: The revison of the document's content to use. |
root/pdfitem/documentname | String: The name of the document returned in the root/pdfitem/documentid element. |
root/pdfitem/destinationcategoryid | Integer: An identifier to the category where the generated Pdf should be uploaded to. |
root/pdfitem/destinationdocumentid | Integer: If there is an older version of the pdf to generate and this version should be replaced this value is the identifier of this document. |
root/pdfitem/entrydate | DateTime string value. A value that specifies when the found entry was submitted. |
root/pdfitem/submitter | String: A SID representing the user account that submitted this item. |
root/pdfitem/optionsxml | String: An embedded xml document that specifies how the pdf should be rendered. See below for a description of this xml. |
root/pdfitem/issynchronous | Bit value (0 or 1), true (1) if the entry is synchronous; otherwise, false (0). |
root/pdfitem/synchronousdraftprefered | Bit value (0 or 1), valid for synchronous items only. When true (1) the Pdf server should use the draft version of the document rather than the approved. This makes it possibly to preview a pdf. |
root/pdfitem/parsetree | Bit value (0 or 1), when true(1); the Pdf server should traverse through the tree of documents and build combine all documents into one single Pdf document. |
root/pdfitem/querystrings | String: Additional query strings that the Pdf server should use when it browses the document to use as source. |
root/pdfitem/autoarchive | Bit value (0 or 1), indicates whether to archive older versions of this pdf. |
root/pdfitem/flags | Integer flag value: One or more of the members in the PdfQueueFlags enumeration. |
root/pdfitem/footerxml | String: An embedded xml document that contains the footer settings to use. See below for a description of this xml. |
Xml returned in the optionsxml element
<root> <author>No author</author> <keywords>keyword</keywords> <subject>No subject</subject> <papersize>9</papersize> <orientation>1</orientation> <printquality>4</printquality> <printresolution>300</printresolution> <resolution>300</resolution> <truetypeoption>2</truetypeoption> <scaling>100</scaling> <leftmargin>10</leftmargin> <rightmargin>10</rightmargin> <topmargin>10</topmargin> <bottommargin>10</bottommargin> <waitbeforeprint>2</waitbeforeprint> <domain>.</domain> <timeout>60</timeout> <printertimeout>120</printertimeout> <totaltimeout>60</totaltimeout> <colorimageflags /> <colorimageresolution>600</colorimageresolution> <ieheader></ieheader> <iefooter></iefooter> </root>
This xml has the following elements and meaning
element | Description |
---|---|
root/author | String: The author of the document |
root/keywords | String: A list of keywords to use |
root/subject | String: The document title (subject) |
root/papersize |
Integer: a value that specifies the paper size to use.
|
root/orientation |
Integer: The orientation of the page.
Can be one of the values
|
root/printquality |
Integer: a value that indicates the quality requested. One of the following values.
|
root/printresolution | Integer: A value (in dpi) that specifies the printer resolution. |
root/resolution | Integer: A value (in dpi) that specifies the resolution. |
root/truetypeoption | Integer: 2. |
root/scaling | Integer: a value (in percent) that specifies how the pdf is scaled. |
root/leftmargin | Integer: a value that specifies (in mm) the left margin of the generated Pdf. |
root/rightmargin | Integer: a value that specifies (in mm) the right margin of the generated Pdf. |
root/topmargin | Integer: a value that specifies (in mm) the top margin of the generated Pdf. |
root/bottommargin | Integer: a value that specifies (in mm) the bottom margin of the generated Pdf. |
root/waitbeforeprint | Integer: A value (in seconds) for the Pdf Server to wait before it starts printing the pdf. |
root/domain | String: |
root/timeout | Integer: A value (in seconds) that specifies general time out value. |
root/printertimeout | Integer: A value (in seconds) that specifies the pdf printer time out. |
root/colorimageflags | Integer: |
root/colorimageresolution | Integer: A value (in dpi) specifying the printer color resolution. |
root/ieheader | String: |
root/iefooter | String: |
Xml returned in the footerxml element
<root> <usefooter>1</usefooter> <startfrompage>1</startfrompage> <startnumber>1</startnumber> <createcontext></createcontext> <includecontextinnumbering></includecontextinnumbering> <footertext>Page $currentpage of $totalpages</footertext> <footerleft>10</footerleft> <footertop>7</footertop> <footerwidth>100</footerwidth> <htmlfont_normal></htmlfont_normal> <htmlfont_bold></htmlfont_bold> <htmlfont_italic></htmlfont_italic> </root>
this xml has the following elements and meaning
element | Description |
---|---|
root/usefooter | Bit value (0 or 1), true (1) to include a page footer with each generated Pdf page; otherwise, false(0). |
root/startfrompage | Integer: The page to start numbering from. 1 is the very first page in the generated Pdf. |
root/startnumber | Integer: The value of the first page number to write. |
root/createcontext | Bit value (0 or 1), true (1) if the Pdf server should create a context (index) page; otherwise, false |
root/includecontextinnumbering | Bit value (0 or 1), true (1) to have the Pdf server to include context numbering. |
root/footertext | String: The text to display as the footer. Depending on the actual Pdf server implementation this text can contain markings that the Pdf server replaces with actual values ex. Page $currentpage of $totalpages might be replaced with the text Page 3 of 45 on page number 3 of a total of 45 pages. It is up to the actual Pdf server implementation to define the actual markers to use. |
root/footerleft | Integer: the bottom margin (in mm) of the page footer. |
root/footertop | Integer: the top margin (in mm) of the page footer. |
root/footerwidth | Integer: the width (in mm) of the page footer. |
root/htmlfont_normal | String: The font to use for normal page footer text. |
root/htmlfont_bold | String: The font to use for bold page footer text. |
root/htmlfont_italic | String: The font to use for italic page footer text. |
Exception | Condition |
---|---|
ArgumentOutOfRangeException | The value of the serverThreadIdentifier parameter is too long. |
CSInvalidSessionException | The session is invalid |
CSPermissionDeniedException | The caller has no permission to perform the requested action |
XmlException | Invalid xml returned from the database. |
SqlException | An error occurred when executing the command against the Content Studio database |
Note |
---|
This method is intended to be called by a Pdf server only. |
A Pdf server uses this call when it queries the Pdf queue to get an item to be processed. If an item is returned the Pdf status queue flag is set to Processing and the item is locked for any other Pdf server threads.