Tablespace usage report generated with html tags instead of text

Hi ,
We have a unix shell script scheduled to find tablespace usage and sends the report to our mail id.
For the past few weeks(no changes idone in the script) the report is coming with html tags instead of text as below.
</head>
<body>
<p>
<table border='1' width='90%' align='center' summary='Script output'>
<tr>
<th scope="col">
TABLESPACE_NAME
</th>
<th scope="col">
CUR_USE_MB
</th>
<th scope="col">
CUR_SZ_MB
</th>
<th scope="col">
CUR_PRCT_FULL
</th>
<th scope="col">
FREE_SPACE_MB
</th>
<th scope="col">
MAX_SZ_MB
</th>
<th scope="col">
OVERALL_PRCT_FULL
</th>
</tr>
<tr>
<td>
SYSTEM
</td>
<td align="right">
268
</td>
<td align="right">
500
</td>
<td align="right">
54
</td>
Is this any settings issue or anything to be modified in the script.Could you please reply..
Regards,
Bharath.
Edited by: 870384 on Jul 6, 2011 1:17 AM

Hi Sven W,
Please find the sql below that is generating the tablespace usage report. In the staring of the script markup is set to ON and at the end it is set to OFF.Do you suggest any changes to this..?
SET ECHO OFF
SET PAGES 999
SET MARKUP HTML ON SPOOL ON
col tablespace_name format a15 trunc
col cur_use_mb for 999999999
col cur_sz_mb for 999999999
col free_space_mb for 999999999
col max_sz_mb for 999999999
compute sum of cur_use_mb on report
compute sum of cur_sz_mb on report
compute sum of free_space_mb on report
compute sum of max_sz_mb on report
break on report
spool tablespace.html
select tablespace_name,
round(sum(total_mb)-sum(free_mb),2) cur_use_mb,
round(sum(total_mb),2) cur_sz_mb,
round((sum(total_mb)-sum(free_mb))/sum(total_mb)*100) cur_prct_full,
round(sum(max_mb) - (sum(total_mb)-sum(free_mb)),2) free_space_mb,
round(sum(max_mb),2) max_sz_mb,
round((sum(total_mb)-sum(free_mb))/sum(max_mb)*100) overall_prct_full
from (select tablespace_name,sum(bytes)/1024/1024 free_mb,0 total_mb,0 max_mb from DBA_FREE_SPACE group by tablespace_name
union select tablespace_name,0 current_mb,sum(bytes)/1024/1024 total_mb,sum(decode(maxbytes, 0, bytes, maxbytes))/1024/1024 max_mb
from DBA_DATA_FILES group by tablespace_name) a group by tablespace_name;
select owner,segment_name,segment_type,bytes/(1024*1024) size_m
from dba_segments
where tablespace_name = 'SYSTEM' and segment_name='FGA_LOG$' order by size_m desc;
spool off;
SET MARKUP HTML OFF SPOOL OFF

Similar Messages

  • TFS 2012 - WI Query in TFS Web Access - History field contents appear with html tags presented as text

    When History field is selected as a column to be displayed in a WI query result, its contents are displayed with the HTML tags as if they where text, e.g. <p> contents </p>... 
    This occurs when query is run in web access contents in IE and when result is sent via email from within TFS (there's a button for this purpose).
    However, in Visual Studio 2012 the same History Column contents are shown without the tags, as one would expect.
    Furthermore, when one clicks on Open In Microsoft Office, for this query results in VS, and selects result in Excel, the History column in the Excel appears empty.
    The only way we found to bypass this issue for now, it to mark all the query result lines in VS, and right click for "print selected list..." to a virtual PDF printer. This way the result looks reasonably ok when History field is included.
    Kindly advise, Thank u very much.

    Hi Moital,  
    Thanks for your post.
    As far as I know history content will display with the HTML tags if there’s multiple lines in content, and History content not support show in Excel, that’s by design in TFS Server.  
    As Clementino said, you can submit this scenario in connect site, Microsoft engineers will evaluate them seriously. 
    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.

  • Text in internal table with HTML tags.

    Hi ,
    I have Text in internal table with HTML tags.
    The text has to be shown in output of smartform as formatted text.
    That is the smartform should READ the HTML TAGS , convert the text accordingly and show in the output as formatted text.
    I dont want to make a webform . This is for NORMAL SPOOL output and NOT for WEB OUTPUT.
    IN SHORT
    :- the text in the internal table is like this ( please ignore the dot in the HTML TAG )--
    <html><.U>this is heading</.U>Line with no break<.br>some content text</.br>
    </html>
    OUTPUT
    <U>this is heading</U>Line with no break<br>some content text</br>
    1)  Can I can get the output and store it as text in a string variable and show in the smartform  ?
    In this case I want to know how to convert  and store in a variable  in sap .
    OR
    2) Can the text element convert the text with HTML TAGS to html formatted output and show it ?
    Regards,
    Jagat

    Hi,
    Use the FM SCP_REPLACE_STRANGE_CHARS and check
    See the
    Converting html special characters to plain characters (e.g. u00FC to u00FC)

  • How to put String with html tags as it is into xml

    I am using apache dom API to create xml from java.
    I have a string with html tags in it .when I add the string to xml, its replacing all the "<"; with &lt and ">" with > I would like the html tags to look as it is instead of the > and & lt;. How can I acheive that
    this is the code snippet of what I am doing
    In java class
    String titleString = "<font color=red>This Is an Example of a Red Subject</font>"
    Document doc = new DocumentImpl();
    Element root = doc.createElement("bulletin");
    Element item = doc.createElement("title");
    item.appendChild(doc.createTextNode(titleString));
    In Xml it looks like below
    <title><font color=red>This Is an Example of a Red Subject</font></title>
    but I would like to have the xml like below
    <title><font color="red">This Is an Example of a Red Subject</font></title>
    Can you please suggest me whats the best way to acheive this.
    I appreciate all your help
    Thank you
    Suma

    One problem is that you don't understand escaping. If you re-read what you posted you'll see that what you say you get, and what you say you want, are identical. That's because you didn't escape one of the two properly. So your first step should be to find the section about escaping in Chapter 1 of your XML book and read it carefully. Figure out what you should have done here (yes, the same rules apply).
    However, to attempt to answer what I think your question is: if you have a String which contains markup, and you want to convert that String to XML elements, then you have to feed the String into an XML parser.

  • Remove HTML tags from a text area

    Hi, here is my problem:
    I have a form with a text area item; this item is “Display as Editor HTML standard”. So it is possible to enter formatted text with tags HTML. Then I save the text in a table. In the column the text maintain the HTML tags. Afterwards I can put the text in a report, and I can see the formatted text with the tags HTML interpreted.
    But I need also to use that text for other aims, (i.e. sending it in a mail) with the html tags removed.
    Is there any way to remove HTML tags from a text item?
    Regards
    Dario

    From http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:769425837805
       FUNCTION str_html (line IN VARCHAR2)
          RETURN VARCHAR2
       IS
          x         VARCHAR2 (32767) := NULL;
          in_html   BOOLEAN          := FALSE;
          s         VARCHAR2 (1);
       BEGIN
          IF line IS NULL
          THEN
             RETURN line;
          END IF;
          FOR i IN 1 .. LENGTH (line)
          LOOP
             s := SUBSTR (line, i, 1);
             IF in_html
             THEN
                IF s = '>'
                THEN
                   in_html := FALSE;
                END IF;
             ELSE
                IF s = '<'
                THEN
                   in_html := TRUE;
                END IF;
             END IF;
             IF NOT in_html AND s != '>'
             THEN
                x := x || s;
             END IF;
          END LOOP;
          RETURN x;
       END str_html;There's also a reqular expression approach that I've not tried. Remove HTML Tags and parse the text out of it

  • HTML tags in Dynamic Text

    I am planning on building a website in flash with 90 percent
    of the site in dynamic text. Will flash read the html tags in a
    text file as text or html and code it as a browser would.

    yes, Flash will accept HTML tags, and there are a couple of
    different methods to make this work. But in my limited experience,
    it's a little tricky, and both require a little extra Actionscript
    to make them function. I read some info about this in some of the
    tutorials, but I can't point to them at the moment.
    First, one can use use the ' yourtext_txt.htmlText =
    yoursource_txt; ' method to read a plain text line that contains
    HTML tags. However there are some parameters that need to be set up
    before it will function properly, and there are several optionals
    to choose from, but it seems most importantly to set the HTML
    property to true as in ' yourtext_txt.html = true; ' but there
    still are several different things requried, especially if your
    looking for dynamic on-the-fly changes to different sections of
    text. here's a snipit I'd been working on that uses a similar
    system with arrays:
    did that work, huh? thought I was adding code.
    Another method is to use a CSS or by defining your own
    stylesheet tags within Flash Actionscript. This method seems to
    work better when using LoadVars, where you would define the
    ContentStyle. First you define the StyleSheet, then apply it to the
    dynamic text area (I'll try this again), here's a snipit: (OK I
    think i get it the code will attach to the end of this post, so I
    post the second set in a following post)
    These are just some examples though, from my own
    experimentations, and of course onw would define thier own
    variables. I'm no expert, but I hope this gets you going, just a
    few ideas.

  • Difference in the appearance of HTML vs. Standard reports generated with the Report Generation VIs?

    When I generate a "Standard Report" (to a printer or PDF) with the attached code, the output looks like this:
    If I instead use the same code to generate an HTML report, the output looks like this:
    Can anyone explain why the HTML output has had the extra spaces stripped out of it?
    Is there anything I can do to prevent it from happening?
    VI is attached (LV v11.0.1f2) but this is what it looks like...
    Attachments:
    Print Test.vi ‏47 KB

    SteveBale wrote:
    If you look at your html source the spaces are there. The problem is the way html is rendered it removes the spaces. You will either need to add in <pre> </pre> tags to tell the browser to include those spaces, or insert the string &nbsp; which the browser interprets as a single space.
    Regards,
    Steve
    OK, thanks. I guess I'll end up living with it the way that it is because
    using either method seems to also have the side effect of causing the output to become double-spaced and
    the only reasonable place to implement the change (so that it did not also impact the "standard report" output) would be within the report generation VIs and I'd rather not be modifying them.

  • Interactive Report with html tags --- Data saved in Excel with html tags

    Hello,
    I am using APEX 4.0. I have an interactive report that displays some of the columns bold and / or colors using html tags. As an example,
    SELECT
    '''<font color="green"><b>'' || SERIAL_NUMBER || ''</b></font>'' SERIAL_NUMBER,'||chr(10)||
    'PRODUCT_NAME,'||chr(10)||
    '''<font color="teal"><b>'' || PRODUCT_DESC || ''</b></font>'' DESC,'||chr(10)||
    'QUANTITY,'||chr(10)||
    FROM
    <Table name>
    At runtime, the Interactive Report displays the fonts, colors correctly; however, when I save the data of the Interactive Report in an Excel format, it saves the Html tags along in the EXCEL spreadsheet. For example, the column serial number from the above SELECT statement is extracted in an Excel column as ---
    <font color="green"><b>123456789</b></font>
    Is there another way to render the column data so that extracted data will not display the HTML tags or is removing the html font color tags from the SELECT statement the only option?
    Thanks in advance.
    Ed

    Hello,
    I have a feeling all your problems are related take a look at this thread. I found it in 10 seconds of searching the forum.
    strange tags
    It's always best to do a quick search first most likely you are not the first person to have this problem.
    Carl

  • Issue with HTML tags visible in Outlook emails

    Hi everyone, I'm having an issue with a website I'm working on.
    On our site, we have a page that generates emails after certain events occur. These are sent to a forwarding address on our mail server, which is then sent to several users on our mail server. These users have their accounts set up in Outlook (one in 2007,
    one in Mac 2011).
    We're are having an issue where these emails are displaying in Outlook with all of the HTML tags in the email visible. One of the users spoke to Microsoft support, and they remoted in and went through their Outlook settings and were not able to find any issues
    there.
    This issue is not global exactly. When one of the users added their email to their iPhone, the email displayed correctly. We added a Gmail account and my work account (which I also access through Outlook) to the forwarding list, and it displayed correctly in
    both. When we view these emails in the server's webmail client, the emails display fine. The issue seems to be with some discrepancy between Outlook and our email server.
    I spoke to our webhost about the issue, and they swore up and down the issue had nothing to do with them, and that it had to be an Outlook issue. I've had several professional web developers analyze the code that creates these emails, and they found nothing
    wrong with it. Something that several of my colleagues and our webhost suggested is that the issue could be with the email headers. This is the header for the email, as viewed through Outlook:
    Return-Path: <[email protected]>
    X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on clubcrown.com
    X-Spam-Level: *
    X-Spam-Status: No, score=1.5 required=7.0 tests=HTML_MESSAGE,MIME_HTML_ONLY,
    NO_DNS_FOR_FROM,NO_RELAYS autolearn=no version=3.3.1
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: by x.com (Postfix, from userid 30)
    id 50F7123D9E; Tue, 11 Feb 2014 14:20:00 -0500 (EST)
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: by x.com (Postfix, from userid 10000)
    id EC28323DA2; Tue, 11 Feb 2014 14:19:58 -0500 (EST)
    To: [email protected]
    Subject: A wholesale order has been placed
    X-PHP-Originating-Script: 10000:thanks.php
    MIME-Version: 1.0
    Any help would be greatly appreciated. Let me know if more information is needed. Thank you.

    Glad to hear that you have found the solution. And thank you for sharing the solution here, it will be helpful to other community members who have same questions.
    Cheers,
    Steve Fan
    TechNet Community Support

  • XML with HTML Tags... (easy points) 11g question

    Dear Programming Gods,
    I have been researching this for about 2 weeks now, and I have hit the final road block.
    Using BI Publisher 11.1.1
    In APEX 4.0 I have a Rich Text Field. The data from the Rich Text Field is store in CLOB. The data has HTML formatting tags. I have a data model that selects the data. I create an xml which has the html tags. I export the xml and import it into MS Word using the BI Publisher add-in. I import my subtemplate which handles almost all of the formatting tags. I apply the template to the CLOB field so that the HTML formatting tags will be rendered when printed.
    The problem is this. The subtemplate is looking for this < and / > however BI publisher convters the tags stored in the CLOB from raw html tags to this &.lt; and &.gt; so the subtemplate can not match to it.
    Here is what I need to figure out and please explain it in very novice terms.
    When I generate and export the XML from BI Publisher how do I prevent it from converting my raw tags?
    Here is some further assistance when prepairing your answer.
    My subtemplate is based on the htmlmarkup.xsl from the following blog but has been modified heavily to include support for simple tables, more formatting such as subscripts and superscripts, ect...
    http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    I am also familliar with this blog but I do not understand how to implement it using BI 11g.
    http://blogs.oracle.com/xmlpublisher/2009/08/raw_data.html
    I have tried adding this to my layout but it doesnt seem to work.
    <xsl: element name="R_CLOB" dataType="xdo:xml" value="R_CLOB" / >
    Please, help me. I have to have this working in 4 days.
    Richard

    This did not work either. Here's more infor on what I have so far.
    My data template looks like this:
    <dataTemplate name="Data" description="Template">
         <parameters>
              <parameter name="p_person_id" dataType="character" defaultValue="1"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                                  select TEMPORARY_TEMPLATE_DATA.line_id as LABEL_line_ID,
    TEMPORARY_TEMPLATE_DATA.column_id as LABEL_column_ID,
    TEMPORARY_TEMPLATE_DATA.person_id as LABEL_PERSON_ID,
    TEMPORARY_TEMPLATE_DATA.label as LABEL_DATA
    from MY_BIO.clm_TEMPORARY_TEMPLATE_DATA TEMPORARY_TEMPLATE_DATA
    Where person_id = :p_person_id
    and style = 'L'
                             </sqlStatement>
              <sqlStatement name="Q2" parentQuery="Q1" parentColumn="LABEL_DATA">
                                  select TEMPORARY_TEMPLATE_DATA.LINE_ID as LINE_ID,
    TEMPORARY_TEMPLATE_DATA.COLUMN_ID as COLUMN_ID,
    TEMPORARY_TEMPLATE_DATA.label as COLUMN_LABEL,
    to_nclob(TEMPORARY_TEMPLATE_DATA.COLUMN_DATA) as  COLUMN_DATA,
    TEMPORARY_TEMPLATE_DATA.STYLE as STYLE,
    TEMPORARY_TEMPLATE_DATA.ATTRIBUTE as ATTRIBUTE,
    NVL(TEMPORARY_TEMPLATE_DATA.JUSTIFY,'L') as JUSTIFY
    from MY_BIO.clm_TEMPORARY_TEMPLATE_DATA TEMPORARY_TEMPLATE_DATA
    Where person_id =:p_person_id
    and label = :LABEL_DATA
    and style != 'L'
    Order by line_id, column_id
                             </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_LABEL" source="Q1">
                   <element name="LColumnData" value="label_data"/>
                   <group name="G_DATA" parentGroup="G_Label" source="Q2">
                        <element name="LineID" value="line_id"/>
                        <element name="ColumnID" value="column_id"/>
                        <element name="ColumnData" value="column_data"/>
                        <element name="Style" value="style"/>
                        <element name="Attribute" value="attribute"/>
                        <element name="Justify" value="justify"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>
    After running this data_template there was no change in the xml file generated see partial :  Note:
    my test actually has the B with the html tags
    </G_DATA>
    - <G_DATA>
    <LINEID>20</LINEID>
    <COLUMNID>1</COLUMNID>
    <COLUMNDATA>test test <B>my test</B></COLUMNDATA>
    <STYLE>R</STYLE>
    <ATTRIBUTE />
    <JUSTIFY>C</JUSTIFY>
    </G_DATA>
    - <G_DATA>
    <LINEID>21</LINEID>
    I loaded in to MS Word but there was no change documnet still look the same. I left the commands import file command and xsl:apply-templates command in the word document template.
    I really appreciate you helpiing me.
    cheryl

  • Problem while rendering report generated with iText API

    Hi!
    I am stuck with problem of rendering report generated through iText API.
    What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
    But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
    The code is as follows, which I have used to render
    public class HTMLPrintRenderer implements Printable {
        ReportAbs objReport;
        JEditorPane editorPane;
        String fileName;
        final int STARTING_PAGESET_NUMBER=0;
        int currentPageSetNumber=STARTING_PAGESET_NUMBER;
        /** Creates a new instance of HTMLPrintRenderer */
        public HTMLPrintRenderer(ReportAbs  objReport) throws Exception{
            this.objReport=objReport;
            this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
            if(objReport.isLayoutLandscape()){
                SCALE =600.0/1000;//600.0/850;
            else{
                SCALE =600.0/850;
            init();
        private void init()throws Exception{
            setDocument(STARTING_PAGESET_NUMBER);
        public void setDocument(int pageSetNumber) throws Exception{
            editorPane=new JEditorPane();
            ((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
            editorPane.setText("text/html");
            editorPane.setPage("file:"+fileName+"."+pageSetNumber);
            currentPageSetNumber=pageSetNumber;
        int pageCountInPageSet=0;// counter to track number of pages in each pageSet
        int currentPage=-1;
        double pageStartY=0,pageEndY=0;
        final double SCALE;// =600.0/1000;//600.0/850;
        final int HEADER_HEIGHT=30;//50;
        final int FOOTER_HEIGHT=70;
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
            Graphics2D graphics2D;
            graphics2D = (Graphics2D) graphics;
            initEditorPane(editorPane,pageFormat);
            ReportPrinterUtility.printPageAttributes(pageFormat);
            /// print custom here... page numbers and page headers may be printed here
            /// meant only for HEADRS and FOOTERS
            ///                 caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
            /// @author Manoj       
            //TRANSLATE..............must also be reverse translated
            double x=pageFormat.getImageableX();
            double y=pageFormat.getImageableY();
            graphics2D.translate(x,y);
            paintCustomPage(graphics2D,pageFormat);
            //REVERSETRANSLATE
            graphics2D.translate(-x,-y);
            graphics2D.scale(SCALE,SCALE);
            //  V set clipping area
            int headerHeight=HEADER_HEIGHT;
                graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
                (int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
                (int) (pageFormat.getImageableWidth()/SCALE),
                (int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
            //  VI set pageStart on editorPane
            if (pageIndex > currentPage) {
                currentPage = pageIndex;
                pageStartY += pageEndY;
                pageEndY = graphics2D.getClipBounds().getHeight();
                pageCountInPageSet++;
            //  VII
            graphics2D.translate(graphics2D.getClipBounds().getX(),
            graphics2D.getClipBounds().getY());
            //  VIII prepare clipping area
            Rectangle allocation = new Rectangle(0,
            (int) -pageStartY,
            (int) (editorPane.getMinimumSize().getWidth()),
            (int) (editorPane.getPreferredSize().getHeight()));
            View rootView=editorPane.getUI().getRootView(editorPane);
            if (printView(graphics2D,allocation,rootView)) {//page exists          
                System.out.println("page exists"+pageCountInPageSet);
                return Printable.PAGE_EXISTS;
            else {// page does not exist
                System.out.println("resetting page parameters");
                pageStartY = 0;
                pageEndY = 0;
                currentPage = -1;
                if(!setupNextPage()){///more pages exist TODO:
                    return Printable.NO_SUCH_PAGE;
                else{//no more pages exist
                    //                call next page
                    pageCountInPageSet=0;//reset to first page in pageSet
                    resetGraphics(graphics2D,pageFormat);
                    return print(graphics2D,pageFormat,pageIndex);
    private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
            graphics2D.clearRect(0,0,
            (int)(pFormat.getImageableWidth()/SCALE),
            (int)(pFormat.getImageableHeight()/SCALE));
            graphics2D.translate(-graphics2D.getClipBounds().getX(),
            -graphics2D.getClipBounds().getY());
            graphics2D.scale(1/SCALE, 1/SCALE);
        }

    Hi!
    I am stuck with problem of rendering report generated through iText API.
    What exactly happens is, I have to put an image (.jpg) on my report, when I am generating HTML file using iText API, the image size is normal i.e., as it is taken.
    But when I render it to take print through printer, the size of image is getting short i.e., it prints like an Icon on Paper. What can I do to get the proper image size on paper also?
    The code is as follows, which I have used to render
    public class HTMLPrintRenderer implements Printable {
        ReportAbs objReport;
        JEditorPane editorPane;
        String fileName;
        final int STARTING_PAGESET_NUMBER=0;
        int currentPageSetNumber=STARTING_PAGESET_NUMBER;
        /** Creates a new instance of HTMLPrintRenderer */
        public HTMLPrintRenderer(ReportAbs  objReport) throws Exception{
            this.objReport=objReport;
            this.fileName=ReportsUtility.getReportLocation()+ objReport.getReportFileName();
            if(objReport.isLayoutLandscape()){
                SCALE =600.0/1000;//600.0/850;
            else{
                SCALE =600.0/850;
            init();
        private void init()throws Exception{
            setDocument(STARTING_PAGESET_NUMBER);
        public void setDocument(int pageSetNumber) throws Exception{
            editorPane=new JEditorPane();
            ((AbstractDocument)editorPane.getDocument()).setAsynchronousLoadPriority(-1);
            editorPane.setText("text/html");
            editorPane.setPage("file:"+fileName+"."+pageSetNumber);
            currentPageSetNumber=pageSetNumber;
        int pageCountInPageSet=0;// counter to track number of pages in each pageSet
        int currentPage=-1;
        double pageStartY=0,pageEndY=0;
        final double SCALE;// =600.0/1000;//600.0/850;
        final int HEADER_HEIGHT=30;//50;
        final int FOOTER_HEIGHT=70;
    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
            Graphics2D graphics2D;
            graphics2D = (Graphics2D) graphics;
            initEditorPane(editorPane,pageFormat);
            ReportPrinterUtility.printPageAttributes(pageFormat);
            /// print custom here... page numbers and page headers may be printed here
            /// meant only for HEADRS and FOOTERS
            ///                 caution... DO NOT ALTER GRAPHICS OBJECT ATTRIBUTES
            /// @author Manoj       
            //TRANSLATE..............must also be reverse translated
            double x=pageFormat.getImageableX();
            double y=pageFormat.getImageableY();
            graphics2D.translate(x,y);
            paintCustomPage(graphics2D,pageFormat);
            //REVERSETRANSLATE
            graphics2D.translate(-x,-y);
            graphics2D.scale(SCALE,SCALE);
            //  V set clipping area
            int headerHeight=HEADER_HEIGHT;
                graphics2D.setClip((int)(pageFormat.getImageableX()/SCALE),
                (int) ((pageFormat.getImageableY()+headerHeight)/SCALE),
                (int) (pageFormat.getImageableWidth()/SCALE),
                (int) ((pageFormat.getImageableHeight()-FOOTER_HEIGHT)/SCALE));
            //  VI set pageStart on editorPane
            if (pageIndex > currentPage) {
                currentPage = pageIndex;
                pageStartY += pageEndY;
                pageEndY = graphics2D.getClipBounds().getHeight();
                pageCountInPageSet++;
            //  VII
            graphics2D.translate(graphics2D.getClipBounds().getX(),
            graphics2D.getClipBounds().getY());
            //  VIII prepare clipping area
            Rectangle allocation = new Rectangle(0,
            (int) -pageStartY,
            (int) (editorPane.getMinimumSize().getWidth()),
            (int) (editorPane.getPreferredSize().getHeight()));
            View rootView=editorPane.getUI().getRootView(editorPane);
            if (printView(graphics2D,allocation,rootView)) {//page exists          
                System.out.println("page exists"+pageCountInPageSet);
                return Printable.PAGE_EXISTS;
            else {// page does not exist
                System.out.println("resetting page parameters");
                pageStartY = 0;
                pageEndY = 0;
                currentPage = -1;
                if(!setupNextPage()){///more pages exist TODO:
                    return Printable.NO_SUCH_PAGE;
                else{//no more pages exist
                    //                call next page
                    pageCountInPageSet=0;//reset to first page in pageSet
                    resetGraphics(graphics2D,pageFormat);
                    return print(graphics2D,pageFormat,pageIndex);
    private void resetGraphics(Graphics2D graphics2D,PageFormat pFormat){
            graphics2D.clearRect(0,0,
            (int)(pFormat.getImageableWidth()/SCALE),
            (int)(pFormat.getImageableHeight()/SCALE));
            graphics2D.translate(-graphics2D.getClipBounds().getX(),
            -graphics2D.getClipBounds().getY());
            graphics2D.scale(1/SCALE, 1/SCALE);
        }

  • Recordset xml export WITH html tags

    Hi there,
    I am trying a rather simple thing (I hope) but cannot figure it out how to do it.
    I created a dynamic xml (.php) file using the export recordset as xml behaviour. The generated xml works fine when I use spry to display it. The downside is that html tags are converted to something like this (I understand that these are the greater then and lesser then signs used in html):
    <strong>fringilla</strong>
    In the html document where I use spry to display this xml, the < etc are converted back to <  and >, but the html is not rendered.
    I tried cdata, but somehow cannot get this to work. I also cannot get dsSpecials.setColumnType("quote_tekst", "html"); to render the xml as correct html.
    Can someone tell me how to do this? Database and xml are both utf-8.
    Kind regards and big thanks in advance if you can help (it is really appreciated ;-D),
    Ben

    Sorry about that, don't know what happened in that last post..formatting I guess, here's the whole reply - xml enclosed w/ a pre - thanks again.<br /><br />Hi Günter,<br /><br />Thanks so much for the info.  I have been diligently trying to use CDATA and read the generated XML, but still I'm not seeing the HTML text rendereed in my detail section.<br /><br />The XML is setup from my mySQL data as:<br /><pre> <br /><?xml version="1.0" encoding="UTF-8"?><br /><CurrentSpecials><br />     <special><br />          <name> Caribbean Sun </name><br />          <detail> <h1>special deal!!</h1><p style="color:#00f;"><strong>Join us</strong>!</h1> </detail><br />          <expire> 2007-08-31 00:00:00 </expire><br />          <rating> highest </rating><br />     </special><br />...<br /></pre><br />and I want the detail to render in my div (or I'll add a table/textarea...) as the html indicates.  I'm not having any luck w/ using CDATA for it - it's probably just me - I'm just starting out with this stuff.  Any pointers in the right direction? I'm getting the detail as {dsList:detail} and somehow need to say - this is html.  I've tried using javascript and php to render it.<br /><br />I could I guess just echo the detail on a mouseclick without a spry but didn't want to have to do all the implementation myself - I wanted to take advantage of dreamweaver's functionality! <br /><br />Thanks so much for looking at this - any help is so much appreciated!!

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

  • How to Read a program with  HTML tags from SO10

    Hi All,
    I have a html program in Standard text (SO10).But when I am trying read the program content using FM:  READ_TEXT, the html tags <b> </p> etc are creating problem. 
    They are retrieved as <(><<)>b>.
    What should we do to get same/original text as in SO10?  Is there any other FM for that? Any other way to achieve this?
    Thanks & Regards,
    Vimalan Ram

    here is the code sample.
    after reading the text using READ_TEXT you have to use CONVERT_ITF_TO_ASCII to convert the contents.
    DATA: itf_tab TYPE STANDARD TABLE OF   tline ,
    wa_itf TYPE tline .
    DATA: c_datatab TYPE tdtab_c132 .
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       client                        = sy-mandt
        id                            = 'ST'
        language                      = sy-langu
        name                          = 'Y_RAJA_HTML'
        object                        = 'TEXT'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        = HEADER
      TABLES
        lines                         = itf_tab
    EXCEPTIONS
       id                            = 1
       language                      = 2
       name                          = 3
       not_found                     = 4
       object                        = 5
       reference_check               = 6
       wrong_access_to_archive       = 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.
    CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
    EXPORTING
    *   CODEPAGE                = '0000'
    *   FORMATWIDTH             = 72
       language                = sy-langu
       tabletype               = 'ASC'
    *   TAB_SUBSTITUTE          = ' '
    *   LF_SUBSTITUTE           = ' '
    *   REPLACE_SYMBOLS         = 'X'
    *   REPLACE_SAPCHARS        = 'X'
    IMPORTING
    *   FORMATWIDTH_E           = FORMATWIDTH_E
    *   X_DATATAB               = X_DATATAB
       c_datatab               = c_datatab
    *   X_SIZE                  = X_SIZE
      TABLES
        itf_lines               = itf_tab
    EXCEPTIONS
       invalid_tabletype       = 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.
    Regards
    Raja
    Message was edited by: Durairaj Athavan Raja

  • Parsing XML with html tags for style

    I'm using flash to pull in XML data, but I want to use html
    tags to be able to style the text. When I add any html, it treats
    it as a sub-node and ignores the data. Also, line breaks in the xml
    are being converted to double spaced paragraphs? The relevant code
    is basically this:
    if (element.nodeName.toUpperCase() == "TEXT")
    {//add text to text array
    ar_text[s]=element.firstChild.nodeValue;
    textbox1.text = ar_text[0];

    try to use htmlText instead text... like this:
    textbox1.htmlText = ar_text[0]
    adam

Maybe you are looking for