cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve PDF file in OpenText archive server

0 Kudos

Hello everyone,

I am in a data archive project, there is a requirement to move PDF file from windows server to OpenText archive server.

Currently, all PDF files have been moved to the archive server but there is the other requirement to retrieve and display these files in web Portal.

Exist Web Dynpro Java program are coded as below;


  file = new File("C:\\USR\\SAP\\temp\\"+filename+".pdf");

  FileInputStream in = new FileInputStream(file);

  ByteArrayOutputStream out = new ByteArrayOutputStream();

  int length;

  byte[] part = new byte [10 * 1024];

  while ((length = in.read(part)) != -1)

  {

     out.write(part, 0, length);

  }

  in.close();     

  wdContext.currentContextElement().setPDFSourceWeb(out.toByteArray());     

  wdComponentAPI.getMessageManager().reportSuccess("Load file "+filename+".pdf from server success.");

  wdContext.currentContextElement().setFilename("");

It seems like I need to retrieve PDF files in the archive server by using URL(for example) as below instead

http://57.59.147.105:8080/archive?docGet&pVersion=0045&contRep=YD&docId=51B799FFD5037076E1000000393B...

but I am not familiar with Web Dynpro Java so could anyone guide me about how to retrieve & display PDF files in portal with that URL.

Thank you in advance.

Tiwa N.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Resolved by myself.

Former Member
0 Kudos

Hi Tiwa,

Hope you are doing good.

I too have a similar kind of requirement as mentioned above. I need to display files in a particular directory from Opentext server

Could you please help me in this

Thanks in advance

Regards,

Samba

mariano_sabiche
Active Participant
0 Kudos

Hello Tiwa;

I have the same requirement, but I need to use API at OpenText Archive Server to get the file into a directory. SAP is OFF-LINE, but we have got the information from a SQL from TOA01 table.

Please contact me.

Regards,

Mariano

Answers (0)