Products Technologies Demo Docs Blog Support Company

New ReportingCloud Endpoint: Creating Document Thumbnails

We released a new endpoint that creates thumbnails of documents that can be uploaded in the supported document formats DOC, RTF, DOCX, PDF and XLSX.

New ReportingCloud Endpoint: Creating Document Thumbnails

We just released a new endpoint to the ReportingCloud Web API to create image thumbnails of documents. Until now, only templates from the template storage could be used to create thumbnails. The new endpoint allows you to upload a document in the request payload in various formats to create image thumbnails of specified pages.

https://api.reporting.cloud/v1/document/thumbnails

The following settings can be passed as query parameters to specify the zoom factor, the required page numbers and the image format:

Parameter Value Type Value description
zoomFactor Integer Optional. An Integer value between 1 and 400 to set the percentage zoom factor of the created thumbnail images. Default value: 100.
fromPage Integer Optional. An Integer value that specifies the first page. By default the first page is selected.
toPage Integer Optional. An Integer value that specifies the last page. By default the last page is selected.
imageFormat String Optional. A string value that defines the image format of the returned thumbnails. Possible values are PNG, JPG, GIF and BMP. By default, the return format is PNG.

The document needs to be posted in the request payload in one of the following document formats encoded as a Base64 string:

  • DOC
  • DOCX
  • PDF
  • TX
  • XLSX
  • RTF
  • HTML

The following code uses the ReportingCloud .NET SDK to create thumbnails of an uploaded document:

ReportingCloud rc = new ReportingCloud(sUsername, sPassword, uriBasePath);

// upload 1 more document with unique file name
byte[] bDocument = File.ReadAllBytes("documents/invoice.tx");

// create thumbnails
List<System.Drawing.Image> images = rc.GetDocumentThumbnails(bDocument, 20, 1, 2, ImageFormat.PNG);

// check, if images are created
Console.WriteLine(images.Count().ToString() + " image thumbnails have been created.");

Happy coding!

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ReportingBASTAConference

Impressions from BASTA! Spring 2019

This week, we sponsored BASTA! 2019 and presented the new, innovative features of our word processing and reporting components.


ReportingConferenceNDC London

Impressions from NDC London 2019

Last week, we sponsored NDC London 2019 and presented our latest version X16 and the new, innovative features of our word processing and reporting components.


CodeMashConferenceRelease

Impressions from CodeMash 2019 in Sandusky, Ohio

This week, we sponsored CodeMash 2019 in Sandusky, Ohio and exhibited to show our latest versions and products.


ReportingAzureExcel

ReportingCloud: Backend Updated to TX Text Control X16

We just updated ReportingCloud to the latest version of TX Text Control X16 that comes with loads of new features that can be used in the reporting Web API now as well.


ReportingReleaseReportingCloud

New ReportingCloud Endpoint: Appending Documents

We released a new endpoint to the ReportingCloud Web API to append documents.