How to create Metadata via Cloud PHP SDK
To create Metadata, we’ll use Aspose.PDF Cloud PHP SDK This Cloud SDK assists PHP programmers in developing cloud-based PDF creator, annotator, editor, and converter apps using PHP programming language via Aspose.PDF REST API. Simply create an account at Aspose for Cloud and get your application information. Once you have the App SID & key, you are ready to give the Aspose.PDF Cloud PHP SDK.
Package Manager Console Command
composer install
Steps to create a Metadata via Cloud PHP SDK
A basic adding metadata into pdfs programmatically with Aspose.PDF Cloud PHP SDK APIs can be done with just few lines of code.
- Install PHP SDK.
- Go to the Aspose Cloud Dashboard.
- Create a new Account to access all applications and services or Sign In to your account.
- Click on Applications in the left menu to get Client Id and Client Secret.
- Check out the Developer Guide to create a Metadata in PDF in PHP.
- Check out our GitHub repository for a complete API list along with working examples.
- Check out the API Reference page for the description of APIs parameters.
System Requirements
It is easy to get started with Aspose.PDF Cloud PHP SDK and there is nothing to install. Simply create an account at Aspose for Cloud and get your application information. Once you have the App SID & key, you are ready to give the Aspose.PDF Cloud PHP SDK.
- PHP 7.4 and later.
Create XMP Metadata Properties in PDF using PHP
$name = '4pages.pdf';
$this->uploadFile($name);
$date = '2024-10-27T09:59:52+02:00';
$metadata = new Aspose\PDF\Model\XmpMetadata(array(
'properties' => array(
# Add Default property
new Aspose\PDF\Model\XmpMetadataProperty(array('key' => "BaseURL", 'value' => "http://www.somename.com/path")),
# Add user defined property
new Aspose\PDF\Model\XmpMetadataProperty(array('key' => "pdf:Prop", 'value' => "PropValue", 'namespace_uri' => "http://ns.adobe.com/pdf/1.3/")),
)
));
Work with Metadata in PDF
Working with metadata in PDF files is important. Metadata such as the title field, author and theme help classify documents, making it easier to manage large collections of documents by providing a quick overview of content without opening files. Metadata also improves file search by allowing you to search by keywords and attributes. This is particularly valuable in systems where the rapid retrieval of documents is essential.
With our PHP library you can:
- Add PDF document’s header & footer in text or image format.
- Add tables & stamps (text or image) to PDF documents.
- Append multiple PDF documents to an existing file.
- Work with PDF attachments, annotations, & form fields.
- Apply encryption or decryption to PDF documents & set a password.
- Delete all stamps & tables from a page or entire PDF document.
- Delete a specific stamp or table from the PDF document by its ID.
- Replace single or multiple instances of text on a PDF page or from the entire document.
- Extensive support for converting PDF documents to various other file formats.
- Extract various elements of PDF files & make PDF documents optimized.
- You can try out our free App to add metadata into PDF files online and test the functionality.
- Learning Resources
- Documentation
- Source Code
- API References
- Product Support
- Free Support
- Paid Support
- Blog
- Why Aspose.PDF Cloud for PHP?
- Customers List
- Security