The main difference between thumbnail and preview
functionality is that preview tends to be more faithful
while thumbnail tends to elaborate on it, cropping
it by default and rounding the image if asked.
Preview should always output the file in its original format,
while thumbnail will convert it to an image.
There is no difference in quality between png and jpeg,
the difference in quality can be achieved only
by asking for a jpeg format and changing the quality parameter.
Asking for a GIF output can only be done when the input file is a GIF, otherwise it will raise and error.
URL obj = new URL("/preview/image/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /preview/image/{id}/{version}/{area}/thumbnail/
Get Thumbnail
Creates and returns a thumbnail of the image fetched by id and version
with the given size, quality, format and shape.
It will automatically crop the picture.
id: UUID of the image
version: version of the image
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/preview/image/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Creates and returns a thumbnail of the given image
with the given size, quality, format and shape.
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
This option will lose information, leaving it False will scale and
have borders to fill the requested size.
URL obj = new URL("/preview/image/{area}/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Creates and returns a preview of the given image
with the given size, quality and format
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
crop: True will crop the picture starting from the borders.
This option will lose information, leaving it False will scale and
have borders to fill the requested size.
URL obj = new URL("/preview/image/{id}/{version}/{area}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Creates and returns a preview of the image fetched by id and version
with the given size, quality and format
id: UUID of the image
version: version of the image
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
crop: True will crop the picture starting from the borders.
This option will lose information, leaving it False will scale and
have borders to fill the requested size.
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/preview/pdf/{id}/{version}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns a preview of the given file,
the pdf file will contain the first and last page given.
With default values will return all the pages.
id: UUID of the pdf.
version: version of the pdf.
first_page: integer value of first page to preview (n>=1)
last_page: integer value of last page to preview (0 = last of the pdf)
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/preview/pdf/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns a preview of the given file,
the pdf file will contain the first and last page given.
With default values will return all the pages.
file: file uploaded with FormData.
first_page: integer value of first page to preview (n>=1)
last_page: integer value of last page to preview (0 = last of the pdf)
URL obj = new URL("/preview/pdf/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns the thumbnail of the given file,
the image rendered will be the first page.
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
URL obj = new URL("/preview/pdf/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns a thumbnail of the file fetched by id and version
the image will be rendered from the first page.
id: UUID of the pdf.
version: version of the file.
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/preview/document/{id}/{version}/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns a pdf preview of the given file,
the pdf file will contain the first and last page given.
With default values will return all the pages.
id: UUID of the file.
version: version of the file.
first_page: integer value of first page to preview (n>=1)
last_page: integer value of last page to preview (0 = last of the file)
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/preview/document/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns a pdf preview of the given file,
the pdf file will contain the first and last page given.
With default values will return all the pages.
file: file uploaded with FormData.
first_page: integer value of first page to preview (n>=1)
last_page: integer value of last page to preview (0 = last of the pdf)
URL obj = new URL("/preview/document/{area}/thumbnail/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Create and returns the thumbnail of the given file,
the image rendered will be the first page.
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
URL obj = new URL("/preview/document/{id}/{version}/{area}/thumbnail/?service_type=files");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /preview/document/{id}/{version}/{area}/thumbnail/
Get Thumbnail
Create and returns a thumbnail of the file fetched by id and version
the image will be rendered from the first page.
id: UUID of the file.
version: version of the file.
quality: quality of the output image
(the higher you go the slower the process)
output_format: format of the output image
area: width of the output image (>=0) x
height of the output image (>=0), width x height => 100x200.
The first is width, the latter height, the order is important!
shape: Rounded and Rectangular are currently supported.
service_type: Service that owns the resource
(service that first uploaded the data to storage)
URL obj = new URL("/health/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/health/ready/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/health/live/");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());