@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api PdfBroker.io API
@version v1
@auth OAuth2
@endpoints 16
@toc api(16)

@endpoint GET /api/pdf
@optional {X-Api-Version: str}
@errors {400, 415, 429}

@endpoint GET /api/v1/pdf
@errors {400, 415, 429}

@endpoint POST /api/pdf/xslfo
@optional {X-Api-Version: str, foDocumentBase64String: str, resources: map, metadata: map{title: str, author: str, subject: str, keywords: [str], enableAdd: bool, enableCopy: bool, enableModify: bool, enablePrinting: bool, ownerPassword: str, userPassword: str}}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/xslfo
@optional {foDocumentBase64String: str, resources: map, metadata: map{title: str, author: str, subject: str, keywords: [str], enableAdd: bool, enableCopy: bool, enableModify: bool, enablePrinting: bool, ownerPassword: str, userPassword: str}}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/xslfowithtransform
@optional {X-Api-Version: str, foDocumentBase64String: str, resources: map, metadata: map{title: str, author: str, subject: str, keywords: [str], enableAdd: bool, enableCopy: bool, enableModify: bool, enablePrinting: bool, ownerPassword: str, userPassword: str}, xmlDataDocumentBase64String: str}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/xslfowithtransform
@optional {foDocumentBase64String: str, resources: map, metadata: map{title: str, author: str, subject: str, keywords: [str], enableAdd: bool, enableCopy: bool, enableModify: bool, enablePrinting: bool, ownerPassword: str, userPassword: str}, xmlDataDocumentBase64String: str}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/pdftoimage
@optional {X-Api-Version: str, pdfFileBase64String: str, options: map{pageNumber: int(int32), imageFormat: str, horizontalResolution: num(double), verticalResolution: num(double), width: int(int32), height: int(int32), transparent: bool, jpegQuality: int(int32), pngCompressionLevel: int(int32)}}
@returns(200) {errorMessage: str?, imageBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/pdftoimage
@optional {pdfFileBase64String: str, options: map{pageNumber: int(int32), imageFormat: str, horizontalResolution: num(double), verticalResolution: num(double), width: int(int32), height: int(int32), transparent: bool, jpegQuality: int(int32), pngCompressionLevel: int(int32)}}
@returns(200) {errorMessage: str?, imageBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/pdfconcat
@optional {X-Api-Version: str, pdfDocumentsAsBase64String: [str]}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/pdfconcat
@optional {pdfDocumentsAsBase64String: [str]}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/pdfwritestring
@optional {X-Api-Version: str, pdfFileBase64String: str, options: map{text: str, textColor: map, font: map, pageNumber: int(int32), xPosition: num(float), yPosition: num(float), xOrigin: int(int32), yOrigin: int(int32)}, fontFileBase64String: str}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/pdfwritestring
@optional {pdfFileBase64String: str, options: map{text: str, textColor: map, font: map, pageNumber: int(int32), xPosition: num(float), yPosition: num(float), xOrigin: int(int32), yOrigin: int(int32)}, fontFileBase64String: str}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/weasyprint
@optional {X-Api-Version: str, url: str, htmlBase64String: str, resources: map, weasyPrintToPdfArguments: map}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/v1/pdf/weasyprint
@optional {url: str, htmlBase64String: str, resources: map, weasyPrintToPdfArguments: map}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429}

@endpoint POST /api/pdf/wkhtmltopdf
@optional {X-Api-Version: str, url: str, htmlBase64String: str, resources: map, wkHtmlToPdfArguments: map}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429, 503}

@endpoint POST /api/v1/pdf/wkhtmltopdf
@optional {url: str, htmlBase64String: str, resources: map, wkHtmlToPdfArguments: map}
@returns(200) {errorMessage: str?, pdfFileBase64String: str?}
@errors {400, 415, 429, 503}

@end
