When the PDF Automation Server has to read and write document files, it uses an interface called a Content Provider. By default, the server is delivered with two Content Provider implementations, the File System Content Provider and the Alfresco Content Provider.
The File System Content Provider accesses files in a given folder in the local file system where the server is running. By default, this folder is set to a folder named “storage” in the Program Data folder. All files in the storage folder and subfolders will be accessible to any REST calls. The location of the storage folder is stored in the settings file for the server, and can be accessed through the PAS Manager, in Preferences -> REST -> Storage Directory.
The Alfresco Content Provider allows the server to work with documents stored in an Alfresco server. The properties to access the server, such as the server URL and the base folder are stored in a file called alfresco.properties in the Program Data folder.
additional information on setting up Alfresco can be found in Alfresco Setup
In addition to the default Content Providers, PDF Automation Server has the ability to use custom Content Providers. Custom made Content Providers allow the server to access documents that are stored in any system, local or remote, such as database systems, Amazon S3 buckets, etc. To achieve this, the server defines two interfaces that need to be implemented in Java and then registered with the server, to do this follow these steps:
After restarting the server, you can verify that your custom Content Provider was registered correctly by opening PAS Manager, and navigating to Preference -> REST. In this panel, there is s drop down called “Content provider” that will list all the Content Providers registered with the server.
You can download source code that implement sample Content Providers that work with the file system or with Amazon S3 from here:
https://www.qoppa.com/files/pdfautomation/PAS-ContentProvider.zip
For the Amazon S3 sample, you will need Amazon’s S3 client connector, the Maven dependency is:
< dependency >
< groupId > software.amazon.awssdk </ groupId >
< artifactId > s3 </ artifactId >
< version > LATEST </ version >
</ dependency >
Qoppa Software's PDF Automation Server for Windows, Linux, Unix, and macOS
Automate PDF Document Workflows through RESTful Web Services & Folder Watching
Copyright © 2002-Present Qoppa Software. All rights reserved.