Skip to content

Stamp Detection Tool Guide

Note:Before learning how to use different functions, we recommend that read the Request Workflow to know a basic PDF processing process. When using different functions, you can set their own special parameters when uploading files. Other basic steps are consistent.

Java Example:

Replace apiKey with the publicKey obtained from the dashboard, file with the file you want to convert, and language with your preferred interface error prompt language type.

java
import java.io.*;
import okhttp3.*;
public class main {
  public static void main(String []args) throws IOException{
    OkHttpClient client = new OkHttpClient().newBuilder()
      .build();
    MediaType mediaType = MediaType.parse("text/plain");
    RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
      .addFormDataPart("file","{{file}}",
 RequestBody.create(MediaType.parse("application/octet-stream"),
                                          new File("<file>")))
      .addFormDataPart("language","{{language}}")
      .addFormDataPart("password","")
      .build();
    Request request = new Request.Builder()
      .url("https://api-server.compdf.com/server/v1/process/documentAI/detectionStamp")
      .method("POST", body)
      .addHeader("x-api-key", "{{apiKey}}")
      .build();
    Response response = client.newCall(request).execute();
  }
}

Result:

File TypeDescription
.JSONStamp inspection results

Content:

ParameterDescription
costtime spent on form recognition
boxesEnter the location of all detected object boxes for the image
labelsThe labels of the detected objects.
scoresThe higher the score, the more reliable the result.
java
{
  "cost": 59,
  "boxes": [
      [
          913.0,
          399.0,
          1159.0,
          585.0
      ]
  ],
  "labels": [
      "Seal"
  ],
  "scores": [
      0.9240224957466125
  ]
}