I am using oracle apex 18.1.0.00.45.
For displaying pdf,
I created Procedure
create or replace PROCEDURE download_my_file(p_file in number) AS
v\_mime VARCHAR2(48);
v\_length NUMBER;
v\_file\_name VARCHAR2(2000);
Lob\_loc BLOB;
BEGIN
SELECT MIME\_TYPE, BLOB\_CONTENT, name,DBMS\_LOB.GETLENGTH(blob\_content)
INTO v\_mime,lob\_loc,v\_file\_name,v\_length
FROM wwv\_flow\_files
WHERE id = p\_file;
--
-- set up HTTP header
--
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
owa\_util.mime\_header( nvl(v\_mime,'application/octet'), FALSE );
-- set the size so the browser knows how much to download
htp.p('Content-length: ' || v\_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: inline; filename="'||replace(replace(substr(v\_file\_name,instr(v\_file\_name,'/')+1),chr(10),null),chr(13),null)|| '"');
--htp.p('\<embed Content-Disposition: inline; src="'||replace(replace(substr(v\_file\_name,instr(v\_file\_name,'/')+1),chr(10),null),chr(13),null)|| '" width="500" height="375">');
-- close the headers
owa\_util.http\_header\_close;
-- download the BLOB
wpg\_docload.download\_file( Lob\_loc );
end download_my_file;
After gave the permission.
GRANT EXECUTE ON download_my_file TO PUBLIC/
I am setting the page item value at Before Header Process.

I created region.In region added below code
<embed src="#OWNER#.download_my_file?p_file=&P22_DOC_ID." width="500" height="375">

But it is not working.I am unable to find out the issue for displaying PDF in html region.I am getting this error.Where i am doing wrong.
