on 08-15-2013 6:36 AM
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
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.
Resolved by myself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.