-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetXmpMetaData.php
More file actions
31 lines (27 loc) · 1.05 KB
/
Copy pathGetXmpMetaData.php
File metadata and controls
31 lines (27 loc) · 1.05 KB
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
<?php
// ========================================================================
// Author: DynamicPDF.COM CETE www.dynamicpdf.com
// Copyright: (c) 2021 DynamicPDF Cloud API
// License: MIT - for additional information see ./LICENSE in this project.
// Errors: Please report any errors in software to support@dynamicpdf.com
// ========================================================================
require __DIR__ . '/vendor/autoload.php';
include_once("constants.php");
use DynamicPDF\Api\PdfXmp;
use DynamicPDF\Api\PdfResource;
class GetXmpMetaData {
public static function Run(string $apikey, string $path)
{
$resource = new PdfResource($path . "fw4.pdf");
$pdfXmp = new PdfXmp($resource);
$pdfXmp->ApiKey = $apikey;
$response = $pdfXmp->Process();
if($response->IsSuccessful)
{
echo($response->Content);
} else {
echo($response->ErrorJson);
}
}
}
GetXmpMetaData::Run(CLIENT_EXAMPLES_API_KEY, CLIENT_EXAMPLES_BASE_PATH . "/get-xmp-metadata-pdf-xmp-endpoint/");