-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
35 lines (31 loc) · 1.22 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using DynamicPDF.Api;
using System;
namespace ImageInfoExample
{
class Program
{
static void Main(string[] args)
{
RunOne("DP.xxx-api-key-xxx", "c:/temp/dynamicpdf-api-usersguide-examples/");
RunTwo("DP.xxx-api-key-xxx", "c:/temp/dynamicpdf-api-usersguide-examples/");
}
public static void RunOne(String key, String basePath)
{
ImageResource imageResource = null;
imageResource = new ImageResource(basePath + "getting-started.png");
ImageInfo imageInfo = new ImageInfo(imageResource);
imageInfo.ApiKey = key;
ImageResponse response = imageInfo.Process();
Console.WriteLine(PrettyPrintUtil.JsonPrettify(response.JsonContent));
}
public static void RunTwo(String apiKey, String basePath)
{
String key = apiKey;
ImageResource imageResource = new ImageResource(basePath + "multipage.tiff");
ImageInfo imageInfo = new ImageInfo(imageResource);
imageInfo.ApiKey = apiKey;
ImageResponse response = imageInfo.Process();
Console.WriteLine(PrettyPrintUtil.JsonPrettify(response.JsonContent));
}
}
}