DigiOffice Gateway Web Services

<back to all web services

GenerateWordPrintableDocument

Generate a (corporate identity) printable document based on an existing document registration or working file.

Requires Authentication
The following routes are available for this service:
All Verbs/api/documentgenerator/word/generateprintabledocument
import Foundation
import ServiceStack

/**
* Generate a (corporate identity) printable document based on an existing document registration or working file.
*/
// @Api(Description="Generate a (corporate identity) printable document based on an existing document registration or working file.")
public class GenerateWordPrintableDocument : IGenerateWordPrintableDocument, IRegisteredDocumentRequest, Codable
{
    /**
    * ID of the current document registration
    */
    // @ApiMember(Description="ID of the current document registration", IsRequired=true)
    public var registeredDocumentID:String?

    /**
    * The unsaved active document to print instead of the saved document.
    */
    // @ApiMember(Description="The unsaved active document to print instead of the saved document.")
    public var workingFile:DocumentBase64File?

    /**
    * When printing on stationary use PrintLogoStyle.Hidden to remove subsidary logo's from the document
    */
    // @ApiMember(Description="When printing on stationary use PrintLogoStyle.Hidden to remove subsidary logo's from the document")
    public var logoStyle:PrintLogoStyle?

    /**
    * Represents a subset of the page setup properties of a section.
    */
    // @ApiMember(Description="Represents a subset of the page setup properties of a section.")
    public var pageSetup:WordPageSetup?

    required public init(){}
}

public class DocumentBase64File : Codable
{
    public var contentType:String?
    public var content:String?

    required public init(){}
}

public enum PrintLogoStyle : String, Codable
{
    case Colour
    case Invisible
}

public class WordPageSetup : Codable
{
    public var firstPageTray:Int?
    public var otherPagesTray:Int?

    required public init(){}
}

public class GenerateWordPrintableDocumentResponse : IGenerateWordPrintableDocumentResponse, Codable
{
    /**
    * The file to print
    */
    // @ApiMember(Description="The file to print")
    public var file:DocumentBase64File?

    required public init(){}
}


Swift GenerateWordPrintableDocument DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/documentgenerator/word/generateprintabledocument HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RegisteredDocumentID":"00000000-0000-0000-0000-000000000000","WorkingFile":{"ContentType":"String","Content":"String"},"LogoStyle":"Colour","PageSetup":{"FirstPageTray":0,"OtherPagesTray":0}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"File":{"ContentType":"String","Content":"String"}}