AOP_CONVERT24_PKG
Constants
Others
-- c_aop_version
c_aop_version constant varchar2(6) := '24.1'
-- c_aop_url : for https use https://api.apexofficeprint.com/
c_aop_url constant varchar2(50) := 'http://api.apexofficeprint.com/'
-- c_mime_type_docx : Mime Types
c_mime_type_docx constant varchar2(100) := 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
-- c_mime_type_pptx
c_mime_type_pptx constant varchar2(100) := 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
-- c_mime_type_pdf
c_mime_type_pdf constant varchar2(100) := 'application/pdf'
-- c_mime_type_html
c_mime_type_html constant varchar2(100) := 'text/html'
-- c_mime_type_markdown
c_mime_type_markdown constant varchar2(100) := 'text/markdown'
-- c_mime_type_rtf
c_mime_type_rtf constant varchar2(100) := 'application/rtf'
-- c_mime_type_json
c_mime_type_json constant varchar2(100) := 'application/json'
-- c_mime_type_text
c_mime_type_text constant varchar2(100) := 'text/plain'
-- c_mime_type_zip
c_mime_type_zip constant varchar2(100) := 'application/zip'
-- c_pdf_pdf
c_pdf_pdf constant varchar2(3) := 'pdf'
-- c_output_encoding_raw : Output
c_output_encoding_raw constant varchar2(3) := 'raw'
-- c_init_null
c_init_null constant varchar2(5) := 'null;'
-- c_source_type_sql
c_source_type_sql constant varchar2(3) := 'SQL'
CONVERT_FILES Function
Convert one or more files by using a SQL query with following syntax (between [] can be one or more columns) select filename, mime_type, [file_blob, file_base64, url_call_from_db, url_call_from_aop, file_on_aop_server] from my_table
Syntax
function convert_files(
p_query in clob,
p_output_type in varchar2 default c_pdf_pdf,
p_output_encoding in varchar2 default c_output_encoding_raw,
p_output_to in varchar2 default null,
p_output_filename in out nocopy varchar2,
p_output_converter in varchar2 default null,
p_output_collection in varchar2 default null,
p_aop_remote_debug in varchar2 default 'No',
p_aop_url in varchar2 default null,
p_api_key in varchar2 default null,
p_aop_mode in varchar2 default null,
p_app_id in number default null,
p_page_id in number default null,
p_user_name in varchar2 default null,
p_init_code in clob default c_init_null,
p_failover_aop_url in varchar2 default null,
p_failover_procedure in varchar2 default null,
p_log_procedure in varchar2 default null,
p_procedure in varchar2 default null)
return blob
Parameters
Name | Description |
---|---|
p_query | Format of query: select filename, mime_type, file_blob, file_base64, url_call_from_db, url_call_from_aop, file_on_aop_server from my_table |
p_output_type | Extension (pdf, xlsx, ...) or mime type (application/pdf, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, ...) of the output format. Following constants exists in aop_api_pkg: |
p_output_encoding | Following constants can be used: |
p_output_to | Where does the blob or file need to be sent to: - |
p_output_filename | Filename of the result |
p_output_converter | Define the PDF converter you want to use. Multipled converters can be defined in the AOP Server. |
p_output_collection | If a zip file is returned the files will be unzipped and put into a collection, currently not implemented, future improvement |
p_aop_remote_debug | Turning debugging on will generate the JSON that is sent to the AOP Server in a file. The actual request to the AOP Server is not done. Following constants can be used: - |
p_aop_url | Description: URL where the AOP Server is running. For the AOP Cloud use |
p_api_key | Description: API Key which can be found when you login at https://www.apexofficeprint.com |
p_app_id | APEX Application ID |
p_page_id | Page ID to call in the APEX application |
p_user_name | Username which should be used to create an APEX session |
p_init_code | Initialisation code which can be invoked in this package |
return | Converted file in blob |
Example
select filename, mime_type, file_blob, url_call_from_aop
from my_table