Print dynamic styled text with a GUI

I need to write styled text in a computer and to receive and view it in another.
But I don't know how to get this styled text: is it possible to get an xml (or html) format of the content of a TextArea (or other text box) and on the other computer to parse the .xml (or .html) and print it in a graphics Area for example (I would also like the text to fit in the area shape but it's another story!)
could you help me?

Although I don't know how to use them, I believe the JTextPane class can help you out. There's another thread around here somewhere that is somewhat similar to this one. Check out the docs for it.
Jason

Similar Messages

  • How to make Dynamically Shortened Text With "Show More"

    Hi there! i want to know how to make dynamically shortened text with show more or read more in my website using HTML 5 pages  or ASP.NET ?
    example like these paragraphs 
    Lorem Ipsum är en utfyllnadstext från tryck- och förlagsindustrin. Lorem ipsum har varit standard ända sedan 1500-talet, när en okänd boksättare tog att antal bokstäver och blandade dem för att göra ett provexemplar av en bok. Lorem ipsum har inte bara överlevt fem århundraden, utan även övergången till elektronisk typografi utan större förändringar. Det blev allmänt känt på 1960-talet i samband med lanseringen av Letraset-ark med avsnitt av Lorem Ipsum, och senare med mjukvaror som Aldus PageMaker.
    Det är ett välkänt faktum att läsare distraheras av läsbar text på en sida när man skall studera layouten. Poängen med Lorem Ipsum är att det ger ett normalt ordflöde, till skillnad från "Text här, Text här", och ger intryck av att vara läsbar text. Många publiseringprogram och webbutvecklare använder Lorem Ipsum som test-text, och en sökning efter "Lorem Ipsum" avslöjar många webbsidor under uteckling. Olika versioner har dykt upp under åren, ibland av olyckshändelse, ibland med flit (mer eller mindre humoristiska).
    I motsättning till vad många tror, är inte Lorem Ipsum slumvisa ord. Det har sina rötter i ett stycke klassiskt litteratur på latin från 45 år före år 0, och är alltså över 2000 år gammalt. Richard McClintock, en professor i latin på Hampden-Sydney College i Virginia, översatte ett av de mer ovanliga orden, consectetur, från ett stycke Lorem Ipsum och fann dess ursprung genom att studera användningen av dessa ord i klassisk litteratur. Lorem Ipsum kommer från styckena 1.10.32 och 1.10.33 av "de Finibus Bonorum et Malorum" (Ytterligheterna av ont och gott) av Cicero, skriven 45 före år 0. Boken är en avhandling i teorier om etik, och var väldigt populär under renäsanssen. Den inledande meningen i Lorem Ipsum, "Lorem Ipsum dolor sit amet...", kommer från stycke 1.10.32.
    Den ursprungliga Lorem Ipsum-texten från 1500-talet är återgiven nedan för de intresserade. Styckena 1.10.32 och 1.10.33 från "de Finibus Bonorum et Malorum" av Cicero hittar du också i deras originala form, åtföljda av de engelska översättningarna av H. Rackham från 1914.

    Moved to the main Dreamweaver support forum.
    There are several ways you could approach this. Here's one you might try:
    Give the first paragraph an ID, such as "first", and wrap the paragraphs you want to hide in a <div> with another ID, such as "more". Then add the following block of JavaScript just before the closing </body> tag of the page:
    <script>
    var first = document.getElementById('first'),
         more = document.getElementById('more'),
         trigger = document.createElement('span');
    trigger.id = 'trigger';
    trigger.innerHTML = 'Show less';
    first.appendChild(trigger);
    function toggleDiv() {
      var state = more.className,
           text = trigger.innerHTML;
      more.className = (state == 'open') ? 'closed' : 'open';
      trigger.innerHTML = (text == 'Show more') ? 'Show less' : 'Show more';
    toggleDiv();
    if (trigger.addEventListener) {
        trigger.addEventListener('click', toggleDiv, false);
    } else if (trigger.attachEvent) {
      trigger.attachEvent('onclick', toggleDiv);
    } else {
      trigger.onclick = toggleDiv;
    </script>
    This gets references to the "first" paragraph and the "more" <div>. It also creates a <span> with the ID "trigger" that's appended to the "first" paragraph. The rest of the script defines a function called toggleDiv(), which toggles the "more" <div> open and closed, and changes the text in the "trigger" <span>.
    You also need to create the following style rules for the various elements:
    <style>
    #trigger {
        text-decoration: underline;
        color: blue;
        cursor: pointer;
    #more {
        transition: ease-out .7s;
        overflow: hidden;
    #more p:first-child {
        margin-top: 0;
    #more.closed {
        height: 0;
        -webkit-transform: translateY(-600px);
        transform: translateY(-600px);
    #more.open {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        max-height: 600px;
    #more + p {
        margin-top: 0;
    </style>
    This solution hides the text and creates the "trigger" <span> only if JavaScript is enabled in the browser. It should work in all browsers, including Internet Explorer 8 and earlier.

  • Dynamic Standard text in SmartForms

    Hi,
    I have requirwemnt where I need to retrive the data from the Standard text to display.
    But it variews based on SalesOrge and Comany Code u2018Zxxxx_SALES_yyyyu2019 here XXXX is SalesOrge and YYYY Company code.
    How to call the standard text Dynamically in Samrtform?
    Regards
    Irfan

    Hi,
    For displaying standard text dynamically, just follow the following steps:
    1. Create a text element and in general attributes give type as Include Text.
    2. Instead of providing any static Standard text in Text Name field, you need to click on the arrow button pointing right, which is for Dynamic Field Value. There you can provide your variable as &VARIABLE&, which contains the standard text name based on the conditions.
    3. Pass value statically like Text Object-TEXT,  Text ID - ST , Language - EN or else you can passs them dynamically as per your requirement.
    As you will be passing variables in order to print dynamic standard texts, it is better to check the option "No error if no text exists".
    Karthik
    Edited by: Karthik S on Sep 2, 2010 2:40 PM

  • I lost Message Styled Text bean - please help me to find it

    Hello fellows,
    within /oracle/apps/fnd/wf/worklist/webui/NotifDetailsRG page i created new "Message Styled Text"with ID= “xxitMyTestTxt01”
    with default property "Rendered" = false. Also i created controler which on processRequest should set this message styled text rendered true.
    Could you please share the code which finds this text bean within current page? Meanwhile i've experienced some difficulties in doing this.
    Thank you in advance.

    maharadza ,
    I think all of us Shiv, Tapash and me have repeated this in couple of threads in recent past, that forum is a place where you should put ur quieies,when u don't find solution in none of the available sources:
    1)Dev Guide
    2)Old threads in this forum.
    Ur query is very generic, and i think u will many threads where this is been dealt.We are here to help but not teach basics.
    Instead of telling others to keep silent and making strange remarks,I think you should follow the same.I have seen threads where Shiv has helped people in threads which go beyond 3-4 pages, even when the user is asking very basics.
    So, Replying threads is no piece of cake, people replying here manage to take out time from there regular job to help others..... which they are not bound to...(sometimes, even try the same scenario themselves to help the others), so, just try to reply only 10 threads on any tech for 1 week, u would know that.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Print Dynamic Content with printJob

    I recently developed a help resource application that builds
    the interface and loads all the main and sub navigation items,
    pages contents, and related resources dynamically. This was to make
    it easy to provide search and print functionality, as well as
    interface scalability. Therefore my print feature creates a print
    layout MovieClip (so as to format well for 8.5 x 11 and printer
    margins) and loads the appropriate text content related to the
    visible page on screen when the print button is pressed.
    I thought the print was all set to go, but what I found out
    is that once you print a page of the Help Resource application that
    same page prints in place of any other page you print from there on
    out.
    My print button calls a function that pulls all the
    appropriate dynamic data (page title, page contents, related
    resource names, etc.) and formats it as HTML and adds it to my
    print layout MovieClips text field (docPrint._txt).
    That function then calls my printJob function which creates a
    blank sprite, adds my print layout movieclip to that sprite,
    resizes the print layout MovieClip’s text field to fit
    appropriately within the printer margins and prints the file.
    Anyone have any ideas why my dynamic content prints as the
    same page each time? Note that if I trace the contents of my text
    field for my print layout MovieClip the contents change each time,
    but the print stays the same.
    Sorry for the long post and huge thanks to anyone who may
    have an answer.
    Have a great day!

    I am responding to my own post as I found a solution, though
    I am now about bald from pulling all my hair out. Hopefully this
    helps even one random soul in the future as the printJob class
    seems to be one of the hardest to get help with or find information
    online that pertains.
    My code dynamically creates print page contents based on the
    on screen contents the user is currently viewing within my
    application. My print functions were always printing the first page
    that was printed no matter what page within the application the
    user was viewing.
    As I have learned to do, I was declaring the variables for my
    print objects in the root of my actionScript (outside all the
    functions so they could be accessed across functions).
    I had two variables:
    var docPrint:document = new document(); // A MovieClip layout
    for my print page located in my library
    var printPage:Sprite = new Sprite(); // The Sprite to hold my
    MovieClip for print purposes as a sprite is required
    I also had two functions:
    docContentsLoad(); // Loaded contents into docPrint Movieclip
    and formatted
    printJob(); // Created print job, adjusted docPrint for
    printer settings, and sent print
    It turns out the easiest solution was to combine my two
    functions into one printJob function and place my two variables
    (docPrint & printPage) at the beginning of the function. Now
    the printing works fine everytime. No more repeat pages.
    My assumption is that the only way to truly reset the print
    document is to delcare the variables within the function being
    called to print the document so that they are redeclared each
    time.

  • Texts with correct font are not printed

    Hi All,
    I am printing the Adobe form with some header and item texts.
    I have created a style in smartforms so that the texts in the layout would be printed accordingly.
    In the context part, I have created the text and assigned the text module. I have also given the style name at the time of creation, checked 'Copy style from text module' also. But still in the layout the texts are not printing with correct font.
    Currently the texts are prining with default font which i have declared in style.
    Do we need to give the paragraph format or style name anywhere?
    Thanks and Regards,
    Karthik Ganti.
    Message was edited by: Dezso Pap

    Hello Karthik,
         If font is uniform throughout the text, then no need to create the Smartstyle. You can do this with JavaScript.
    1. Click on the text field.
    2. Write the below JavaScript in the Initialize event.
    this.font.typeface = "Arial";
    This will override the default font which you had selected at the design time.
    If you want to change the weight, you can also do that as shown below.
    this.font.weight = "bold";
    Here I have hard coded the font name and weight. If you want to do this dynamically, you can store the font name in a custom table and then assign it in the layout.

  • Is there a way to print the check register with the Text field

    Hi,
    Is there a way to print the check register with the Text field and also each item's Text field?"
    When we enter a invoice we enter a generic text on the Basic Data tab then enter a "+" on each individual line item which in turns defaults to the generic text. Just wanted to know if the check register could draw in the individual line item detail where we can enter text that relates to just that line item. Sort of like the MIR7 draws in the detail for each item.
    Kindly help me in full fill the above requirement.
    Thanks
    Sunitha

    Hi,
    Can any one help me on this issue?
    Thanks
    Sunitha

  • Printing Text with multiple Lines

    Hello,
    i want to print a list and in that is text with multiple lines.
    In the PrintPreview and in the Printout i get only one line.
    How is the best way to do this?
    Thank you,
    Markus
    Private Function Print_Remarks_Control_Get(ByVal pstrText As String) As TextBox
    Dim TextBox_Out As New TextBox
    With TextBox_Out
    .Text = pstrText
    .HorizontalAlignment = Xaml.HorizontalAlignment.Left
    .VerticalAlignment = Xaml.VerticalAlignment.Top
    .FontSize = 16
    .Margin = New Thickness(15)
    .AcceptsReturn = True
    .MinWidth = 800
    .MinHeight = 600
    End With
    Return TextBox_Out
    End Function
    Sub PrintPageList_Prepare()
    Dim i As Integer
    Dim objVM As clsTextVM
    Dim lstText_List As ObservableCollection(Of clsText)
    Dim ctrPrint_StackPanel As StackPanel
    Dim ctrPrint_Title As TextBox
    Dim ctrPrint_Description As TextBox
    Dim ctrPrint_Remarks As TextBox
    Dim objText As clsText
    mPrintPageList.Clear()
    objVM = DirectCast(Me.DataContext, clsTextVM)
    lstText_List = objVM.CustomClass_List
    ctrPrint_StackPanel = Print_StackPanel_Get()
    For i = 0 To lstText_List.Count - 1
    objText = lstText_List.Item(i)
    If objText.Name.Length > 0 Then
    ctrPrint_Title = Print_Title_Control_Get(objText.Name)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Title)
    End If
    If objText.Description.Length > 0 Then
    ctrPrint_Description = Print_Description_Control_Get(objText.Description)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Description)
    End If
    If objText.Remarks.Length > 0 Then
    ctrPrint_Remarks = Print_Description_Control_Get(objText.Remarks)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Remarks)
    End If
    Next
    mPrintPageList.Add(ctrPrint_StackPanel)
    End Sub
    Private Sub OnGetPreviewPage(sender As Object, e As GetPreviewPageEventArgs)
    ' Das ist die MessageBox
    ' Windows.UI.Popups.MessageDialog()
    PrintPageList_Prepare()
    mPrintDok.SetPreviewPage(e.PageNumber, Me.mPrintPageList(e.PageNumber - 1))
    End Sub

    Yes, not only RichEditBox but also RichTextBlock can also do this. Besides TextBox also have TextWrapping functionality.
    -James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Dynamic Standard text - Appending text with variable

    Dear All,
    We have a dynamic standard text. The text is being created based on sales order (I don't know how this has been created). Now I want to add text inside the standard text. That text will also contain variable.
    Example: "This is a valid sales order 100010000". This is a standard text where the sales order value is fed dynamically, I don't know how?
    Now the objective is to add another field "abcd" in the standard text with some other fixed texts. Eg. "I want to add my name sy-uname". So the entire text should be as:-
    "This is a valid sales order 100010000. I want to add my name sy-uname."
    1.  I am not sure how to identify the original standard text. I would like to add second line there.
    2.  I would like to pass variable value dynamically in the standard text.
    Please can you help me out in solving the issues.
    Best wishes,
    Atanu

    Hi
    Could you please be clear with your question so that some one can provide you with best solution quickly.
    I am assuming that when your sales order is being created at the same time ,your dynamic standard text is generated .So now you want to amend this standard text just after the sales order is saved.If so then
    Just go to the sales order text tab in change mode and click on the text eidtor window ,it will take to you sapscript editor ,Then from menu Goto-Header .From here you get the details of
    Text Name      
    Language       
    Text ID        
    Text Object  
    Now Find the userexit after save and their use a read_text function module and read the standard text which is alreday created and take down in it_lines table and modify the text by appending your sy-uname line as second line or you can concetante on the same line. Now then use the save_text function module and save the standard text.
    You can use the exit MV45AFZZ In that routine FORM userexit_save_document..
    Hope this help you to resolve the issue.
    Cheers
    Joginder

  • Problems with displaying dynamic Arabic text

    We have a problem with a navigation system we are building
    which has to be able to display dynamic Arabic text. We are pulling
    in the Arabic text using XML. The problem we are having is that the
    character are not displaying joined up where they should be (for
    instance in the middle of words). Arabic characters have different
    shaping according to the position they take up within a word. What
    we are producing is apparently unreadable. Has anyone come accross
    this problem before? Is it solveable?

    Hi:
    Is there any possible chance that Adobe would do something to asist us Fl8 users with international character support.
    Everyone has some work-around, except Abode, and they are all usually related to XML.
    My setup is PHP (CMS supporting many languages) -> MySQL -> PHP -> Flash8 (Dynamic Text Fields) and the olpart that does not work is when I inject an extended character into the string - Flash stops displaying anything from that character on.
    If Adobe has or did have some component / solution or anything other than the usual System.useCodePage = true (which never seems to actually work), please let me know.
    Best Regards,

  • Psc 1350 prints text with shadow in Windows 7

    My all in one psc 1350 prints the text with shadow since I upgraded to Windows 7, the buttons do not work, but the rest does, any suggestions about how I can correct the shadow issue? 
    I tried to upgrade the driver, but with no success

    My guess would be this is due to a color cartridge with misdirected nozzles.  Printing from PDF or a web page would print the text as a graphic which would use the color cartridge.  Try the following:  remove the color cartridge and print a page that previously was shadowed.  Does it now print correctly?  If so the issue is the color cartridge and running a cleaning cycle may help.  It is also possible that the color cartridge has failed electrically, causing it to fire nozzles inappropriately.  In this case a new cartridge would be required.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How to print Text with Java

    I am new to java, learning fast, lots of new stuff every day. i want to develop an application that can print a report (Text mostly eg. Like an Invoice) to a printer. i am searching the net still cant find nothing that i can understand. Help please

    To learn java printing, you may want to visit:
    http://java.sun.com/j2se/1.4.2/docs/guide/jps/
    or
    http://java.sun.com/docs/books/tutorial/2d/printing/
    Or you can download reporting tool, please visit:
    http://jasperreports.sourceforge.net/
    or
    http://www.elixirtech.com/
    Okie! God bless :)

  • Using htp.p for print dynamic data in apex region make my page slow?

    Hi, everyone!!! My name is Rafael, and...
    I search in the web and in this forum but i can´t find a answer for my doubt.
    Using the procedure htp.p for print dynamic data in apex region through on demand process , this will leave my webpage slow to load when the user access?
    Example:
    For build a menu in my webpage, it´s read a function in the database that returns variable string, so by a demand process this string is obtain and print in a web page using htp.p.
    I notice that this practice causes slow to load the data on the page.
    This is it...
    If someone help me, thanks...
    bye and Happy new Year!!!
    Edited by: user9518141 on 26/12/2009 17:19

    Hi,
    Try commenting out the function call and print some sample text in the htp.p like htp.p('Hello world..');
    I think the function call is probably taking a lot of time .. not htp.p.
    I have used htp.p to print out values dynamically in a lot of situations and have not ever come across any performance issues.It could be a problem with the function you are calling.
    Thanks,
    Rajesh.

  • Printing Form Header Text in Smartforms

    Hi,
    I have created smartform for SD module.I am printing Form header text in a window by using loop.I am getting the text with the help of READ_TEXT  function module.It comes as we type in Form header.But the problem is if they type more than 15 lines it is not printing.I want to print the rest of the lines in next page.How to do this?

    Hi,
    In smartforms, only the main window is a dynamically varying one.
    So give your include text concept in the main window..
    so that if your text increases more than a page, it will be printed in the next line..
    You can maintain your text in so10 transaction.. with text id and text name..
    using include text u can simply give the Id and text name in forms, you will get the enetered text.
    regards,
    vijay.R

  • Print/Save Selected Text to PDF

    I want to use Mozilla Firefox very much for a long time. I like it because the UI is very clean, easy to use, the icon vey pretty. When I use in my Android Mobile, it is very easy and intelligent to select content of page site. Very good!
    But I had to install Chrome instead so I've always been using "Print a selected content to PDF" but I couldn't find ways to do that with Firefox. Chrome is doing very good.
    I searched all add-ons, pdf printer software but they are only saving or printing all the page (website) to PDF.
    Please help me the ways to save a selected content to PDF. Thanks very much.

    Hii hanh01001..
    I think i know one solution to the problem
    https://addons.mozilla.org/en-US/firefox/addon/print-selected-text/?src=api
    this is an add on that is used to print the selected text only..
    have a nice day :) :)
    ---Thanks tracy :)

Maybe you are looking for

  • Problem with Korean Word Counting

    After upgrading to Yosemite 10.10.3, Korean word counting in Pages got mesed up. Before the upgrade, there was no problem. But now Pages counts every single letter I typed as a "word." As a writer who should be sensitive to the number of words I type

  • Help with Premiere elements 9 trial

    Hi, I am new to this, and need a little help.. I have the trial version of Premiere Elements 9 and I'm finding that when I try to split a clip in two using the scissors button, that it goes into auto analyzer, which seemingly takes about 6 - 10 minut

  • Help importing 9i components into Software Packager

    Hi All, I have finally managed to get Software Packager sort of running however when I try to import components from the 9i CD Rom set the installer is looking for a non existent jar file in the stage dierectories. It seems to search for a comlns.jar

  • Can I delete an old vault?

    Hi. I went from Aperture 1.5 to 2.x successfully. I don't see anything missing and I'm running smoothly. Before the upgrade I duped my 1.5 vault and library and tucked them away on FW for safekeeping. Now that I'm satisfied with the performance can I

  • Error "Attempted to read or write protected memory"

    When I started using Microsoft Visual 2008, he began appearing this error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" and not know what could be. To debug the program the error occurred afte