This PDF Region Pro implementation users a custom package, UC_PDF_REGION_PRO_CUSTOM_PKG
, to store the document in Oracle Cloud (OCI).
Configure the Oracle Cloud connection at the bottom of the page in Oracle Cloud Bucket Settings.
Place the following in the Initialization PL/SQL Code
:
uc_pdf_region_pro.g_doc_getfileinfo := 'uc_pdf_region_pro_custom_pkg.uc_pdf_region_pro_oci_getfileinfo';
uc_pdf_region_pro.g_doc_create := 'uc_pdf_region_pro_custom_pkg.uc_pdf_region_pro_oci_create';
uc_pdf_region_pro.g_doc_update := 'uc_pdf_region_pro_custom_pkg.uc_pdf_region_pro_oci_update';
For this example to work, the DBMS_CLOUD package needs to be available. This package is available in the Oracle Cloud, or it can be installed in an Oracle Database 19.9 and above.
Reference to Oracle Support: How To Setup And Use DBMS_CLOUD Package (Doc ID 2748362.1).
As SYS, grant the following privileges to the Oracle schema where this sample application is installed.
grant create credential to USER;
grant execute on dbms_cloud to USER;
Next, run in SQL Workshop > SQL Commands the following to create the credentials to connect to the Oracle Cloud:
begin
dbms_cloud.create_credential (
credential_name => 'obj_store_cred',
username => 'user@email.com',
password => 'Auth Token'
) ;
end;
/
Finally, conditionally compile the UC_PDF_REGION_PRO_EXT_OCI_PKG package:
ALTER PACKAGE UC_PDF_REGION_PRO_EXT_OCI_PKG COMPILE PLSQL_CCFLAGS = 'DBMS_CLOUD:TRUE';