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 java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    /**
    * 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 static class GenerateWordPrintableDocument implements IGenerateWordPrintableDocument, IRegisteredDocumentRequest
    {
        /**
        * ID of the current document registration
        */
        @ApiMember(Description="ID of the current document registration", IsRequired=true)
        public UUID RegisteredDocumentID = null;

        /**
        * 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 DocumentBase64File WorkingFile = null;

        /**
        * 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 PrintLogoStyle LogoStyle = null;

        /**
        * 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 WordPageSetup PageSetup = null;
        
        public UUID getRegisteredDocumentID() { return RegisteredDocumentID; }
        public GenerateWordPrintableDocument setRegisteredDocumentID(UUID value) { this.RegisteredDocumentID = value; return this; }
        public DocumentBase64File getWorkingFile() { return WorkingFile; }
        public GenerateWordPrintableDocument setWorkingFile(DocumentBase64File value) { this.WorkingFile = value; return this; }
        public PrintLogoStyle getLogoStyle() { return LogoStyle; }
        public GenerateWordPrintableDocument setLogoStyle(PrintLogoStyle value) { this.LogoStyle = value; return this; }
        public WordPageSetup getPageSetup() { return PageSetup; }
        public GenerateWordPrintableDocument setPageSetup(WordPageSetup value) { this.PageSetup = value; return this; }
    }

    public static class DocumentBase64File
    {
        public String ContentType = null;
        public String Content = null;
        
        public String getContentType() { return ContentType; }
        public DocumentBase64File setContentType(String value) { this.ContentType = value; return this; }
        public String getContent() { return Content; }
        public DocumentBase64File setContent(String value) { this.Content = value; return this; }
    }

    public static enum PrintLogoStyle
    {
        Colour,
        Invisible;
    }

    public static class WordPageSetup
    {
        public Integer FirstPageTray = null;
        public Integer OtherPagesTray = null;
        
        public Integer getFirstPageTray() { return FirstPageTray; }
        public WordPageSetup setFirstPageTray(Integer value) { this.FirstPageTray = value; return this; }
        public Integer getOtherPagesTray() { return OtherPagesTray; }
        public WordPageSetup setOtherPagesTray(Integer value) { this.OtherPagesTray = value; return this; }
    }

    public static class GenerateWordPrintableDocumentResponse implements IGenerateWordPrintableDocumentResponse
    {
        /**
        * The file to print
        */
        @ApiMember(Description="The file to print")
        public DocumentBase64File File = null;
        
        public DocumentBase64File getFile() { return File; }
        public GenerateWordPrintableDocumentResponse setFile(DocumentBase64File value) { this.File = value; return this; }
    }

}

Java 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"}}