English
  1. Home
  2. Metadata
  3. GetMetadata

GetMetadata

Get document metadata using the "GetMetadata" method

copy
Something went wrong, try again
copy
            
                    
        
Body parameter
Parameter VALUE DESCRIPTION

metadataGetRequest

Required

copy
MetadataGetRequest Get Metadata
MetadataGetRequest
Parameter VALUE DESCRIPTION

PdfBase64File

Required

close-icon
string Base64 encoded PDF document to process
copy Copy to clipboard
        
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.conholdate.cloud/v5.0/pdf/metadata/get"
  method := "POST"

  payload := strings.NewReader(`{
      "PdfBase64File": "Base64 encoded file...",
    }`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
                   
         
            
File file = new File("path/to/file/fileName.pdf");
byte[] encoded = Base64.encodeBase64(FileUtils.readFileToByteArray(file));
String base64EncodedFile = new String(encoded, StandardCharsets.US_ASCII);

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, 
    "{" +
      "\"PdfBase64File\": \"" + base64EncodedFile + "\"," +
    "}");

Request request = new Request.Builder()
  .url("https://api.conholdate.cloud/v5.0/pdf/metadata/get")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
                   
        
            
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.conholdate.cloud/v5.0/pdf/metadata/get',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
      "PdfBase64File": "Base64 encoded file...",
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                   
        
            
import requests
import json

url = "https://api.conholdate.cloud/v5.0/pdf/metadata/get"

json_data = json.dumps({
      "PdfBase64File": "Base64 encoded file...",
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=json_data)

print(response.text)
                   
        
            
curl --location --request POST 'https://api.conholdate.cloud/v5.0/pdf/metadata/get' \
--header 'Content-Type: application/json' \
--data-raw '{
      "PdfBase64File": "Base64 encoded file...",
}'
                   
        
            
require "uri"
require "json"
require "net/http"

url = URI("https://api.conholdate.cloud/v5.0/pdf/metadata/get")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
      "PdfBase64File": "Base64 encoded file...",
})

response = https.request(request)
puts response.read_body

                   
        
            
var client = new RestClient("https://api.conholdate.cloud/v5.0/pdf/metadata/get");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
var body = "{" + 
      "\"PdfBase64File\": \"" + base64EncodedFile + "\"," +
"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
                       
            
Overview

About GetMetadata Method

This page provides comprehensive instructions on how to use our cloud-based API for retrieving metadata from a PDF file in various programming languages, such as Go, Java, PHP, Python, Curl, Ruby, and C#. The Document API offers a "GetMetadata" method that allows you to extract metadata from a PDF document while preserving its quality as much as possible. This method ensures that the metadata is retrieved accurately without compromising the integrity or quality of the original PDF file.


Programming languages the API is compatible with

The API uses the REST protocol, making it compatible with a wide range of programming languages, including but not limited to: Go, Java, PHP, Python, Curl, Ruby, C#.

Easy to use

Our API Reference and Guide is designed to be straightforward and easy to use, providing all the information you need to get started quickly. Additionally, our API Libraries come with their own set of documentation, making integration into your application a breeze. With our comprehensive resources, you can efficiently leverage our API to meet your needs.

Secure

At our company, we place a high priority on your security and privacy. To protect your private data, we never store it in our environment and offer isolated options. We understand the importance of keeping your information safe and take all necessary measures to ensure that it remains secure.
Get Metadata
clock
Add a File
To ensure successful file processing and accurate extraction of metadata using the "GetMetadata" method, it is important to ensure that the file you intend to work with matches the one specified in the method. This ensures that the metadata is extracted correctly from the intended PDF file.
arrow
clock
Run the Code
To run the code, copy and paste it into a file and execute it from the same directory where you added the necessary files. For further details, refer to our language-specific guides on how to get started.
arrow
clock
View the Result
To view the results, simply open the file that you receive as the output. This file should be located in your project folder. If you choose to use the "GetMetadata" method online, once the metadata getting process is complete, the file will be automatically downloaded for your convenience.
clock
How long does it takes to get metadata of PDF file using GetMetadata method?
Metadata API (GetMetadata method) is designed for efficient and speedy file process. With our service, you can expect fast results, often in just a matter of seconds.
clock
It is safe to get metadata of a PDF file using Metadata API?
We understand the importance of ensuring the safety and privacy of your data. Rest assured that our company takes extensive measures to protect your information. We do not store any files you submit for getting metadata and process them only to provide you with the results. Your security and confidentiality are our utmost priorities.
clock
What can I expect as output from the "GetMetadata" method?
The "GetMetadata" method retrieves additional information about hidden or additional data in a PDF file that may not be visible at first glance. This metadata can provide valuable insights, context, and details about the underlying data, enhancing the understanding and management of digital files. You can obtain this information using the "GetMetadata" method offered by the API Metadata.
clock
How does “GetMetadata” method works?
With our user-friendly and seamless process, you can effortlessly upload your file, click the "POST" button, and wait for the results. Within a few seconds, you'll receive a file with the extracted information. If you wish to integrate this method into your project, you can easily copy and use the provided code examples in the programming language of your choice. Experience the simplicity and efficiency of our metadata extraction process!
FAQ

Frequently Asked Questions

We encourage you to review our Frequently Asked Questions (FAQ) section for answers to common inquiries. If you do not find the information you need, our dedicated support service is readily available to assist you with any additional questions or concerns. Don't hesitate to reach out for further assistance.