Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/4dc8fb2c4722d8729b3f323530306d35 to your computer and use it in GitHub Desktop.
Save bjoerntx/4dc8fb2c4722d8729b3f323530306d35 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Drawing;
using TXTextControl.ReportingCloud;
class RCSamples
{
public static void GetTemplateThumbnails(string templateName)
{
ReportingCloud rc = new ReportingCloud(
"username",
"password",
new Uri("https://api.reporting.cloud"));
try
{
List<Image> lstThumbnails = rc.GetTemplateThumbnails(
templateName, 20, 1, 0, ImageFormat.PNG);
foreach (Image img in lstThumbnails)
{
string sImageFilename = Guid.NewGuid().ToString() + ".jpg";
img.Save(sImageFilename, System.Drawing.Imaging.ImageFormat.Jpeg);
Console.WriteLine("Image saved to: " + sImageFilename);
}
}
catch (Exception e)
{
Console.WriteLine("An error occurred: " + e.Message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment