How to remove html tags from the pdf file ?

Hello,
Using BI publisher we are generating a pdf file. In the table, we have data which contains html tags. for example " test1<br> 2.test2<br> 3.test3<br> ".
In the pdf file we need to get the output like this
test1
test2
test3
But the output is as follows :"test1<br> 2.test<br> 3.test3<br> "
Any idea, how these html tags can be removed from the pdf file and obtain the required result?
Thanks in advance!!
Archana

Archana,
Can you wrap your code in <code> tags (use square brackets rather than angled ones), as the forum software is interpretting the HTML tags, in other words we can't see what you mean ;)
In any case, there are a few different options (guessing at what your problem is, without seeing the actual data), you could use htf.escape_sc or replace, regexp_replace etc to substitute the values before you output them to your PDF.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • How to remove HTML tags from a String ?

    Hello,
    How can I remove all HTML Tags from a String ?
    Would you please to give me a simple example ?
    Best regards,
    Eric

    Here's some code I cooked up. I have created an object that processes code so that it can be incorporated directly into a project. There is some redundancy so that the it can be used in more than one way. Depending on your situation you might have to make the condition statement a little more sophisticated to catch stray ">" tags.
    I have also included a Tester application.
    //This removes Html tags from a String either by submitting the String during construction and then
    // calling getProcessedString() or
    // by simply calling " stringwithoutTags=removeHtmlTags(stringWithTagsSubmission); "
    //Note: This code assumes that all"<" tags are accompanied by a ">" tag in the proper order.
    public class HtmlTagRemover
         private String stringSubmission,processedString,stringBeingProcessed;
         private int indexOfTagStart,indexOfTagEnd;
         public HtmlTagRemover()
         public HtmlTagRemover(String s)
              removeHtmlTags(s);          
         public String removeHtmlTags(String s)
              stringSubmission=s;
              stringBeingProcessed=stringSubmission;
              removeNextTag();
              return processedString;
         private void removeNextTag()
              checkForNextTag();
              while((!(indexOfTagStart==-1||indexOfTagEnd==-1))&<indexOfTagEnd)
                   removeTag();
                   checkForNextTag();
              processedString=stringBeingProcessed;
         private void checkForNextTag()
              indexOfTagStart=stringBeingProcessed.indexOf("<");
              indexOfTagEnd=stringBeingProcessed.indexOf(">");
         private void removeTag()
              StringBuffer sb=new StringBuffer("");
              sb.append(stringBeingProcessed);
              sb.delete(indexOfTagStart,indexOfTagEnd+1);
              stringBeingProcessed=sb.toString();
         public String getProcessedString()
              return processedString;
         public String getLastStringSubmission()
              return stringSubmission;
    public class HtmlRemovalTester
         static void main(String[] args)
              String output;
              HtmlTagRemover h=new HtmlTagRemover();
              output="The processed String: "+h.removeHtmlTags("<Html tag>This is a test<another Html tag> string<yet another Html tag>.");
              output=output+"\n"+" The original string:"+h.getLastStringSubmission();
              System.out.print(output);

  • How to remove html tags from a column

    Hi
    Problem is this: I get a column with a comma separated list of id's and I can successfully parse these id's and use them elsewhere. BUT, occasionally there are html tags within that id list like this:
    1082471,1237423<br xmlns="http://www.w3.org/1999/xhtml" />
    Is there a way to just automatically remove all tags from a column? Could do this with regex, but since there is no support, I don't know what to do.

    Hi,
    If the HTML can be detected by a starting symbol like „<“, then you could use the following:
    Unfortuntely the operation “ReplaceRange” is only available on a Text-level, so you have to invoke a function (at least to my knowledge). You also need an Index-column in your table, so if you don’t have it, you need to create one as well.
    This is your function:
    let
       fnRemoveHTML = (Value, Index) =>
    let
       Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
       IndeNo = Index,
       Value_ = Source{IndeNo-1}[Value],
       length = Text.Length(Text.From(Value_)),
       position = Text.PositionOf(Text.From(Value_), "<"),
       range = length-position,
       new= if Value_ is number then Value_ else Text.ReplaceRange(Value_, position, range, "")
    in
        new
    in
      fnRemoveHTML
    And this is how you invoke it:
    let
        Quelle = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content],
        Last = Table.AddColumn(Quelle, "Custom", each fn_RemoveHTML([Value], [Index])),
        ChangedType = Table.TransformColumnTypes(Last,{{"Custom", type number}})
    in
        ChangedType
    Provided your table is called “Tabelle1” & the column with your values to be replaced “Value” & your index-col “Index”
    Imke

  • How to remove html-tags from a text.

    Hello!
    I have a text-field which I will remove html-tag's from.
    Example:
    "This is a test<br><p> and another test"
    The function must return a similar text, but without the html-
    tags <br> and <p> (in this case).
    Anybody that can help me with this little problem?
    Thanks in advance for any help :-)
    Best regards
    Kjetil Klxve

    You can wait for some kind personal to post a complete code
    solution... But if you want to fix this yourself (which is good
    for the soul) here are some hints:
    - You can use SUBSTR to get at chunks of text
    - You can use INSTR to find particular characters.
    - You can use INSTR as an argument of SUBSTR
    Hence:
    bit_of_text := SUBSTR(text, 1, INSTR(text, '<'));
    chopped_text := SUBSTR(text, INSTR(text, '<'));
    bit_of_text := bit_of_text||SUBSTR(chopped_text, INSTR
    (text, '>'), INSTR(text, '<'));
    will give you the first bit of text that doesn't contain any
    angle brackets.
    From this you should be able to work out how to functionalised
    this (you'll need to store the offsets and use them in a loop
    construct).
    Note that this assumes that the text only contains the '<'
    character when it's part of a HTML tag. If you can't guarantee
    this then you'll have to explicitly search for all the tags e.g.
    bit_of_text := SUBSTR(text, 1, INSTR(lower(text), '<p>'));
    bit_of_text := SUBSTR(text, 1, INSTR(lower(text), '<br>'));
    This will be a bit of pain. And completely rules out XML!
    rgds APC

  • How to remove empty tags from a config file

    Hi all,
    I have a task where we need to run a Java program to remove tags which do not contain ny information from the config files. The format of the file is as under:
    <roleManager>
         <providers>
              <add name="AspNetSqlRoleProvider" b03f5f7f11d50a3a" />
              <add name="AspNetWindowsTokenRoleProvider" PublicKeyToken=b03f5f7f11d50a3a" />
         </providers>
    </roleManager>
    <httpModules>
    </httpModules>
    In the above lines <roleManager> is a tag which contains some data, while <httpModules> is an empty tag and does not conatin any data. The resultant should be:
    <roleManager>
         <providers>
              <add name="AspNetSqlRoleProvider" b03f5f7f11d50a3a" />
              <add name="AspNetWindowsTokenRoleProvider" PublicKeyToken=b03f5f7f11d50a3a" />
         </providers>
    </roleManager>
    Please suggest how can we achieve this?
    Thanks in advance

    I ususally do that type of thing with a state machine... read a token, look for what is next, and if it's the closing token, I don't write it out. You have well defined opening token syntax and closing token syntax, so it should be relatively easy.

  • Problem removing html tags from the text retrived

    Hi there,
    I am using jdbc to connect the database and retriving the data. In one of the columns along with the description there are some html tags in few of the recors of that column. is there a way to retrive the text only ignoring the html tags in between. Or can i retrive and then strip off the html code in the text to display only normal text.
    example of the data retrived which are pipe seperated and one of the columns has html tags in it:
    209|The euphoria |187945-2|http://www.abc/lst.jsp?mktgChannel=I86023&sku=18791-2&siteID=qpF0HYnRugA|http://www.abc.com/assets/images/product/medium/18793-2_198.jpg|Rooftop Singers: Walk Right In | abc Music proudly presents THE FOLK YEARS, an unforgettable era in music history!<BR><BR><B>Featuring:</B><BR>
    <LI>The most complete collection of folk and folk-rock songs ever put together -- 132 classics!
    <LI>Original hits by the original artists!
    Now i need to remove the tags before displaying this on the output. Is there a simple way to do this.
    Thanks...

    Did you read the documentation of the trim() method,
    where it describes which whitespace it removes?I believe his problem is that
    "Some text here  
    <blah> 
    More text"becomes
    "Some text here  
    More text"... and he wants ...
    "Some text here
    More text"So, your problem is that your regex isn't matching whitespace as well.
    See the "Trimming Whitespace" section:
    http://www.regular-expressions.info/examples.html

  • How to remove a link from a pdf file

    I am reading a pdf file using preview. I is a freely available research article. While marking words to look them up in the dictionary I noticed on two of the 40+ pages, the curser had changed from the "mark text"-symbol to the hand symbol as one would expect when hovering over a link. When I click on the pdf page safari opens up and lead me to the publishers website offering distantly related articles to the one I am reading at the moment. When I open the exact same pdf file in adobe acrobat 11, no such behaviour can be observed. Is there an explanation for that, more importantly can I switch the link of?
    many thanks
    Chris
    Running mountain lion .4, Safari 6.0.5, preview 6.0.1 and Adobe acrobat 11.0.02
    file in question: http://www.demographic-research.org/Volumes/Vol22/34/

    Archana,
    Can you wrap your code in <code> tags (use square brackets rather than angled ones), as the forum software is interpretting the HTML tags, in other words we can't see what you mean ;)
    In any case, there are a few different options (guessing at what your problem is, without seeing the actual data), you could use htf.escape_sc or replace, regexp_replace etc to substitute the values before you output them to your PDF.
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Anyone know how to remove a envelope around a PDF file?

    anyone know how to remove an envelope from a PDF file imported to AI?

    Ask your question in the Acrobat forum:
    http://forums.adobe.com/community/acrobat/acrobat_windows

  • How do I set BI Publisher to read html tags from the database?

    How do I set BI Publisher (Release 10.1.3.4) to read html tags from the database? For example if the text is quoted with a bold tag I want my output to display the text in bold. Is there a setting or something I can set?

    I took a look at Tim Dexter's blog as suggested and the sample worked, but for the elements in the xml file not for the value coming from the database, however this is good to know as well!
    I have data in the data base column which looks like this:
    'MS Applied <B(bold tag)> Mathematics</B(bold tag)>University of Southern California'
    I want the data to be rendered like this:
    'MS Applied <B>Mathematics</B> University of Southern California'.
    In Report Builder on the property sheet I would set Contains HTML Tags property to Yes and the report would render correctly.
    In BI Publisher 10.1.3.4 I can not seem set it to read this I have change the configure properties of the report to Character set to HTML and Make HTML output accessible to True. I just can't figure out what I'm missing.
    Thank you for any assistance you can offer.

  • How to exlcude HTML Tags from Excel Reports

    Hi Guys
    Within Project Online - OData extract to Excel
    Has anyone found a way to eliminate the HTML tags from Multi Line Text fields within Project Server? I can easily extract the text and generate nice Excel Reports, but the html tag is very annoying in the Excel Reports and it doesn't read easily.
    Any help would be appreciated.
    Marc Soester [MVP] http://marcsoester.blogspot.com

    Marc, 
    What you could do (given that you find the required time and energy to write the lines),
    would be to replace all (!) html characters like here (http://stackoverflow.com/questions/14705605/remove-html-tags-from-cell-strings-excel-formula -
    this is one of the Excel UDF/VB-based solutions, but will not refresh in Excel Services - however there is a good list of what to replace) with PowerQuery.
    That would refresh over a PowerBI subscription in the least..
    -Ville

  • How to aviod html tags from Report column heading while export to csv

    Hi All,
    How to aviod html tags from Report column heading while export to excel.
    We used like Employee<br> Department in column heading, but the problem is the <br> tag also exporting into csv file.
    If any column data 3/2009 formatt the it will exporting as marh 2009.
    Please help on this.
    Thanks,
    Nr
    Edited by: pnr on Jul 5, 2011 5:00 AM

    Hi Nr
    Here is how I approached this problem.
    Go to report attributes tab
    under column attributes check PLSQL radio button.
    Create a function to return the heading of your report as shown below in your database.
    create function get_heading return clob as
    v_request VARCHAR2(20) := V('REQUEST');
    v_col_heading CLOB;
    begin
    IF INSTR(v_request,'FLOW_EXCEL_OUTPUT',1) > 0 THEN
    v_col_heading := 'Employee Number:Employee Name';
    ELSE
    v_col_heading := 'Employee breaktag Number:Employee break tag Name';
    END IF;
    return v_col_heading;
    end;
    Type the function below under ( Function returning colon delimited headings:) as follows.
    return get_heading;
    Similarly for data base it on PLSQL function body returning SQL and follow the same approach as headings.
    Hope this helps.
    Thanks
    Sukarna
    Edited by: user513776 on Jul 5, 2011 2:24 PM
    Edited by: user513776 on Jul 5, 2011 2:27 PM

  • 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

  • Way to remove HTML tags from a page-scoped attribute using JSTL?

    Hi,
    I'm using JSTL 1.2 with Tomcat 6.0.26. Does anyone know of a way to remove HTML tags from a page attribute, "${myExpr}". I would prefer a solution that uses JSTL only, but ultimately whatever gets the job done is fine with me.
    Thanks, - Dave

    I'm sorry, I don't understand your requirement. What do you mean by "remove HTML tags from a page attribute"?
    If you are dealing with a value of an attribute, it is most likely a String, and should be treated as such. The best approach would probably be java coding.

  • How to extract HTML page from the internet

    i am new to java, i wish to know how to extract Html page from the internet and also how to identify the differences between the images and text information?

    You can create a java.net.URL that points to the file you want to "extract" and read the HTML code (or what ever that file contains) from there using the inputstream given by URL.openStream().
    The difference between images and text... well, images are embedded in html using the img-tag. example: <IMG src="http://forum.java.sun.com/images/reply.gif" alt="Reply">. Attributes width, height, alt are sometimes left out and there may or may not be quotes around the values and everything is case insensitive... you'll be having hard time trying to parse the input so I'd suggest using existing parsers.
    What are you trying to do anyway? You can load a URL directly to a JTextEditorPane with the setPage(URL page) method...

  • How to remove available downloads from the list

    how to remove available downloads from the list without it resuming when i open itunes or check for available downloads?

    There is not a way to remove them from the list.  Just let them download, and then delete them from your library when they are done.

Maybe you are looking for

  • Having a problem with drawImage() and dont know why...

    OK, I'm having some problems drawing my image onto the frame.. It will let me draw string, add components, etc.. but as soon as it come to trying to draw an image it just doesn't wanna.. Here is my code: import java.awt.*; public class Messenger exte

  • Reg:Variant Dependencies & Pricing

    Hi Gurus, I have configured up to the below mentioned steps. 1.Creation of Material Master Record with required settings 2.Creation of Characteristic and it's values 3.Craetion of class 4.Assign characteristics to Class 5.Create configuration profile

  • One Computer--Authorized All 5 Times?!

    I just got a new Mac (MacBook) and installed the new iTunes to it so that I could sync up my new iPod Touch as well. I downloaded three applications for my iPod touch but it wouldn't sync them with the ipod because it said I hadn't authorized them. S

  • How to handle 2 semanticaly different characters with same master-data?

    Hi specialists, I've got a little moddeling problem - here's the szenario: I've got a cube with a dimension "Customer". This dimension shall have the following characteristics - CustomerNumber (0Customer), - Region_Cust (0Region (or reference of 0Reg

  • İ have an hp 3052 all in one.how can i get print out with ipad or iphone?

    İ have an hp 3052 all in one.how can i get print out with ipad or iphone?