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
namespace IDB.DocumentGenerator.SDK.DTO

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type DocumentBase64File() = 
        member val ContentType:String = null with get,set
        member val Content:String = null with get,set

    [<AllowNullLiteral>]
    type GenerateWordPrintableDocumentResponse() = 
        ///<summary>
        ///The file to print
        ///</summary>
        [<ApiMember(Description="The file to print")>]
        member val File:DocumentBase64File = null with get,set

    type PrintLogoStyle =
        | Colour = 0
        | Invisible = 1

    [<AllowNullLiteral>]
    type WordPageSetup() = 
        member val FirstPageTray:Int32 = new Int32() with get,set
        member val OtherPagesTray:Int32 = new Int32() with get,set

    ///<summary>
    ///Generate a (corporate identity) printable document based on an existing document registration or working file.
    ///</summary>
    [<Api(Description="Generate a (corporate identity) printable document based on an existing document registration or working file.")>]
    [<AllowNullLiteral>]
    type GenerateWordPrintableDocument() = 
        ///<summary>
        ///ID of the current document registration
        ///</summary>
        [<ApiMember(Description="ID of the current document registration", IsRequired=true)>]
        member val RegisteredDocumentID:Guid = new Guid() with get,set

        ///<summary>
        ///The unsaved active document to print instead of the saved document.
        ///</summary>
        [<ApiMember(Description="The unsaved active document to print instead of the saved document.")>]
        member val WorkingFile:DocumentBase64File = null with get,set

        ///<summary>
        ///When printing on stationary use PrintLogoStyle.Hidden to remove subsidary logo's from the document
        ///</summary>
        [<ApiMember(Description="When printing on stationary use PrintLogoStyle.Hidden to remove subsidary logo's from the document")>]
        member val LogoStyle:PrintLogoStyle = new PrintLogoStyle() with get,set

        ///<summary>
        ///Represents a subset of the page setup properties of a section.
        ///</summary>
        [<ApiMember(Description="Represents a subset of the page setup properties of a section.")>]
        member val PageSetup:WordPageSetup = null with get,set

F# GenerateWordPrintableDocument DTOs

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

HTTP + CSV

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: text/csv
Content-Type: text/csv
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: text/csv
Content-Length: length

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