action pdfbroker_post_api_pdf_pdftoimage { label: "Generate an image of to provided pdf file" provider: pdfbroker method: POST path: "/api/pdf/pdftoimage" encoding: json input: { type: "object" properties: { Options: { type: "object" properties: { Height: { type: "integer" format: "int32" description: "Set the height of the output image, default value is width of source document. To scale height, and keeping proportions, do not set width;" } HorizontalResolution: { type: "number" format: "double" description: "Set the horizontal resolution, default is 96 dpi;" } ImageFormat: { type: "string" description: "Valid options are \"image/jpeg\", \"image/png\" or \"image/gif\". Default is \"image/png\"" } JpegQuality: { type: "integer" format: "int32" description: "Sets the quality of jpeg images, range 0 to 100, default is 75" } PageNumber: { type: "integer" format: "int32" description: "Which page of the pdf file to generate image from, default is first page" } PngCompressionLevel: { type: "integer" format: "int32" description: "Sets the png compression level, range 1 - 9, default is 6" } Transparent: { type: "boolean" description: "Keep the background of the image transparent. This setting is not available in JPEG-files, since transparency is not supported in the JPEG format." } VerticalResolution: { type: "number" format: "double" description: "Set the vertical resolution, default is 96 dpi;" } Width: { type: "integer" format: "int32" description: "Set the width of the output image, default value is width of source document. To scale width, and keeping proportions, do not set height;" } } additionalProperties: false } PdfFileBase64String: { type: "string" description: "The pdf file to generate image from, as Base64 encoded string." } } additionalProperties: false } output: { type: "object" description: "When setting the Accept-header in the request to \"application/json\" the image file will be return as Base64 encoded string. Note that converting data to Base64 encoded strings increases the response size with approximately 33%, if you can accept the a binary format it's better to use Accept-header \"image/jpeg\", \"image/png\" or \"image/gif\"." properties: { ErrorMessage: { type: "string" description: "If any error occurs the message will be displayed in here" } ImageBase64String: { type: "string" description: "The Base64 encoded string that is the image file. This is a complete data uri, including media type that can be used directly as src on a img-tag e.g." } } additionalProperties: false } }