Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to Presenting documents for PDF in oracle text

Munir MahmudApr 18 2017 — edited Apr 19 2017

Hello,

I'm working with oracle text searching BLOB contents and finally viewing the markup in a Apex Pages. I can see the preview word and text document except the PDF document.

First one is the result of non PDF document.

markup-1.jpg

this one is for the PDF document

markup2.jpg

Nothing showing for pdf documents.

I created the index as follows:

create index hdocsx on EC_CABINET (EC_BLOB) indextype is ctxsys.context

parameters ('filter ctxsys.auto_filter SYNC ( ON COMMIT)');

My PL/SQL code in apex PL/SQL Dynamic Content to display markup content of the document in a viewer.

----------------------------------------------------------

declare

v_clob_selected CLOB;

v_read_amount integer;

v_read_offset integer;

v_buffer varchar2(32767);

v_query varchar(2000);

v_cursor integer;

begin

  htp.p('\<html>\<title>HTML version with highlighted terms\</title>');

  htp.p('\<body bgcolor="#ffffff">');

  htp.p('\<b>HTML version with highlighted terms\</b>');

  htp.p('\<br />');

begin

 ctx\_doc.markup (index\_name => 'HDOCSX',  -- name of Oracle Text index created in Step 2

                 textkey    => :P11\_FILE\_ID,      -- hidden item on page containing ID (primary key) of BLOB table

                 text\_query => :P11\_SEARCH,  -- item containing the term the user searched for on page 1

                 restab     => v\_clob\_selected,

                 starttag   => '\<i>\<font color=red>',

                 endtag     => '\</font>\</i>');

 v\_read\_amount := 32767;

 v\_read\_offset := 1;

 begin

  loop

    dbms\_lob.read(v\_clob\_selected,v\_read\_amount,v\_read\_offset,v\_buffer);

    htp.p(v\_buffer);

    v\_read\_offset := v\_read\_offset + v\_read\_amount;

    v\_read\_amount := 32767;

  end loop;

 exception

  when no\_data\_found then

     null;

 end;

 exception

  when others then

    null; --showHTMLdoc(p\_id);

end;

end;

Can anyone shade light on this to see the output for PDF.

This post has been answered by Roger Ford-Oracle on Apr 19 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2017
Added on Apr 18 2017
16 comments
1,016 views