[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.PDFServices
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public void SetCategoryPdfProperties( ConnectionId connectionId, SessionId sessionId, CategoryId categoryId, bool enabled, CategoryId destinationCategoryId, NotificationType notificationType, PDFNotificationWhen notificationWhen, bool allowCustomData, bool autoArchive, bool traverseTree, string queryStrings, string optionsXml, PdfCategoryStatusFlags flags )
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). - categoryId
- Type: ContentStudio.DocumentCategoryId
The category to save data for - enabled
- Type: SystemBoolean
Indicates whether the category is enabled for PDF generation or not. - destinationCategoryId
- Type: ContentStudio.DocumentCategoryId
A category that acts as destination category for created PDF documents. This category mus exists and must be of the binary file type. - notificationType
- Type: ContentStudio.NotificationsNotificationType
The type of notification to send. - notificationWhen
- Type: ContentStudio.PDFServicesPDFNotificationWhen
Indicates when a notification should be sent. - allowCustomData
- Type: SystemBoolean
Determines if the caller can add their own settings when creating the pdf or if she must use the default settings of the category. - autoArchive
- Type: SystemBoolean
Reserved, currently not used, pass false - traverseTree
- Type: SystemBoolean
Set to true to indicate that the pdf should be generated from the passed in document and all its child documents. - queryStrings
- Type: SystemString
Query strings to pass along to the documents when browsing them. This parameter cannot exceed MAX_PDF_QUERYSTRING_LENGTH characters in length. - optionsXml
- Type: SystemString
Xml that contains settings. This value cannot exceed MAX_PDF_OPTIONSXML_LENGTH characters in length not included the embedded footer xml element.
NoteThis xml is a combination of the footerxml and optionsxml data. See the remarks section for information on how this xml is combined
- flags
- Type: ContentStudio.PDFServicesPdfCategoryStatusFlags
Additional flags used by the PDF server.
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
CSPermissionDeniedException | The caller has no permission to perform the requested action |
CSInvalidSessionException | The session is invalid |
CSInvalidParameterException | A parameter has an invalid value |
ArgumentNullException | Either queryStrings or optionsXml was null. |
SqlException | An error occurred when executing the command against the Content Studio database |
Note to the xml based optionsXml parameter.
This xml is created by adding a new xml element to the options xml named footerxml. The value of this element is then the actual footerXml.
<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> <iefooterxml> (Embedded footer xml) </iefooterxml> </root>
For a detailed description of the optionsXml and footerXml see the GetCategoryProperties method
The footerXml and optionsXml is stored independently of each other in the database so before the data is stored in the database these two documents are extracted and parsed prior to the actual save operation.