Hi
Sorry for bad English - I use an interpreter.
To form a PDF file, we do the following:
1. Create a BLOB file in RTF format (using PL/SQL package)
2. save the BLOB file in the ORACLE DIRECTORY
3. Call PL/SQL (JAVA function) function, which starts the file (convert_rtf2pdf.sh), which is stored in the operating system
Sample convert_rtf2pdf.sh:
#!/bin/bash
source=$1
PATH=/usr/bin
FOLDER_CONVERT='/home/oracle/convert/tmp'
/usr/bin/libreoffice --headless --convert-to pdf --outdir $FOLDER_CONVERT $FOLDER_CONVERT/$source
In ORACLE DIRECTORY we get a PDF file that we load into the database and send it to the user
If I want to get a JPG file, then after executing convert_rtf2pdf.sh, run convert_pdf2jpg.sh
Sample convert_pdf2jpg.sh:
#!/bin/bash
source=$1
dest=$2
PATH=/usr/bin
FOLDER_CONVERT='/home/oracle/convert/tmp'
/usr/bin/convert -density 500 $FOLDER_CONVERT/$source -quality 90 $FOLDER_CONVERT/$dest
In ORACLE DIRECTORY we get a JPG file that we load into the database and send it to the user