POST | /api/documentgenerator/word/generateprintabledocument |
---|
export class DocumentBase64File
{
public ContentType: string;
public Content: string;
public constructor(init?: Partial<DocumentBase64File>) { (Object as any).assign(this, init); }
}
export class GenerateWordPrintableDocumentResponse implements IGenerateDraftDocumentResponse
{
/** @description The file to print */
// @ApiMember(Description="The file to print")
public File: DocumentBase64File;
public constructor(init?: Partial<GenerateWordPrintableDocumentResponse>) { (Object as any).assign(this, init); }
}
export enum PrintLogoStyle
{
Colour = 'Colour',
Invisible = 'Invisible',
}
export class WordPageSetup
{
public FirstPageTray: number;
public OtherPagesTray: number;
public constructor(init?: Partial<WordPageSetup>) { (Object as any).assign(this, init); }
}
/** @description 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.")
export class GenerateWordPrintableDocument implements IRegisteredDocumentRequest
{
/** @description ID of the current document registration */
// @ApiMember(Description="ID of the current document registration", IsRequired=true)
public RegisteredDocumentID: string;
/** @description 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 WorkingFile: DocumentBase64File;
/** @description 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 LogoStyle: PrintLogoStyle;
/** @description 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 PageSetup: WordPageSetup;
public constructor(init?: Partial<GenerateWordPrintableDocument>) { (Object as any).assign(this, init); }
}
TypeScript GenerateWordPrintableDocument DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: doapigw.baasbv.nl
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
WorkingFile:
{
ContentType: String,
Content: String
},
LogoStyle: Colour,
PageSetup:
{
FirstPageTray: 0,
OtherPagesTray: 0
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { File: { ContentType: String, Content: String } }