Custom attributes
Component
All the plug-in region attributes available in the Oracle APEX page designer are listed and described below.
Settings
Type | Required | Dependent on |
---|---|---|
Checkbox | No | None |
Use the following options to set the plug-in configuration.
Disable Annotations
Checked | Not Checked |
---|---|
Annotation tool is not available | Annotation tool is available |
Disable Shapes
Checked | Not Checked |
---|---|
Shapes tool is not available | Shapes tool is available |
Disable Insert
Checked | Not Checked |
---|---|
Insert tool is not available | Insert tool is available |
Disable Edit
Checked | Not Checked |
---|---|
Edit tool is not available | Edit tool is available |
Disable Forms
Checked | Not Checked |
---|---|
Forms tool is not available | Forms tool is available |
Disable Fill and Sign
Checked | Not Checked |
---|---|
Fill and sign tool is not available | Fill and sign tool is available |
Disable Measurement
Checked | Not Checked |
---|---|
Measurement tool is not available | Measurement tool is available |
Source
The attribute defines how PDF Region Pro maintains documents. Depending on the attribute value, there are different implementations.
Default Table
When selected, PDF Region Pro maintains documents using the UC_PDF_DEFAULT_FILES
table.
The default table implementation supports built-in document versioning using the UC_PDF_DEFAULT_VERSIONS
table. Versioning must be enabled using the PL/SQL variable UC_PDF_REGION_PRO
in the Initialization PL/SQL Code attribute.
Custom Table
When selected, PDF Region Pro maintains documents using a table specification provided by a developer via the PDF Region Pro region attributes. A developer has to provide a table specification, including:
- Table name
- Primary key(s) column(s)
- Column name for a document BLOB content
- Column name for a document filename
- Column name for a document MIME Type
- Column name for a document's last modification time
- Column name for a document's current version (optional)
- Column name for a document owner
Custom PL/SQL
When selected, PDF Region Pro maintains documents using PL/SQL code provided by a developer. A developer has to create a package containing the required procedures for handling documents operations, such as:
-
UC_PDF_REGION_PRO.g_doc_getfileinfo
- fetching a document meta-data -
UC_PDF_REGION_PRO.g_doc_create
- saving (creating) a new file based on an empty template BLOB of the requested type -
UC_PDF_REGION_PRO.g_doc_update
- updating a document
The package name has to be entered into the Custom PL/SQL Package Name attribute, and procedure names must be provided using variables in the Initialization PL/SQL Code attribute. *Learn more in Custom Attributes \ Initialization PL/SQL Code*
Table Name
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A custom table name where documents are stored. The table name can be prefixed with #OWNER#
to reference the current parsing schema, ie. #OWNER#.UC_PDF_DEFAULT_FILES.
A custom table must have (at least) the following types of columns:
Description | Type |
---|---|
Column storing a document's primary key | VARCHAR2 | NUMBER |
Column storing a document's filename | VARCHAR2 |
Column storing a document's owner (an application end-user username) | VARCHAR2 |
Column storing a document's MIME-type | VARCHAR2 |
Column storing a document's current version | NUMBER |
Column storing a document's content | BLOB |
Column storing a document's last modification time | TIMESTAMP(6) |
Multiple Primary Keys | |
A custom table can use multiple primary keys to identify a document. Comma-delimited column names must be set using the Primary Key(s) Column(s) attribute. |
Primary Key(s) Column(s)
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
Specify a comma-delimited list of column names used as primary keys for a document in the custom table.
Item(s) Containing Primary Key(s) Value(s)
Type | Required | Dependent on |
---|---|---|
Page Item(s) | Yes | None |
A given APEX page item(s) is (are) used to identify a document to load from the database table. When any APEX item specified as the primary key is set to NULL
, the PDF Region Pro webviewer shows the document creation panel or read-only panel, depending on the plug-in attributes.
Content Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is BLOB
and stores a document's file contents.
Filename Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's filename (including the file extension).
MIME Type Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's file MIME type.
Last Update Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is TIMESTAMP(6)
and stores a document's last modification time.
Version Column
Type | Required | Dependent on |
---|---|---|
Text | No | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's current version.
Owner Column
Type | Required | Dependent on |
---|---|---|
Text | Yes | Source \ Custom Table |
A column name whose type is VARCHAR2
and stores a document's owner name (APEX user name).
Document Permissions
Type | Required | Dependent on |
---|---|---|
Select list | Yes | None |
Available options include:
- Everyone can read and edit
- Only the author can read and edit
- Everyone can read, but only the author can edit
- Custom function returning document permissions
Everyone can read and edit
PDF Region Pro allows all users to read and edit all requested files.
Only the author can read and edit
A document author is the APEX end-user username stored in the column OWNER
.
Everyone can read, but only the author can edit
PDF Region Pro allows all users to preview any file, but only the author can modify a document.
Custom function returning document permissions
The plug-in uses a custom PL/SQL function defined as the plug-in variable g_doc_func_file_perm
in Initialization PL/SQL Code attribute to distinguish the current end-user permission to the currently requested document.
Annotation User
Type | Required | Dependent on |
---|---|---|
Text | No | None |
This is the user name used to create annotations. The default value is Guest
.
Custom PL/SQL Package Name
Type | Required | Dependent on |
---|---|---|
Text | No | None |
This package executes the additional procedures and functions defined in the Initialization PL/SQL Code attribute.
Initialization PL/SQL Code
Type | Required | Dependent on |
---|---|---|
PL/SQL Code | No | None |
The attribute sets additional configuration options using the variables described below. The provided PL/SQL code is evaluated when the PDF Region Pro Editor is rendered.
Variables
g_default_versioning
Type | Used when | Example |
---|---|---|
Boolean | Source = Default Table | UC_PDF_REGION_PRO.g_default_versioning := true; |
UC_PDF_REGION_PRO.g_default_versioning := true;
When set to true
Saving a document results in:
- updating a document in the table
UC_PDF_DEFAULT_FILES
- creating a new version in the table
UC_PDF_DEFAULT_VERSIONS
When set to false
or when not defined
Saving a document results in updating a document in the table UC_PDF_DEFAULT_FILES
, but document versioning in the table UC_PDF_DEFAULT_VERSIONS
is ignored.
g_doc_func_file_perm
Type | Used when | Example |
---|---|---|
VARCHAR2(30) | Document Permissions = Custom function returning document permissions | UC_PDF_REGION_PRO.g_doc_func_file_perm := 'uc_pdf_region_pro_fn_file_perm'; |
Provide a function name returning the end-user permissions to the currently requested document.
The given function must:
- be declared in the package provided via Custom PL/SQL Package Name attribute
- accept the specified arguments (described below)
- return a
VARCHAR2
string containing the end-user permissions to the requested document
The function specification is the following:
function function_name(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_file_id in varchar2,
p_user_id in varchar2
) return VARCHAR2;
Parameter | Type | Description |
---|---|---|
p_application_id | NUMBER | An application ID in which the PDF Region Pro is running |
p_page_id | NUMBER | An application page ID in which PDF Region Pro is running |
p_session_id | NUMBER | An application session ID in which PDF Region Pro is running |
p_file_id | VARCHAR2 | A document ID. When PDF Region Pro uses a custom table and multiple primary keys, the value contains a comma-separated list of primary key values. |
p_user_id | VARCHAR2 | An APEX application end-user username |
Document permissions pattern |
The returned value from the function must follow the pattern C:L:U:S:R:P:E
where:
C
is permission to create a documentL
is permission to load a document,U
is permission to update a document,P
is permission to print a document,E
is permission to export a document
Allowed values are 0
and 1
, where:
0
is permission denied,1
is permission granted.
g_doc_func_get_file_id
Type | Used when | Example |
---|---|---|
VARCHAR2(30) | Source = Custom Table | UC_PDF_REGION_PRO.g_doc_func_get_file_id := 'uc_pdf_region_pro_fn_file_get_new_id'; |
Provide a function that returns a document's primary key(s) value(s) when the end-user creates a new file. Use this function only when primary key(s) value(s) can't be obtained using a trigger or other database methods. The function should return a VARCHAR2
value containing new document primary key(s) value(s) separated with a comma.
The given function must:
- be declared in the package provided via the Custom PL/SQL Package Name attribute
- accept the defined arguments
- return a
VARCHAR2
string containing the new document primary key(s) value(s) delimited with a comma
The function specification is the following:
function uc_pdf_region_pro_fn_file_get_new_id(
p_session_id in number,
p_application_id in number,
p_page_id in number,
p_user_id in varchar2,
p_pks_column_names in varchar2,
p_pks_item_values in varchar2
) return varchar2;
The function parameters are:
Parameter | Type | Description |
---|---|---|
p_application_id | NUMBER | An application ID in which the PDF Region Pro is running |
p_page_id | NUMBER | An application page ID in which PDF Region Pro is running |
p_session_id | NUMBER | An application session ID in which PDF Region Pro is running |
p_file_id | VARCHAR2 | A document ID. When PDF Region Pro uses a custom table and multiple primary keys, the value contains a comma-separated list of primary key values |
p_user_id | VARCHAR2 | An APEX application end-user username |
p_pks_column_names | VARCHAR2 | The current value of the Primary Key(s) Column(s) attribute |
p_pks_item_values | VARCHAR2 | The current value of the Item(s) Containing Primary Key(s) Value(s) attribute |
Example |
When PDF Region Pro uses a custom table with two primary keys, ID
and ID2
, the function should return the value X,Y
where:
X
is a new value for columnID
Y
is a new value for columnID2
...
function example_function(
p_session_id in number,
p_application_id in number,
p_page_id in number,
p_user_id in varchar2,
p_pks_column_names in varchar2,
p_pks_item_values in varchar2
) return varchar2
is
v_result varchar2(4000);
begin
v_result := 'X,Y';
return v_result;
end;
...
g_doc_getfileinfo
Type | Used when | Example |
---|---|---|
VARCHAR2(30) | Source = Custom PL/SQL Code | UC_PDF_REGION_PRO.g_doc_getfileinfo := 'uc_pdf_region_pro_custom_getfileinfo'; |
Provide a procedure name that fetches information about the currently requested document.
The given procedure must:
- be declared in the package provided via the Custom PL/SQL Package Name attribute
- accept the defined arguments
- return OUT parameters describing the requested document
The procedure specification is:
procedure uc_pdf_region_pro_custom_getfileinfo(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id in varchar2,
p_out_content out blob,
p_out_filename out varchar2,
p_out_mime_type out varchar2,
p_out_last_update_date out timestamp,
p_out_version out varchar2,
p_out_blob_owner out varchar2
);
The procedure parameters are:
Parameter | Type | NULL able | Description |
---|---|---|---|
p_application_id | NUMBER | No | An application ID in which PDF Region Pro is running |
p_page_id | NUMBER | No | An application page ID in which PDF Region Pro is running |
p_session_id | NUMBER | No | An application session ID in which PDF Region Pro is running |
p_file_id | VARCHAR2 | No | A document ID. When PDF Region Pro uses a custom table and multiple primary keys, the value contains a comma-separated list of primary keys values |
p_user_id | VARCHAR2 | No | An APEX application end-user username |
p_out_content | BLOB | No | The requested document contents. |
p_out_filename | VARCHAR2 | No | The requested document filename. |
p_out_mime_type | VARCHAR2 | No | The requested document MIME-TYPE |
p_out_last_update_date | TIMESTAMP | No | The requested document's last modification as a TIMESTAMP |
p_out_version | VARCHAR2 | Yes | The requested document's current version. The current document version is not required to fetch the document information successfully. |
p_out_blob_owner | VARCHAR2 | No | The requested document owner. |
g_doc_create
Type | Used when | Example |
---|---|---|
VARCHAR2(30) | Source = Custom PL/SQL Code | UC_PDF_REGION_PRO.g_doc_create := 'uc_pdf_region_pro_custom_create'; |
Provide a procedure name for saving a new document of the requested type based on an empty BLOB template.
The given procedure must:
- be declared in the package provided via the Custom PL/SQL Package Name attribute
- accept the defined arguments
- return OUT parameters
The procedure specification is the following:
procedure uc_pdf_region_pro_custom_create(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id out varchar2,
p_file_content in blob,
p_file_filename in out varchar2,
p_file_mime_type in varchar2,
p_file_last_update_date in out timestamp,
p_file_version in out number,
p_file_blob_owner in out varchar2
);
The procedure parameters are:
Parameter | NULL able | Description |
---|---|---|
p_application_id | No | An application ID in which PDF Region Pro is running |
p_page_id | No | An application page ID in which PDF Region Pro is running |
p_session_id | No | An application session ID in which PDF Region Pro is running |
p_user_id | No | An APEX application end-user username |
p_file_id | No | The procedure has to set the OUT value to identify a newly created document. |
p_file_content | No | The procedure receives an empty BLOB template of the requested type. |
p_file_filename | No | The procedure receives a default filename defined in the plug-in application component settings and a file extension of the given type. The procedure can modify the received filename, and it has to set it as the OUT parameter value. |
p_file_mime_type | No | The procedure receives a requested document MIME-TYPE. |
p_file_last_update_date | No | The procedure receives a SYSTIMESTAMP , and sets the OUT parameter value with the current document modification time as a TIMESTAMP . |
p_file_version | Yes | The requested document's current version. The current document's version is not required to handle a document successfully. |
p_file_blob_owner | No | The requested document owner that will be used while evaluating document permissions. |
g_doc_update
Type | Used when | Example |
---|---|---|
VARCHAR2(30) | Source = Custom PL/SQL Code | UC_PDF_REGION_PRO.g_doc_update := 'uc_pdf_region_pro_custom_update'; |
Provide a procedure name to update a document.
The given procedure must:
- be declared in the package provided via the Custom PL/SQL Package Name attribute
- accept the defined arguments
- return OUT parameters
The procedure specification is:
procedure uc_pdf_region_pro_custom_update(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id in varchar2,
p_file_content in blob,
p_file_filename in varchar2,
p_file_mime_type in varchar2,
p_file_last_update_date in out timestamp,
p_file_version in out number,
p_file_blob_owner in varchar2
);
The procedure parameters are:
Parameter | NULL able | Description |
---|---|---|
p_application_id | No | An application ID in which PDF Region Pro is running |
p_page_id | No | An application page ID in which PDF Region Pro is running |
p_session_id | No | An application session ID in which PDF Region Pro is running |
p_user_id | No | An APEX application end-user username |
p_file_id | No | A procedure has to set the OUT value identifying a newly created document. |
p_file_content | No | A procedure receives an empty BLOB template of the requested type. |
p_file_filename | No | A procedure receives the current document filename. |
p_file_mime_type | No | A procedure receives the current document MIME-TYPE. |
p_file_last_update_date | No | A procedure receives the last document modification time and sets the OUT parameter value with the current modification time as a TIMESTAMP . |
p_file_version | Yes | A requested document's current version. The current document version is not required to handle a document successfully. |
p_file_blob_owner | No | The current document owner. |
g_doc_callback_create
Type | Used when | Required | Example |
---|---|---|---|
VARCHAR2(30) | Source = Default Table | Custom Table | Custom PL/SQL | No | UC_PDF_REGION_PRO.g_doc_callback_read := 'uc_pdf_region_pro_callback_create'; |
Provide a procedure name to be executed whenever the end-user successfully creates a document.
If not provided, PDF Region Pro does not execute the callback.
The given procedure must:
- be declared in the package provided via Custom PL/SQL Package Name attribute
- accept the defined arguments
The procedure specification is the following:
procedure uc_pdf_region_pro_callback_create(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id in varchar2,
p_file_content in blob,
p_file_filename in varchar2,
p_file_mime_type in varchar2,
p_file_last_update_date in timestamp,
p_file_version in number,
p_file_blob_owner in varchar2
);
The procedure parameters are:
Parameter | NULL able | Description |
---|---|---|
p_application_id | No | An application ID in which PDF Region Pro is running |
p_page_id | No | An application page ID in which PDF Region Pro is running |
p_session_id | No | An application session ID in which PDF Region Pro is running |
p_user_id | No | An APEX application end-user username |
p_file_id | No | The procedure receives the current document ID to be renamed. |
p_file_content | No | The procedure receives the current document BLOB which is an empty template. |
p_file_filename | No | The procedure receives a new filename and sets the OUT value if the procedure logic changes the filename. |
p_file_mime_type | No | The procedure receives the current document MIME-TYPE. |
p_file_last_update_date | No | The procedure receives a document's last modification time and sets the OUT value with the current modification time as a TIMESTAMP . |
p_file_version | Yes | The requested document's current version. |
p_file_blob_owner | No | The current document owner. |
g_doc_callback_read
Type | Used when | Required | Example |
---|---|---|---|
VARCHAR2(30) | Source = Default Table | Custom Table | Custom PL/SQL | No | UC_PDF_REGION_PRO.g_doc_callback_read := 'uc_pdf_region_pro_callback_read'; |
Provide a procedure name to be executed a document's contents are read. If not provided, PDF Region Pro does not perform the callback.
The given procedure must be:
- declared in the package provided via Custom PL/SQL Package Name attribute
- accepting the defined arguments
The procedure specification is the following:
procedure uc_pdf_region_pro_callback_read(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id in varchar2,
p_file_content in blob,
p_file_filename in varchar2,
p_file_mime_type in varchar2,
p_file_last_update_date in timestamp,
p_file_version in number,
p_file_blob_owner in varchar2
);
The procedure parameters are:
Parameter | NULL able | Description |
---|---|---|
p_application_id | No | An application ID in which PDF Region Pro is running |
p_page_id | No | An application page ID in which PDF Region Pro is running |
p_session_id | No | An application session ID in which PDF Region Pro is running |
p_user_id | No | An APEX application end-user username |
p_file_id | No | The procedure receives the current document ID to be renamed. |
p_file_content | No | The procedure receives the requested document contents as BLOB. |
p_file_filename | No | The procedure receives a new filename and sets the OUT value if the procedure logic changes the filename. |
p_file_mime_type | No | The procedure receives the current document MIME-TYPE. |
p_file_last_update_date | No | The procedure receives a document's last modification time and sets the OUT value with the current modification time as TIMESTAMP . |
p_file_version | Yes | The requested document's current version. |
p_file_blob_owner | No | The current document owner. |
g_doc_callback_update
Type | Used when | Required | Example |
---|---|---|---|
VARCHAR2(30) | Source = Default Table | Custom Table | Custom PL/SQL | UC_PDF_REGION_PRO.g_doc_callback_read := 'uc_pdf_region_pro_callback_update'; |
Provide a procedure name to be executed when a document's contents are updated. If not provided, PDF Region Pro does not perform the callback.
The given procedure must be:
- declared in the package provided via Custom PL/SQL Package Name attribute
- accepting the defined arguments
The procedure specification is the following:
procedure uc_pdf_region_pro_callback_update(
p_application_id in number,
p_page_id in number,
p_session_id in number,
p_user_id in varchar2,
p_file_id in varchar2,
p_file_content in BLOB,
p_file_filename in varchar2,
p_file_mime_type in varchar2,
p_file_last_update_date in timestamp,
p_file_version in number,
p_file_blob_owner in varchar2
);
The procedure parameters are:
Parameter | NULL able | Description |
---|---|---|
p_application_id | No | An application ID in which the PDF Region Pro is running |
p_page_id | No | An application page ID in which PDF Region Pro is running |
p_session_id | No | An application session ID in which PDF Region Pro is running |
p_user_id | No | An APEX application end-user username |
p_file_id | No | The procedure receives the current document ID to be renamed. |
p_file_content | No | The procedure receives the modified document as BLOB . |
p_file_filename | No | The procedure receives a new filename and sets the OUT value if the procedure logic changes the filename. |
p_file_mime_type | No | The procedure receives the current document MIME-TYPE. |
p_file_last_update_date | No | The procedure receives a document's last modification time and sets the OUT value with the current modification time as a TIMESTAMP . |
p_file_version | Yes | The requested document's current version. |
p_file_blob_owner | No | The current document owner. |