How to Display Html Text with Image

HI Frens,
I am getting some html text from a source, Later i want to
display that data, but it may happened that it has some images in
it. Currently I am using text area to display it.
Now My question is if there is any image will it show, as we
can see it in our mails? if Not, Which component I should use for
this?
I also want that I need to select some file from, How can i
get open dialog box here?
Thks in Advance for replies frens:
Ashish Mishra

Hi Ashish,
If I have understood your requirement properly, u want to
display html text on a flex application.
I think there its better if you use the html component to
display the text. I have a sample code which will give you a
direction to think on.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical"
creationComplete="initApp( )">
<mx:Script>
<![CDATA[
public function initApp( ):void
var initHtml:String = "<html><head> \
<title='Page Example'/> \
<body bgcolor='#ccddee'><h1>Page
Example</h1> \
<p>This is a complete <b>HTML</b> \
page as a
<em>string</em>.</p></html></body>";
this.html.htmlText = initHtml;
]]>
</mx:Script>
<mx:HTML id="html" width="100%" height="100%" />
</mx:Application>
Also do you want a file open dialog box??

Similar Messages

  • How to display html content with image in Adobe Flash and Flex mobile project?

    Hi,
      I have a html content with image in it. How to display it in Adobe Flash Builder and Flex mobile project? Which control needs to be used for this?

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • How to send HTML mail with images multipart/related message

    Hi,
    Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
    Thanks

    Hi,
    Could any body tell me how to send HTML mail with
    ith images in "multipart/related" message,if any body
    can give the code ,it would be helpful.
    ThanksHi!
    Refer to
    http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
    I've found it very helpful.
    Look at the last part for a code showing how to send HTML mail!
    Regards

  • How to save HTML file with images present in the server to local machine

    Hi all
    In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved.
    The code i am using is below :-
    l
                        File fname = new File(filePath);
                        if(!fname.exists())                return;
                        FileInputStream istr = null;
                        OutputStream ostr = null;
                        response.setContentType("application/"+format);
                        response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
                        try { 
                             istr = new FileInputStream(fname);
                             ostr = response.getOutputStream();
                             int curByte=-1;
                             while( (curByte=istr.read()) !=-1)
                                  ostr.write(curByte);
                             ostr.flush();
    Can anyone suggest what i need to do
    regards

    The client should probably parse the html that comes down, and look for <img> links, and request those of the server as well.

  • Dynamic text box, HTML Text with Image

    Hello Everyone,
    I am using Flash version 8. I have used the text tool and
    created a dynamic text box and have attached the UIScrollBar
    component to it. This text box is configured to allow the use of
    html text to be inputted to it. I have code that reads a file which
    contains a list of text files that I then read and place them into
    the text box. The user can use the scroll bar to scroll through all
    the text.
    I have created an image that is a picture of the tab portion
    of a file folder. On the tab I have place some text. This was all
    done in Photoshop. This tab image is used to separate the different
    stories in the text box. The image is save as a jpeg file
    Everything you have just read works with out any problems.
    Now for the problem!
    This image is only 20 pixels tall and the text is not very
    readable. As we all know the HTML tags are very limited in Flash 8.
    Ideally I would like to put the text and image in to the text
    box as I would normally do. Then place text on top of the image and
    have it all scroll properly with in the text box.
    I have taken the tab image and converted it in to a graph
    symbol and then put the text on top of the image. This looks good;
    however I don’t know how (or if it is even possible) to place
    the graphic symbol in to the text box at the correct place within
    the text.
    Does anyone have ideas on what may work? Remember that the
    image I am working with is only 20 pixels tall which is why the
    text quality on the image is so poor.
    Thank you all for any help you may provide,
    Steve

    Yes Tim I am using the <img> tag and I know that I
    can’t place text over the image. I have set the height and
    width to be the exact size of the image. However When you go to the
    webpage it will open the movie to the maximum size based on the
    resolution of your display; however I do maintain the aspect ratio
    of the movie. For testing I did set a fix size to the size of the
    movie. Sometimes the fix size (1000x750) looks better and sometimes
    a larger size (example 1280x1024). I believe that the main problem
    is the fact the size of the image is 670 pixels wide by 25 pixels
    high and of the 25 pixels the text is only 18 pixels tall. In
    Photoshop this makes it about a 1.75 point font. As you can see the
    real problem is that I don’t have enough pixels to make up
    the text. This is why I am looking for an alterative way to create
    the text.
    I tried importing the image into flash as a graphic symbol
    and then using the text tool to create the text. The results looked
    real sharp, the text was nice and crisp (just what I wanted). The
    problem is that I could not find a way to place the graphic symbol
    into the dynamic text area like id did using the <img> tag.
    This symbol needs to scroll as you scroll the text in the text
    area.
    This is why I am asking for help. I am looking for some ideas
    that may work.
    Thank you,
    Steve

  • How to Display RTF data with images from SQL database in Crystal Report

    I am using Crystal report in my WPF application, I have generate Question Paper Report, in which have Question with images. Question with images are stored in SQL Server in rtf format, I want to generate Question report with RTF Text and Images in report

    Hello Sir,
    I am still Facing problem in Crystal report generation with RTF Data (Text + Images),
    I am storing Questions in SQL Server which are RTF Format, Questions have Text + Images..
    I changed field data type then also i didn't get image in Crystal report
    if i browse an image n stored that in DB then its displaying in Crystal report, but when i pasted that image in RichTextBox and saved that in DB then no data displayed in Crystal report.
    My Table Structure is
    Table Name: tblQuestions
    field :    Questions Varbinary(max)
    I tried with nvarchar(max) also but its aslo not working

  • Help -- How to display Html text in a JEditorPane

    I'm trying to display html in a JEditorPane (html is obtained by transforming Xml and Xsl). So after i do the transformation i have a string which is the html source to be displayed. But when i use editorpane.setText(htmlString) method it is displaying the html source in the editorpane. I also tried using the HTMLEditorKit's read method. Even then its displaying the html source. But when i store the html source as a html file and give the editorpane, the url of the html file, it displays properly.
         I would be so grateful if u can help in displaying the html (which i have as a string) instead of the source...
    Thank you so much...

    Hi, after struggling with problem, the solution seems to be to ditch the content type meta tag, JEditorPane seems to barf (silently!) on this...
    So, to turn this off...
    transformer.setOutputProperty(OutputKeys.ENCODING,"");
    Cheers
    Greg

  • How to convert HTML text to image

    Hi all!
    I&acute;m having this problem: I have a html code (dynamic generated) and I need to convert it to a image, any idea how to do that?
    Thanks, J.

    Im no Java2D expert but if you want the actual code as an image couldnt you just use 'drawString("<br>", x, y)' to display it and then allow it to be saved as an image, I know theres built in capability in Java to import/export common image formats. Or do you mean you want what the html actually produces as an image?
    Ken

  • Use Powershell to replace text with image in Word document

    I have a powershell script that uses a Word document as a template to create signatures that I am pushing out to my organization.
    The document is populated with text formatted the way I want the signature to look, that I then do a FindText and ReplaceText on.  This works fine for replacing text with text, but I can't figure out how to properly replace some of the holder text with
    an image and a link.  I found a few posts about adding images to word documents, but none that seem to work properly in this scenario.
    Any insight would be greatly appreciated, thanks!

    Dear BOFH,
    You are correct that method I outlined is not for inserting an image into a signature block (which would be in Outlook, not Word).  The links you post do certainly deal with outlook signatures, well done... Except that the question was about how to
    use a Powershell script to replace text in a Word document with an image.  Sure it was framed in the context of creating signatures, but the poster expressed that they already had a method of generating and replacing text, and just needed to know, as
    I did, how to do the thing they actually asked.
    Please BOFH... Please forgive my audacity in hoping to find a reference (any reference) to how to replace Word text with images via Powershell in a thread titled "Use Powershell to replace text with image in Word document".
    This is certainly a scripting question, and even something as simple as "You will need to call the .NET methods for the Word find/replace functionality.  Please ask in the Word forums for the correct method to use. 
    If you need help on calling .NET methods look HTTP ://here"support you offered combined with the contempt you offer in response to my actual substantive help to the actual question asked.
    BOFH, you are not better than us, just more arrogant.
    Can you please start your own question as this one has been closed.  Please see scripting guidelines.
    We cannot guarantee you satisfaction as this is a user supported forum.  The is no SLA for community support.  Perhaps if you posted a better worded question as a new topic someone might be able to help you resolve your issue.
    The topic you are posting on is closed and answered.
    ¯\_(ツ)_/¯

  • How to edit a text with same font in a image in photoshop 7

    how to edit a text with same font in a image in photoshop 7

    Good day!
    The question seems to provide insufficient information for a relevant answer.
    Do you have the font?
    Is the text a (Type) Layer of its own or part of the image?
    Could you please post a screenshot with the Layers Panel visible?
    Regards,
    Pfaffenbichler

  • How to populate a page with images in across/down direction?

    Hi,
    Does anyone know how to populate a page with images in across and down direction (for example 6 X 6 )? It seems that I cannot use data table because records are only running downward and each row can have one record.
    Any suggestion would be appreciated. thanks.

    Alex,
    You can create your own tabular form using APEX_ITEM API's
    Create report and you can put similar code to following
    SELECT APEX_ITEM.TEXT(1,col1) pk1, APEX_ITEM.TEXT(2,col2) pk2 FROM your_tableSo data will be displayed in TEXT boxes as if it's a tabular form. Now you need to handle INSERT/UPDATE/DELETE processes manually. You can easily handle INSERT and DELETE. But handling UPDATE can be a nightmare. What if user has updated both the column values?
    Updated details
    One way out would be to use ROWID as Primary key to handle DELETE and UPDATE
    SELECT APEX_ITEM.CHECKBOX(1,ROWID) tick, APEX_ITEM.TEXT(2,col1) pk1, APEX_ITEM.TEXT(3,col2) pk2 FROM your_tablebut yet I suggest to go for proper primary key..
    Regards,
    Hari
    Edited by: Hari_639 on Dec 3, 2009 6:52 PM

  • How to display  servlet dynamically generated image ?

    Hi,
    How to display servlet dynamically generated image ?
    I have a servlet generating a buffered image in the doGet. I want to display the image in a jsp page with other information. I'm not able to get it properly displayed.
    **Try n# 1 **************************************************************
    This displays my image but nothing elle :
    ServletOutputStream sos = pResponse.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
    encoder.encode(img);
    **Try n# 2 ****************************************************************
    I tried also :
    In the servlet :
         request.setAttribute("renderedImage", img);
    and in the jsp page :
         BufferedImage image = (BufferedImage) request.getAttribute("renderedImage");
         <img src="<%=ImageIO.write(image,"jpeg",response.getOutputStream())%>" width="300" height="280"/>
    This last try draws big crap in the jsp page, thank you in advance.
    Nelson

    Call another servlet from the IMG tag. Have the servlet stream out the image using ImageIO (instead of writing HTML).

  • How to display the text as a Bold in the Text Element of a Smart Form

    Hi,
    I created one Smart Form.
    In that i created the Text element.
    I provide some data also in that.
    It is coming as a MS WORD.
    I executed my smart form.
    Customer Number:  &WA_KNA1-KUNNR&
    it display the data of the particular customer.
    But i need to display the Customer Number as BOLD or else Increase the Size.
    For this also I created one SMARTSTYLE.
    In that I created the Paragraph and Character Formats also.
    Now i assignee that SMARTSTYLE in the Output Option Tab of the Text Element also.
    But i unable to get the CUSTOMER NUMBER in Bold.
    In MS WORD we have BOLD button.
    I selected the Text and Press the BOLD button. At that time it is Highlighted.
    Whenever i press the SAVE Button.
    Then it is not saved with BOLD.
    It is coming in Normal Format.
    In the ECC 6.0.  I am unable to get the Text as a BOLD.
    This text Element is like a MS WORD.
    Can you please tell me how to display the Data with BOLD. please tell me. I am unable to get that one.
    Thank You.
    Regards,
    B. Krishna.

    Hi,
    Check where u have given BOLD. In character Format or in Paragraph format.
    In SMART FORM,
    1. Change to OLD EDITOR if u are confused with the new one.
            (This can be done by clicking the button left to new editor ).
    2. If it is PARAGRAPH FORMAT,
               Give the name of paragraph format in the editor.
                P1         &WA_KNA1-KUNNR&
        If it is CHARACTER FORMAT,
                             <C1> &WA_KNA1-KUNNR&
    Thanks,
    Nithya.

  • Fail to use Jeditorpane to display a text with big5 encoding

    Hi All,
    I fail to use Jeditorpane to display a text with big5 encoding correctly.
    It only show machine code.
    I am using jre1.6.0_17. Yet it works well with earlier version of jre like jre 1.6.0_15, and jre 1.6.0_16
    bcpscsin

    bcpscsin wrote:
    ..I can find it in javax.swing
    FFS! It is JEditorPane, not Jeditorpane. Count the freaking upper case letters in both of those!
    Convince yourself by following these two URLs
    [http://java.sun.com/javase/6/docs/api/javax/swing/JEditorPane.html] -> produces a web page.
    [http://java.sun.com/javase/6/docs/api/javax/swing/Jeditorpane.html] -> "Page Not Found"
    My point is - do not type 'something like' the class name - get it right so we can be sure. Programming is a technical business and programmers need to be very accurate. It is even more important to be very accurate when asking for help on an forum. People have very little time to 'hold your hand' about the correct spelling and capitalisation of class names - or anything else for that matter.
    You still have not answered my question about the bug database.

  • Search .docx and replace text with image

    I've got a directory containing a series of images. The images will always be the same name and I need to insert them into placeholders in a Word document which will be a template. I thought of using the image names as placeholders, opening the document
    and searching for the image name, replacing it by inserting the image, and doing so for each image in the directory.
    $file is the name of the image in the directory and it loops through them okay.
    foreach($file in Get-ChildItem $savepath -Filter *.jpg)
            # search word doc and replace selected text with image ($file)    
    Also inserting the image seems simple enough from a TechNet article I found, but I've got no idea how to open the Word document and do a search and replace. I found a few articles related to the subject but I couldn't get them to work when I tried to adapt
    them.
    Any help is appreciated. Thanks in advance.

    This 'might' be possible, but I'm having a hard time finding good references to the com object capabilities for inserting an image into a word document.  Creating new, converting format, that sort of thing is straightforward.
    I'd do a search on "powershell word comobject" and variations of insert image update edit, etc.  Or maybe someone else with more experience/knowledge has a magic bullet for you.  Once you get some info on doing it with powershell, expand
    your search by omitting the powershell keyword, there's gotta be some solid documentation for the comobject somwhere, but it will probably be a bit complex.
    You can also:
    $word = new-object -comobject word.application
    $doc = $word.documents.add("<path to word document>"
    and get-member to your heart's content, but finding references and/or documentation might be easier.  
    Good luck!
    Edit:  This could help, but really doesn't give much insight into placement of the image, only helps getting the image into the doc:  http://gallery.technet.microsoft.com/office/44ffc6c8-131f-42f1-b24b-ff92230b2e0a
    If you do find something useful, post it here, I'm sure others could benefit!
    SubEdit:  Should have thought of this already...
    http://msdn.microsoft.com/en-us/library/ff837519(v=office.14).aspx

Maybe you are looking for