pdf-xmp
Use the pdf-xmp endpoint to extract xmp meta-data from a PDF.
Use the pdf-xmp
endpoint to extract xmp meta-data from a PDF. It uses an HTTP POST to send a PDF as binary and then returns the xmp metadata as an XML response.
Request/Response
Request | Request Data | Response |
---|---|---|
POST | PDF as byte array | XMP document containing metadata. |
The pdf-xmp
endpoint takes an HTTP POST form submission, where the PDF is sent as binary in the form's body.
POST https://api.dpdf.io/v1.0/pdf-xmp HTTP/1.1
Authorization: Bearer DP.xxx-api-key-xxx
Refer to pdf-xmp in the Client Libraries Users Guide section for this example using the DynamicPDF API's client libraries.
Parameters
The pdf-xmp
endpoint takes no parameters other than the Content-Type
and the Authorization
API Key.
Parameter | Value | Description | |
---|---|---|---|
Header | |||
Content-Type | application/pdf | Content type sent in request. | |
Accept | application/xml | The XMP data as XML document. | |
Authorization | Bearer DP.xxx-api-key-xxx | The API key. | REQUIRED |
Request Body | Type | ||
Body | binary | The PDF to analyze. | REQUIRED |
The PDF is sent to the endpoint as binary data. In this example request, the binary is coming from a file, but it could also come from a URL, a database, or other source.
Example cURL Request
curl -X POST "https://api.dpdf.io/v1.0/pdf-xmp"
-H "accept: application/json"
-H "Authorization: Bearer DP.xxx-api-key-xxx"
-H "Content-Type: application/pdf"
--data-binary "@c:/holding/pdf-xmp/fw4.pdf"
You could also use Postman to make the request.
Example Response
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.398682, 2009/08/10-13:00:47 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:format>application/pdf</dc:format>
<dc:subject>
<rdf:Bag>
<rdf:li>Fillable</rdf:li>
</rdf:Bag>
</dc:subject>
<dc:description>
<rdf:Alt>
<rdf:li xml:lang="x-default">Employee's Withholding Certificate</rdf:li>
</rdf:Alt>
</dc:description>
<dc:creator>
<rdf:Seq>
<rdf:li>SE:W:CAR:MP</rdf:li>
</rdf:Seq>
</dc:creator>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">2021 Form W-4</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool>
<xmp:MetadataDate>2020-12-31T09:12:43-05:00</xmp:MetadataDate>
<xmp:ModifyDate>2020-12-31T09:12:43-05:00</xmp:ModifyDate>
<xmp:CreateDate>2020-12-31T09:12:43-05:00</xmp:CreateDate>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
<pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer>
<pdf:Keywords>Fillable</pdf:Keywords>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/">
<xmpMM:DocumentID>uuid:01d97a6e-5605-44ae-8015-54a82bc56c5c</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:9d6007b3-eacb-4f13-8d6b-da9d46b7dfb3</xmpMM:InstanceID>
</rdf:Description>
<rdf:Description rdf:about=""
xmlns:desc="http://ns.adobe.com/xfa/promoted-desc/">
<desc:embeddedHref rdf:parseType="Resource">
<rdf:value>..\..\..\..\..\..\..\TFACS\Misc\logo\pencil.bmp</rdf:value>
<desc:ref>/template/subform[1]/subform[3]/draw[2]</desc:ref>
</desc:embeddedHref>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>
Further Information
You can also use one of DynamicPDF's provided client libraries to integrate the endpoints into your client applications if you prefer. For more information, refer to the relevant Users Guide sections:
- DynamicPDF API's Endpoints - (cloud-api-overview), and
- DynamicPDF API's Client Libraries - (cloud-api-client-libraries).