HTML file generation from Oracle

Hello Experts,

I am storing HTML content which is dynamically created.

I am using the below table :

SQL> desc xx_pdf_test
Name           Type           Nullable Default Comments 
-------------- -------------- -------- ------- -------- 
ID             NUMBER         Y                         
MYHTML         CLOB           Y                         
RESP_FILE_NAME VARCHAR2(4000) Y                         
RESP_FILE_PATH VARCHAR2(4000) Y          

Open in new window

I have the data as below:

SQL> select * from xx_pdf_test;                   

        ID        MYHTML                                 RESP_FILE_NAME                                      RESP_FILE_PATH            
----------    ----------------------------------     --------------------------------------------------- --------------------------------------------
         1     <!DOCTYPE html PUBLIC "-//W3C//         101280_233952__15098_ACTION_RESULTS_htm_0_233967   /home/oracle/app/EXP_DIR

Open in new window

The HTML content is as like below:

"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <h2 align="center">ELECTRIC COMPANY</h2>
  <h3 align="center">Ann Earn Assess Proc 2005</h3>
  <h3 align="center">ApplicationA.05-05-001</h3>
  <h3 align="center">Data Response</h3>


<table border="1" cellspacing="1" cellpadding="1" > 
<td valign="bottom" ><p>S&R Data Request No.:</p></td>
<td colspan="3" valign="bottom" ><p>SRCogeneration - 5 - Q - 2</p></td>

<td valign="bottom" ><p>S&R File Name:</p></td>
<td colspan="3" valign="bottom" ><p>AnnEarnAssessProc2005_SRCogeneration-5-Q-2</p></td>

<td valign="bottom" ><p>Request Date:</p></td>
<td valign="bottom" ><p>10/21/2015</p></td>
<td valign="bottom" ><p>Requester DR No.:</p></td>
<td valign="bottom" ><p>5</p></td>

<td valign="bottom" ><p>Date Sent:</p></td>
<td valign="bottom" ><p>10/26/2015</p></td>
<td valign="bottom" ><p>Requesting Party:</p></td>
<td valign="bottom" ><p>S&R Cogeneration Company  LLC</p></td>

<td valign="bottom" ><p>S&R Witness:</p></td>
<td valign="bottom" ><p>J Walker (AO1)</p></td>
<td valign="bottom" ><p>Requester:</p>
<td valign="bottom" ><p>g</p></td>


<p><b>Question 2</b></p>
<p><p style="margin-bottom: 0pt;">fk'</p><p style="margin-bottom: 0pt;"></p></p>
<p><a name="msi_file_execution1"></a></p>

<p><b><br />
Answer 2</b></p>
<p><br /><input type="hidden" value="101280-15098-29-0.docx#ms_attach_delimiter#101280_233952__15098_ACTION_RESULTS_htm_0_233967" />
<html><head></head><body><div><p><br></p><p><img width="468.0pt" height="86.84535pt" src="//home/oracle/app/EXP_DIR/Docimageview?iid=101280&pid=15098&seq=29&row=0&x=1&img=image1.jpeg"></p><p><br></p><p><br></p><p><span style="font-family:'Calibri';font-size:11.0pt;">Test</span><span id="_GoBack"></span></p><p><br></p><p></p></div></body></html></p>

Open in new window

But the source in "Answer 2</b></p> " actually a docx file. which is a RTF field from our application but when we actually see the file it would be encrypted like below:

file stored in encrypted way
The issue is when I export the file on oracle directory and send it to another server I am not able to see the image which should be like showing like below:

The actual Image
But when I actually open the HTML file in other server I see something like below:

The HTML file look
LVL 17
Swadhin Ray Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Amitkumar PSr. ConsultantCommented:
It looks the image is using absolute path (//home/oracle/app/EXP_DIR/Docimageview) to the system, so it will displayed when you open html file from the same system.

If you hit below url from any other machine, you will not be able to see the image.


Please correct the path the image and give it a try. Path should be like http://<YOUR ORACLE MACHINE>:<PORT>/<Docimageview>?RestOfTheParams. You can also refer the path mentioned in the actual image.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Swadhin Ray Author Commented:
I understand , but my problem is that I am generating PDF from the html file like converting html to PDF.
and the issues is the encrypted file is not an image file that's actually response fiend in our form is a rtf field which is nothing but a word file.

first I want the word file to be displayed along with my html content then if I convert the file to PDF then I can send the PDF directly.
Swadhin Ray Author Commented:
thanks a lot.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.