Convert JEditorPane document into HTML format
Hi,
I have developed an editor using swing's JEditorPane.
I want to know whether is it possible to convert the entire content of the
JEditorPane into HTML format using some API's.
For example if JEditorPane contains the text such as
JEditor pane to HTML
After converting it to HTML, it should appear as
<b>JEditorPane</b> <i>to</i> <u>HTML</u>
.
editorPane.getDocument.getText()
Similar Messages
-
How to convert table content into html format?
Hi,
Experts,
How to convert internal data into HTML format is there any function module or piece of code to download content into HTML.
Thank u,
Shabeer Ahmed.Then use this code....
REPORT ytest_table_html1.
* D A T A D E C L A R A T I O N
*-HTML Table
DATA:
t_html TYPE STANDARD TABLE OF w3html WITH HEADER LINE,
" Html Table
*- Declare Internal table and Fieldcatalog
it_flight TYPE STANDARD TABLE OF sflight WITH HEADER LINE,
" Flights Details
it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
" Fieldcatalog
*-Variables
DATA:
v_lines TYPE i,
v_field(40).
*-Fieldsymbols
FIELD-SYMBOLS: <fs> TYPE ANY.
* S T A R T - O F - S E L E C T I O N
START-OF-SELECTION.
SELECT *
FROM sflight
INTO TABLE it_flight
UP TO 20 ROWS.
* E N D - O F - S E L E C T I O N
END-OF-SELECTION.
*-Fill the Column headings and Properties
* Field catalog is used to populate the Headings and Values of
* The table cells dynamically
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
ct_fieldcat = it_fcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2.
DELETE it_fcat WHERE fieldname = 'MANDT'.
t_html-line = '<html>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<td><h1>Flights Details</h1></td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '</thead>'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<table border = "1">'.
APPEND t_html.
CLEAR t_html.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate HTML columns from Filedcatalog
LOOP AT it_fcat.
CONCATENATE '<th bgcolor = "green" fgcolor = "black">'
it_fcat-scrtext_l
'</th>' INTO t_html-line.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
DESCRIBE TABLE it_fcat LINES v_lines.
*-Populate HTML table from Internal table data
LOOP AT it_flight.
t_html-line = '<tr>'.
APPEND t_html.
CLEAR t_html.
*-Populate entire row of HTML table Dynamically
*-With the Help of Fieldcatalog.
DO v_lines TIMES.
READ TABLE it_fcat INDEX sy-index.
CONCATENATE 'IT_FLIGHT-' it_fcat-fieldname INTO v_field.
ASSIGN (v_field) TO <fs>.
t_html-line = '<td>'.
APPEND t_html.
CLEAR t_html.
t_html-line = <fs>.
APPEND t_html.
CLEAR t_html.
t_html-line = '</td>'.
APPEND t_html.
CLEAR t_html.
CLEAR v_field.
UNASSIGN <fs>.
ENDDO.
t_html-line = '</tr>'.
APPEND t_html.
CLEAR t_html.
ENDLOOP.
t_html-line = '</table>'.
APPEND t_html.
CLEAR t_html.
*-Download the HTML into frontend
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Flights.htm'
TABLES
data_tab = t_html
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-Display the HTML file
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = 'C:\Flights.htm'
operation = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
synchronous_failed = 8
not_supported_by_gui = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
none of the above function modules r obsolete... -
Converting SPool information into HTML Format
Hi Friends,
How to Converting SPool information into HTML Format
and send this HTML INFORMATION INTO MAIL..
can anyone send program for this issue pls.
it is an urgent issue
regards,Hi Rich,
once again thanks for your kindly reply.
but i am developing below Code.. that HTMAL AATCHMENTS ARE NOT COMING IN MAIL.
PLS can you you verify the below code.
DATA DECLARATIONS *
DATA: I_LIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE,
VARIANT LIKE RSVAR-VARIANT,
DOC_CHNG LIKE SODOCCHGI1,
RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE,
data: spoolid type tsp01-rqident.
DATA IT_MAIL LIKE TSP01 OCCURS 0 WITH HEADER LINE.
data report_html like W3HTML OCCURS 0 WITH HEADER LINE.
DATA: G_ICONS(32) OCCURS 10 WITH HEADER LINE.
DATA LISTOBJECT LIKE ABAPLIST OCCURS 0 WITH HEADER LINE.
DATA sent_to_all like sonv-flag.
data : RECEIVER(30),
spoolid type tsp01-rqident,
it_buffer like SOLI occurs 10 with header line.
data: list type table of abaplist with header line.
data: htmllines type table of w3html with header line.
data: maildata like sodocchgi1.
data: mailtxt like solisti1 occurs 10 with header line.
data: mailrec like somlrec90 occurs 0 with header line.
TABLE DECLARATIONS *
TABLES : TSP01.
SELECTION-SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN: SKIP.
PARAMETERS : RQ2NAME LIKE TSP01-RQ2NAME .
RQIDENT like TSP01-RQIDENT.
SELECT-OPTIONS : S_RECVR FOR RECEIVER NO INTERVALS.
SELECTION-SCREEN: SKIP.
SELECTION-SCREEN: END OF BLOCK B1.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM SEND_TO_SPOOL.
PERFORM GET_SPOOL_ID.
loop at it_mail.
PERFORM CONVERT_SPOOL_TO_PDF.
PERFORM SEND_MAIL.
endloop.
Save the list
call function 'SAVE_LIST'
tables
listobject = list
exceptions
list_index_invalid = 1
others = 2.
*& Form GET_SPOOL_ID
Getting the Latest Spool Request Number
FORM GET_SPOOL_ID.
SELECT *
FROM TSP01 INTO TABLE IT_MAIL
and RQIDENT = RQIDENT.
WHERE RQ2NAME = RQ2NAME .
ENDFORM. " GET_SPOOL_ID
*& Form CONVERT_SPOOL_TO_PDF
Converting the Spool to PDF Document
FORM CONVERT_SPOOL_TO_PDF.
*--Assigning the Spool number
WRITE :/ IT_MAIL-RQIDENT.
spoolid = IT_MAIL-RQIDENT.
*--Converting the Spool to PDF
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
RQIDENT = spoolid
FIRST_LINE = 1
LAST_LINE =
TABLES
BUFFER = it_buffer
EXCEPTIONS
NO_SUCH_JOB = 1
NOT_ABAP_LIST = 2
JOB_CONTAINS_NO_DATA = 3
SELECTION_EMPTY = 4
NO_PERMISSION = 5
CAN_NOT_ACCESS = 6
READ_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LISTOBJECT = IT_BUFFER.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME =
TEMPLATE_NAME = 'WEBREPORTING_REPORT'
TABLES
HTML = report_html
LISTOBJECT = LISTOBJECT
LISTICONS = G_ICONS.
ENDFORM. " CONVERT_SPOOL_TO_PDF
FORM SEND_MAIL.
call function 'WWW_LIST_TO_HTML'
tables
html = htmllines.
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
LOOP AT S_RECVR.
reclist-receiver = S_RECVR-LOW.
reclist-rec_type = 'U'.
append reclist.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'HTM'
put_in_outbox = 'X'
tables
object_header = report_html "mailtxt
object_content = mailtxt
receivers = reclist "mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0.
write 'mail sent'.
endif.
ENDLOOP.
regards,
venu. -
How to convert Labview document into PDF format
Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful.
Regards
Ramesh.CHi,
We have a brand new PDF library for LabVIEW. Release date is in october. The library can create pdfs, with all kinds of text writing and picture stuff. It works stand alone, so there is no need for other programs. It should also be platform independend.
If your interested, drop me a mail. I can send you mail when it's released. Maybe we can give you a "beta test", if you send use your findings.
Regards,
Wiebe. (email is " my name " @ carya . nl )
"Ramme" <[email protected]> wrote in message news:[email protected]..
Hi! can any one tell me, can we convert the Labview document (Labview saved files)into PDF format. I wanted to convert it using a VI. If any one suggest me or send me the example vi i will be very thankful. RegardsRamesh.C -
Converting Word Document into Robohelp format
I am new at Robohelp and have been recently assigned a task to convert several Word documents into Robohelp using version 9 of RoboHelp. Can someone please direct me in the right direction (location, URL, tutorials etc.) to find some step-by-step help, it would be most appreciative
Hi Michael.
Rick asked that question because there IS a method of linking a Word file to a Robohelp project and bringing in any changes to them. It was designed exactly for the scenario where a SME or client writes the content and someone else just acts as a kind of content curator. However if you just want to import the Word file, this is fine also but you'll need to understand that once the content is in RoboHelp, the content would need to be changed in Robohelp.
There is a good tutorial on the benefits of both linking and importing over on Peter Grainge's website (see the link below). This is a very useful resource for all things RoboHelp and well worth bookmarking.
http://www.grainge.org/pages/authoring/importing/about_importing_linking.htm -
How to convert xml data into html format in bpel
Hi ,
Can any one tel me how to conevrt xml into html in oracle bpel.
Does bpel support this functionality or not.
Regards,
Ana
Edited by: user10181991 on Apr 5, 2009 11:16 PMAna,
We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
Let me know if this helps. -
Convert Word document into HTML document
Hello,
I require an idea to accomplish the conversion of a .doc (word file) to .html (HTML file) in LabVIEW.
I am working on a project in which i am having reports being generated after each test case execution.
The data after the each test is meant to be appended in the corresponding report.
I just want to convert the .doc file to .html file for only display purpose as this is a requirement.
I dont want to use any kind of converters in this.
I have to do some calculations and modifications in the report before saving it, that's why i am thinking in this way as i had come to know that this is possible in LabVIEW.
Can someone help me in this regard.
Thanks & Regards,
Samriddh Sarbalhisamriddh wrote:
Hi,
Can i do this programatically using LabVIEW VI's.
As noted, you need to access the Microsoft Word ActiveX server using the LabVIEW ActiveX functions. There are several examples that ship with LabVIEW (Help -> Find Examples) on how to use ActiveX. You can also search the NI site. -
Hi Frns,
I wanna convert webi report into html format...
Is there any possibility in bo???
I'm using sap bo 4.1 sp2
Regards
RiazHi Riaz,
As per my knowledge Webi report export to HTML format is not possible in BI 4.1
You can raise a request in SAP IDEA's place
Refer the below links for workaround solution
[WebI XI 3.x] Export report to HTML or XML
Does BOE XI 3.1 supports exporting WebI to XML format? -
Anyone know a tool to convert PLSQL comments into HTML/other formats?
Hi - does anyone know if there's a tool out there to convert PLSQL comments into HTML or other formats like you can do in Java? Thanks in advance - Jon
This is only useful if you're using PL/SQL Developer. It has a free plugin called plsqldoc which will generate html pages that are similar to Javadoc pages.
check here for more information
http://www.allroundautomations.nl/plsqldevplugins.html
As an aside , if you haven't already, you may want to devise a way of auto generating your HTML when a change is made or by running a regular batch job. This will ensure that your docs are in sync with the code. Documentation is only valuable if it is kept up to date.
There is nothing worse than looking at the html docs for a package only to realise the docs are several versions behind the code. -
Report for converting the documents into the PDF format.
Hello Experts,
I need to know if any report/ T-code is available in SAP to convert the files into PDF format.
We are processsong these PDF's then into IXOS system.
Regards,
Anna.Hello ,
You may check with the below programs:
Program name Report title
RSTXCPDF Routines for Converting OTF Format to PDF Format
RSTXPDF2 Administration/Upload of type 1 and TrueType font files
RSTXPDF3 Customizing for OTF-PDF Conversion
RSTXPDF4 Help Report from CONVERT_OTFSPOOLJOB_2_PDF
RSTXPDF5 Help Report from CONVERT_ABAPSPOOLJOB_2_PDF
RSTXPDFT Test report for PDF conversion - converting standard texts to PDF
RSTXPDFT2
RSTXPDFT3 Test
RSTXPDFT4 Convert SAPscript (OTF) or ABAP Lists Spool Job by PDF
RSTXPDFT5 Test: GUI Download of Spool Request
Regards
Ramesh Ch -
Converting XML document to HTMl using xsl
Hi,
I'm trying to convert an xml document into html page using xsl. But when I try to open the page in the browser nothing comes up.
I'm not sure if I am using the PrintWriter correctly.
StreamResult result = new StreamResult(new PrintWriter(new (File"text.html")));
Please help.Oops! I wrote the parenthesis wrong in the previous mail
This is the correct one I use in my program.
StreamResult result = new StreamResult(new PrintWriter(new File("text.html")));
Please help. Its urgent -
How can i make a form in access into html format?
I am trying to convert my form in access 2013 into into html format. When i try doing so it looks 100% different on the browser than it does in access. I tried doing the export command,
and this is what happened. What can i do to make sure that it looks the exact same and will receive the data from the database? thank you for the helpYou can avoid the Ken Burns effect, but it would be a lot of work:
See: http://help.apple.com/imovie/ipad/2.0/index.html#knac3eec39c6
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points.
Adjust the movement of photos with the Ken Burns effect
iMovie applies the Ken Burns effect to the photos you add to your project. With this effect, the camera appears to sweep across and zoom in on the photo. If there are people in the photo, iMovie uses face detection to keep faces within the viewing area.
You can adjust the Ken Burns effect so that the motion starts and ends on the parts of the image you specify.
In the timeline, tap the photo you want to adjust.The Ken Burns effect controls appear in the lower-right corner of the image in the viewer.
To set the way the photo is framed at the beginning, tap the Start button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To set the way the photo is framed at the end, tap the End button .
Pinch to zoom in or out, then drag the image in the viewer to frame it the way you want.
To close the controls, tap the Ken Burns Effect button , or tap outside of the clip.
If you don’t want the Ken Burns effect applied to a photo, set the image position and zoom level to be the same for the start and end points. -
Is it possible to convert PDF file into HTML
Dear friends
Is it possible to convert PDF file into HTML. I have few hundread PDF files i like to convert this files into HTML. I hope it can be done through Java but i don't know how to start this coding. anybody can give me a brief idea to go ahead.Why do you want to do this yourself? I quick search on Google showed several utilities to do this, some freeware, some commercial.
-
How to convert word documents to html page in sharepoint online 2013
Hi,
I am new SharePoint and still learning it.
I have been tasked to do the following on office 365 E3 SharePoint 2013 Online edition.
1) I have to create a Web page in asp.net
2) This page needs to show document from a given SharePoint folder and bind them in a grid or dropdown on the asp .net web page
3) On selecting the document from the drop down or gird (on asp .net webpage), I need to show the SharePoint word document as HTML on the webpage (something like word to html) Note: These SharePoint word document may contain Images, bullets, tables etc.
What I have been able to do till now
1) I have been able to connect to SharePoint from ASP .net application.
2) I have been able to retrieve document from a specific SharePoint folder.
3) Read the document from SharePoint folder and bind them to a drop down on the asp .net page.
What is missing?
I am not aware about any API that SharePoint Online provides to convert Word document to HTML. Any code sample or reference on how to will be much appreciated.
I am not also not sure what is the best way of achieving the functionality this?
Thanks
KrishnaIf this was SharePoint server then it would be easy however in O365 You need to create a app which will use the word automation service and below is powershell which you can use for the conversion:-
# This script will convert Docx to PDF using word automation and similarly it can be used to convert to HTML
$wordFile="http://contoso/kick.docx"
$pdfFile="http://contoso/kick.pdf"
$wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }
$site = Get-SPSite "http://contoso"
$ConvertJob = New-Object Microsoft.Office.Word.Server.Conversions.SyncConverter($wasp)
$ConvertJob.UserToken = $site.UserToken
$ConvertJob.Settings.UpdateFields = $false
$ConvertJob.Settings.OutputFormat = "PDF"
$ConvertJob.Convert($wordFile, $pdfFile) -
How to convert BLOB data into string format.
Hi,
I have problem while converting blob data into string format.
for example,
Select dbms_lob.substr(c.shape.Get_wkb(),4000,1) from geotable c
will get me the first 4000 byte of BLOB .
When i using SQL as i did above,the max length is 4000, but i can get 32K using plsql as below:
declare
my_var CLOB;
BEGIN
for x in (Select X from T)
loop
my_var:=dbms_lob.substr(x.X,32767,1)
end loop
return my_var;
I comfortably convert 32k BLOB field to string.
My problem is how to convert blob to varchar having size more than 32K.
Please help me to resolve this,
Thanx in advance for the support,
NileshNilesh,
. . . .The result of get_wkb() will not be human readable (all values are encoded into some binary format).
SELECT utl_raw.cast_to_varchar2(tbl.geometry.get_wkt()) from FeatureTable tbl;
-- resulting string:
☺AW(⌂özßHAA
Å\(÷. . . .You may also want to have a look at { dbms_lob | http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i1015792 } "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs."
Regards,
Noel
Maybe you are looking for
-
Snow Leopard and new hard drive
I want to install a new hard drive in my MacBook and then restore from Time Machine. After I install the new hard drive do I have to reboot from the original OS X disk that came with my MacBook or can I just use the new Snow Leopard disk and restore
-
I currently have verizon Wireless sadly. I am looking to sign up for the iPhone GoPhone plan which is slightly cheaper than the normal plan plus I wont have to worry about have a contract with AT&T. Does anyone have ay tips to definatly fail the cred
-
Integrating "Recent Notifications",- from KM intto Universal worklist
Hi There Has anyone any experience with integrating The action inbx = "Recent notifications" from KM in the portal into the universal worklist so the users will get a complete picture of notifications from R/3 and also from KM in the portal... Is it
-
I have a macbook pro, iPhone 4 and iTouch 4. Both the iPhone and iTouch have been synced to my MacBook Pro. I just bought a MacBook Air for my wife and installed iTunes. I am unable to synced all the photos, diary, address book and other info from my
-
Mac OS 10.6 Safari 4.0.3. Cannot get Flash Player to install.
Did an archive and reinstall of the OS, then went to download center and downloaded Flash Player (again), but when I try to open a video, continue to get the message that I need to download the latest Flash Player. Called Applecare and they got me th