Displaying Word documents on web using IFS
I am trying to display word documents stored in IFS on the web using the IFS Java API. The process we are currently using is outlined as follows :
1. Connect to IFS using the connect() method of LibraryService class.
2. Obtain references to IfsFileSystem object and PublicObject (using findPublicObjectbyPath() method of IfFileSystem class).
3. Cast the PublicObject to Document class.
4. Obtain a reference to the InputStream using the getContentStream() method of Document class.
Now, how do we display the contents of this document on the web ? Is there any IFS classes that do this for us or do we have to rely on the Java I/O classes to read the InputStream char-by-char and display the file ?
Thanks
If you are trying to retrieve binary content through a customer Web client, you wouldn't write it to the browser - since the browser can only display HTML.
Instead, you would generate a Web page which includes a URL to the document (e.g. http://ifsserver/:81466, or http://ifsserver/public/mydoc.doc). Subsequently, when a user clicks the URL, the browser will request the document directly from Oracle iFS' http server. When the http protocol server returns the document content, the browser will determine its MIME type, and launch the appropriate viewing application or helper application automatically.
null
Similar Messages
-
Reading and displaying Ms.Word document with web dynpro java
Hi,
I'm using NetWever developer studio 7..0.21.
I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
If possible , is there a blog etc.?
Thanks.Hello,
You have to use the Office Integration Library. Please, follow the documentation below:
http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
I hope this helps you.
Regards,
Blanca -
How to display word document as a HTML document in portal
Hi
I developed a portal application in that i am displaying word document using IFrames, from my application i am uploading word document and saving those document in KM
Requirement is that i need to provide an option to show this word document in html.
Thanks
Rudradev.Hi Glenn Mendonca
I thing it is possible
Even in SDN search results page, we have option called "HTML version" link
to see the search document in HTML
see the below url
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2fforums%2fsdn_forums%2fthread%7b74687265616449443d39313633%7d.jspa
i hope passing doucment as a query parameter to com.sap.km.cm.highlightedcontent?DocumentUri=
might solve this
pls give your inputs
Thanks -
Display Word Document as read only in VI pannel
In a VI pannel I put an Active X container with the IE browser to display Word documents.
The document are displayed properly but I want not give the user the possibility to make changes while viewing.
Is there a solution to do so?
(The documents are read-only and can not be saved.)Why use an IE container to display Word documents? You can place a word document directly in the ActiveX container. This seems a better choice.
If you wish to totally block user-input, you can place a transparent picture control over the display of the Word document.
Another alternative would be to convert the word document to a PDF and show this in an AcviteX container.
Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2) -
have an Adobe PRO 11 user converting a word Document to PDF using PDFMAKER and all of the numbering is disappearing from left column,. Has anyone had this happen and if so what is the fix?
Is it possible to post a sample page some place for us to try out (dropbox or acrobat.com)? Is your Acrobat updated? What version of WORD are you using?
-
How to Append two word documents into single using java
How to Append two word documents into single using java
we tried this but it's not append the one word document to other
source code:public class AppendTwoWordFiles {
public static void main(String []arg)throws IOException
FileInputStream fi=null;
FileOutputStream fo=null;
try {
System.out.println("Enter the source file name u want to append");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
File f1=new File(br.readLine().toString());
System.out.println("Enter the Destination file name ");
File f2=new File(br.readLine().toString());
fi = new FileInputStream(f1);
fo = new FileOutputStream(f2,true);
byte b[]=new byte[2];
while((fi.read(b))!=-1);
fo.write(b);
System.out.println("Successfully append the file");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
finally{
fi.close();
fo.close();
plz reply me quickly ,,,what can i followUse this code ..
and give the path of the both file like this.....
source file ---- C:/workspace/Practice/src/com/moksha/ws/test/practice.text
destination file ---- C:/workspace/City/src/com/moksha/ws/test/practice1.text
import java.io.*;
public class AppendTwoWordFiles {
public static void main(String[] arg) throws IOException {
FileInputStream fi = null;
FileOutputStream fo = null;
try {
System.out.println("Enter the source file name u want to append");
BufferedReader br = new BufferedReader(new InputStreamReader(
System.in));
File f1 = new File(br.readLine().toString());
System.out.println("Enter the Destination file name ");
File f2 = new File(br.readLine().toString());
fi = new FileInputStream(f1);
fo = new FileOutputStream(f2, true);
byte b[] = new byte[2];
int len = 0;
while ((len = fi.read(b)) > 0) {
fo.write(b, 0, len);
System.out.println("Successfully append the file");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
fi.close();
fo.close();
} -
Attach Word document to Web template
Hello,
I attached Word document to Web template. When I run Web template I dont see this document anywhere.
How and where its possible to see it?
ThanksHi Aleksandrs,
Have you seen this:
http://help.sap.com/saphelp_nw04/helpdata/en/60/1c143bfaed272de10000000a11402f/content.htm -
Convert arabic word document to pdf using Inbound Refinery
convert arabic word document to pdf using Inbound Refinery creating problem. After pdf convert the converted pdf changes to left to right instead of right to left.
In that case you will need to look at the Adobe LiveCycle ES PDF Generator product, as it is licensed and suitable for server-based conversion. Adobe Acrobat can not legally be used in the environment that you describe.
-
Idea about convert word document to pdf using java api
idea about convert word document to pdf using java api if any one find it mail me at [email protected]
api if any one find it mail me at
[email protected]
What happend to your other mailID :
[email protected] ????
http://forum.java.sun.com/thread.jspa?threadID=639851&
messageID=3756910It received the Spam Of Death. RIP -
I used to be able to send document as a PDF or Word Document via email using the toolbar.
I used to be able to send Pages documents as a PDF or Word Document via email using the Pages toolbar (not the iWork feature). Lately, it hasn't been working at all. No email pops up; just nothing. Is anyone else having this problem? Any solutions? I'm running Pages '09 version 4.1.
This Apple Express Helper is a dumb one.
File names with # and $ are perfectly treated by the share to Mail feature.
What is rejected is the slash (/) and it's perfectly normal.
Since the delivery of the first version of OS X, slash is an illegal character in file names.
Apple thought that it would be fair to build a piece of code taking care of such chars because they were valid ones in the older operating systems.
But they expected that users will drop these chars. Alas they didn't and users like you are continuing to play with matches.
At last, OS X 10.7 removed the extraneous code and now, hosanna, iWork refuse to export files whose name contain the infamous slash.
Yvan KOENIG (VALLAURIS, France) lundi 9 avril 2012
iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
My Box account is : http://www.box.com/s/00qnssoyeq2xvc22ra4k -
How to display word document attched to web template
Hi,
I have attached a word document to a web template in the web app. designer using menu option Web template --> documents.
When I use web item "Single document" or "Document list" in my web template this word document does not show up. Did I miss a step here?
Also, there were certain documents which were created directly as "documents for navigation status" but now, even after deleting them, the link still shows up??
Regards,Hi Rumy, you will need to create a link to the technical object's documetation.
Let me know if you have questions....
Feel free to award the points to me...
Ken -
Displaying Word Document from a Database
Let me try to explain this.
I can upload and store a Word Document in an Oracle database
(BLOB column) but now I need to extract that Word document and
place a pointer to it on the Web. Can someone explain to me how
this is done?
I'm trying to do something like have an image displayed on
the Web and when you click on it the Word Document is opened.
Follow me on that? So, if there are 15 Word documents in the
database, then the web page would have 15 images all pointing to
each separate Word document.
Has anyone done this?Don't take my word on this, but I think this should work;
I've done this in the past to send dynamically-generated CSV files
to the user, which is in a way (at least at the perspective of
what's being outputted to the user) the same thing.
First, obviously, you need to retrieve the Word document data
from the database. We'll say you put that in a variable called
'wordDoc'.
<cfset wordDoc = someQuery.wordDataObj />
Next, we need to set the 'Content-disposition' HTTP header,
to tell the client's browser that we're sending a file, and that we
want you to call it somefile.doc by default. We'll do this with the
<cfheader> tag (note that if you use <cfflush> in the
application, this tag (and thus, this approach)
will not work.
<cfheader name="Content-disposition" value="attachment;
filename=somefile.doc" />
Almost there. Now we need to set the Content-type HTTP
header, to tell the browser what kind of data is coming, and then
give it the actual file data. We'll use the <cfcontent> tag
to do both of these things.
<cfcontent type="application/msword"
reset="yes">#wordDoc#</cfcontent><cfabort>
If memory serves, this should be all you need. Note the
<cfabort> after the closing <cfcontent> tag, I've had
problems in the past with additional output on the page after these
tags being appended to what gets sent to the browser, so I use a
<cfabort> afterwards to make sure nothing more gets sent
after the data we want. Also, at least with CFMX7, I've noticed
that debugging output tends to get added in too regardless, so I
typically put a <cfsetting showdebugoutput="false" /> at the
top of the file, too.
I can't guarantee this will work, I haven't tested this
particular situation, but if it doesn't, it ought to be close. Let
me know if I'm wrong.
Attached is what should be the code without my commentary /
rambling interspersed. -
Store and display word document in database through forms
how can i store a word document in database through forms 6i or 10g, and display it through forms from database.
i know how to store a binary file in database through DBMS_LOB package, but i want to do it throug forms. is it possible?
regardsHi Alex
"Create a datablock and specify the item datatype as blob"
BUT: How to bring the document to the blob?
Hi user 611..
Warning: It is easy if you use an OLE-Object - but OLE is a special format. The result will not be the same as with dbms_LOB.
We have a application with documents stored via OLE - terrible!
OLE is no longer supported by forms 10. But webutil would help.
I asked a similar question and got a good answer:
OLE-Container and migration to the web
Wolfram -
Inconsistent Behavior When Displaying Word Document
I use the following code to display an OrdDoc object on a web page using a servlet. When the object is a Word document and it is being displayed for the first time, the Word application handles the document. The second time it is displayed, the IE browser plug-in handles the document. Can you tell me why this is so? How can I get the Word document to just display in the IE browser everytime? Image objects are consistently displayed in the browser. Thank you.
OrdDoc ordDoc = (OrdDoc)rset.getORAData(1,(ORADataFactory)OrdDoc.getORADataFactory());
OrdHttpResponseHandler handler = new OrdHttpResponseHandler(actionRequest.getHttpRequest(),actionRequest.getHttpResponse());
handler.sendDoc(ordDoc);The ORDDoc type will not be able to recognized the WORD document and set the mimetype attribute correctly. Thus when you populate the object you should set the mimetype attribute yourself using the setMimeType() method of ORDDoc.
When the object is fetched and sent on by the HttpResponseHandler, the handler will use the mimetype setting to set that field in the Response header. This should help browsers to handle the content correctly. -
Upload and display Word Document in WD application
Hello,
I have a WD ABAP appl. where the user wants to upload an Word / Excel file (from its own local drive).
The document shall be saved in SAP and it shall also be possible to display the document later in the WD application.
I implemented the UI element upload in the view, to determine the path of the document.
For the display implemented the UI element Office control.
1. When i browse the document, the properties data, filename and mime type are filled into the bound context elements of the upload UI.
2. The property datasource of the UI office control I bound to the same context element, that is also bound to the property data of the upload UI.
The office control opens a word document, but the document is empty.
Is it possible that the document is not uploaded correct?
In another application I did an upload for a PDF doc.. There I implemented the following coding as action of the button 'Upload'.
data lo_nd_pdf type ref to if_wd_context_node.
data lo_el_pdf type ref to if_wd_context_element.
data ls_pdf type wd_this->element_pdf.
data lv_pdf like ls_pdf-pdf.
navigate from <CONTEXT> to <PDF> via lead selection
lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
get element via lead selection
lo_el_pdf = lo_nd_pdf->get_element( ).
get single attribute
lo_el_pdf->get_attribute(
exporting
name = `PDF`
importing
value = lv_pdf ).
Get a reference to the from processing class.
data: l_fp type ref to if_fp.
l_fp = cl_fp=>get_reference( ).
Get a reference to the PDF Object class.
data: l_pdfobj type ref to if_fp_pdf_object.
l_pdfobj = l_fp->create_pdf_object( ).
set the pdf in the PDF Object
l_pdfobj->set_document( pdfdata = lv_pdf ).
set the PDF Object to extract data the Form data.
l_pdfobj->set_extractdata( ).
execute call to ADS
l_pdfobj->execute( ).
get the PDF Form data
data: pdf_form_data type xstring.
l_pdfobj->get_data(
importing
formdata = pdf_form_data ).
convert the xstring from data to string so it can be processed using the iXML classes
data: converter type ref to cl_abap_conv_in_ce,
formxml type string.
converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
converter->read(
importing
data = formxml ).
pull in the iXML type group.
type-pools: ixml.
get a reference to iXML object
data:l_ixml type ref to if_ixml.
l_ixml = cl_ixml=>create( ).
get iStream object from StreamFactory
data: streamfactory type ref to if_ixml_stream_factory,
istream type ref to if_ixml_istream.
streamfactory = l_ixml->create_stream_factory( ).
istream = streamfactory->create_istream_string( formxml ).
create an XML document class that will be used to process the XML
data: document type ref to if_ixml_document.
document = l_ixml->create_document( ).
create the parser class
data: parser type ref to if_ixml_parser.
parser = l_ixml->create_parser( stream_factory = streamfactory
istream = istream
document = document ).
parse the XML
parser->parse( ).
define XML Node type object
data: node type ref to if_ixml_node,
attributes type ref to if_ixml_named_node_map.
get the psi sales data Node and value.
data ls_psi_sales type wd_this->element_psi_sales.
data: lt_dfies type table of dfies,
ls_defies type dfies.
call function 'DDIF_NAMETAB_GET'
exporting
tabname = 'ZCM_PSI_SALES'
ALL_TYPES = ' '
LFIELDNAME = ' '
GROUP_NAMES = ' '
UCLEN =
IMPORTING
X030L_WA =
DTELINFO_WA =
TTYPINFO_WA =
DDOBJTYPE =
DFIES_WA =
LINES_DESCR =
tables
X031L_TAB =
dfies_tab = lt_dfies
exceptions
not_found = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
data: lv_fieldname type string.
field-symbols <fs_field> type any.
loop at lt_dfies into ls_defies.
lv_fieldname = ls_defies-fieldname.
node = document->find_from_name( name = lv_fieldname ).
assign component lv_fieldname
of structure ls_psi_sales
to <fs_field>.
if <fs_field> is assigned.
<fs_field> = node->get_value( ).
endif.
endloop.
WRITE DATA INTO CONTEXT
data lo_nd_psi_sales type ref to if_wd_context_node.
data lo_el_psi_sales type ref to if_wd_context_element.
navigate from <CONTEXT> to <PSI_SALES> via lead selection
lo_nd_psi_sales = wd_context->get_child_node( name = wd_this->wdctx_psi_sales ).
get element via lead selection
lo_el_psi_sales = lo_nd_psi_sales->get_element( ).
set all declared attributes
lo_el_psi_sales->set_static_attributes(
exporting
static_attributes = ls_psi_sales ).
Do I need such a code also to upload a word doc?
Which interface / class exists for word documents? (for PDF upload there is the interface IF_FP)
How can I save a document in SAP? (as MIME Object? with which method?)
I hope someone can help me!?
BRYou can use the fileupload and filedownload uielements.
Check these links:
[File Upload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm]
[File Download|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
When you upload a file and save in SAP, are you saving it as xstring.
If yes follow these steps for filedownload.
Follow these steps for file download:
1 Create FileDownload uielement in your View
2.Create an Attribute of type xstring.
3.Bind this attribute to the data property of your Filedownload uielement.
4. during fileuplaod as you are saving the document in xstring format, fetch the same from your database table and pass the value to filedownload i.e set the attribute bound to data property of filedownload uielement with the xstring content.
Maybe you are looking for
-
I've had my Iphone 4S since thanksgiving and today it turned off voluntarily and now I can't get it to turn back on. I've tried holding down the top button and plugging it into my charger
-
How do I change the order of songs in a playlist?
I know that I used to be able to drag songs to a different order in my iTunes playlists, but tonight, no matter the order that I add the songs to the playlist, or Smart Playlist, the order of the songs is alphabetically arranged, and the only other o
-
Photoshop Elements 12 läuft nicht unter Windows 8.1
Ich habe Photoshop Elements 12 auf meinem PC installiert. Mein Betriebssystem ist Windows 8.1. Beim Öffnen von Bilddateien (egal welches Format) erscheinst meistens die Fehlermeldung "Konnte die Zwischenablage nicht importieren, weil ein unerwartetes
-
Problems after installing OS X 10.6.6
After installation of the 10.6.6 update on my iMac I have a problem with Mail. sometimes 1 email window will open and stay open. Can't do anything about it. When I click the - button, the window stays. Sometimes Mail start normally but when I open an
-
Trouble when loading quicktime files
Hi. I have just bought Keynote so I can run a presentation with a lot of really heavy stuff. 22 GB in all. The document came from a filmmaker and opens up fine, but it states in Danish " Kan ikke indlæse ekstern film - En nødvendig datahenvisning kun