HTML Handling in PDF

40 posts, 0 answers
  1. Bruce Parr
    Bruce Parr avatar
    11 posts
    Member since:
    Feb 2009

    Posted 06 Oct 2006 Link to this post

    All,

    I am just slightly confused about the PDF output described in the information available so far.

    We are using ActiveReports 2.0 for .NET to report data that has been entered using RAD Editor and are having fits because of the insane limitations of their HTML rendering in PDF documents. What has happened is their engine will encounter HTML tags it can't understand so it just quits rendering.

    1) How will PDFs be handled? As an export from the visible report? As a native viewer with the document directly rendered to PDF (like ActiveReports)?
    2) Currently HTML code is very limited in ActiveReports. Will Telerik Reporting handle all the tags the RAD Editor supports? This is KILLER important. We have users importing into RAD Editor from MS Word and half the time AR just chokes and dies. To top it off, we are left to guess as to where the error occured in the report since their stack trace is totally encrypted.

    Suffice it to say after absolutely pulling our hair out with ActiveReports, we would love something that works as advertised. If you hit a homer as you have with RAD Editor and RAD Combo, which we also use, we are in...

    Thanks,
    B
  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 09 Oct 2006 Link to this post

    Hello Bruce,

    Support of HTML (and RTL) is quite important and we will provide it for sure. The first version probably won't be able to render HTML and RTF text in the WinForms viewer and PDF as the both HTML and RTF require extra efforts for processing and rendering than plain text with the built-in styles. Nevertheless, we will provide HTML and RTL support in the versions following the first one.


    Best wishes,
    Svetoslav
    the telerik team
  3. DevCraft banner
  4. Rob
    Rob avatar
    13 posts
    Member since:
    Jan 2004

    Posted 11 Oct 2006 Link to this post

    I'm very glad to hear Telerik will support HTML rendering in PDF reports.  I agree that ActiveReports does a terrible job with this and Telerik could easily capitalize on that.
  5. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 13 Oct 2006 Link to this post

    I also have a need to render HTML from the rad editor into reports (pdf export especially), so I'm glad to hear this also. 
    It's not an easy feat from what I understand.  I'm looking forward to it.
  6. mano
    mano avatar
    2 posts
    Member since:
    Jun 2006

    Posted 02 Nov 2006 Link to this post

    I'm really looking forward to this feature. This is a simple feature but its not possible to do in MS Reporting Services at all. Telerik, you guys rock!!!
  7. Paul O'Brien
    Paul O'Brien avatar
    2 posts
    Member since:
    Jun 2005

    Posted 08 Nov 2006 Link to this post

    I too, would like to stress the importance of the HTML to PDF functionality.  Consider an asp.net web application using the telerik RADEditor to take input from the user, store it in a SQL server database and render it using the telerik reporting component while providing the ability to export to PDF the exact HTML from the RADEditor.  Seems like this is a requirement that no-one is doing very well out there in the market place.  Crystal seems to be the closest with their 'html text interpretation' but support for HTML is limited.  How will telerik meet this challenge!?!
  8. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 08 Nov 2006 Link to this post

    Hi guys,

    Handling HTML in PDF is far from simple, and this is why all companies offering this feature have so much problems. This is an enormous engine, probably comparable to a browser's HTML engine, so the task is not trivial at all.

    It is still very early to talk about a HTML to PDF converter in our tool as we have several essential features to add to the telerik Reporting. The suggestion is logged and we will have your feedback in mind. At this time we cannot commit with any deadlines.

    BTW, what do you think of the first CTP version? Do you find it stable, promising, lacking? Please, share your feedback as we are eager to hear your experiences.

     
    All the best,
    Rob
    the telerik team
  9. William Finnegan
    William Finnegan avatar
    7 posts
    Member since:
    Mar 2006

    Posted 15 Mar 2007 Link to this post

    i want to add my 2 cents to this thread to ensure Telerik realizes many developers are currently using ActiveReports but are  trying to find something more user friendly. We also let our users enter case into our site using your html editor. Now we'd like to generate a report combined all the case notes collected.  HTML support in reports is mega important for us and would make us drop ActiveReports asap if telerik supported it.

    Thanks
  10. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 20 Mar 2007 Link to this post

    Hi William,

    Thank you for the feedback.

    We are planning for this feature in version 2 of telerik Reporting.

    Regards,
    Rossen
    the telerik team
  11. joeolsen
    joeolsen avatar
    6 posts
    Member since:
    May 2007

    Posted 03 Jun 2007 Link to this post

    When are you expecting version 2.  This is a primary need of ours.  I am guessing it's also a primary need of many of the Telerik reporting community.

    Is there anything we can do to expedite this?

    Thanks.

    JJO
  12. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 04 Jun 2007 Link to this post

    Hi joeolsen,

    Thank you for your willingness to help us and create a better and more powerful product.

    Last week we released Telerik Reporting 1.0 SP1 and we're currently discussing the plans for the next versions. When ready we'll publish the Roadmap for the next version(s). This year will see one more service pack for the reporting, but we are still unsure when exactly v2 will appear.
     
    As we've already received a lot of requests for this feature we'll do our best to implement the HTML rendering in the upcoming service packs, but with limited functionality - you know the HTML and CSS are very extensive and complicated standards.

    The only thing that can speed up the process is to send us any ready-to-use solution that we can embed in our application (there are number of 3rd party products available on the market but we need to integrate the HTML rendering in our PDF rendering engine). You can send it in a new support ticket.
     

    Sincerely yours,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. joeolsen
    joeolsen avatar
    6 posts
    Member since:
    May 2007

    Posted 04 Jun 2007 Link to this post

    Thanks guys for the update.  We are using a control called WnvWebConverter (http://www.winnovative-software.com/) right now to convert html to PDF.  It also converts html to an image file (jpg, gif, png, etc..).  It's a .NET component and it's really easy to implement (8-10 lines of code).

     

    You may be able to take a look at that as an example.  May also be something you can license.  I am sure there are other libraries available on the market, but that one is cheap and it works fantastic.  I have not found a piece of HTML that does not render correctly.

    What we are doing is creating a "report" in an aspx page and then using another caller page using:

    WebRequest request = WebRequest.Create("http://localhost/pbcs/casestudytemplate.aspx?ID=" + Request.QueryString["ID"].ToString());

    WebResponse response = request.GetResponse();

    Stream s = response.GetResponseStream();

    downloadBytes = wnv.RenderPDFReportBytesFromHtmlStream(s,System.Text.Encoding.Default);

    s.Close();

  14. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 05 Jun 2007 Link to this post

    Thank you very much for sharing, joe, we will surely review the WnvWebConverter. Your points have been updated for the feedback.

    Guys, if you are using other tools, please share them here so that we can review them, and get a hold of what is of most interest for you.


    Greetings,
    Rob
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  15. Jeremy Wadsworth
    Jeremy Wadsworth avatar
    41 posts
    Member since:
    Mar 2006

    Posted 01 Oct 2007 Link to this post

    I would like to add my vote for this feature. We currenlty use Active Reports as well and are looking for a solution that would allow us to print website content to pdf. Here is a control we've used that is pretty slick.

    http://www.websupergoo.com/abcpdf-1.htm

    Thanks,
    Jeremy
  16. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 02 Oct 2007 Link to this post

    Hi Jeremy,

    Thank you for your feedback. We're currently researching several possible solutions of the problem and we'll choose the best that suits us all best.
     

    Sincerely yours,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  17. Daniel
    Daniel avatar
    1 posts
    Member since:
    Feb 2008

    Posted 27 Feb 2008 Link to this post

    Did this ever get added?  I looked through the release notes and didn't see anything about it.

  18. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 28 Feb 2008 Link to this post

    Hello Jeremy Wadsworth,

    To my greatest regret, we still lack this functionality. As we have already explained in the previous posts in this and other similar threads this is quite complicated task. Adding more and more export formats makes it even harder. With the Excel in the list of the supported formats and RTF/Word on the way, you see that we should support HTML in all format - not only in PDF.

    I hope you understand how different are the various formats and how complex is the "HTML Handling in PDF". Nevertheless, I am confident that we have the strength and the motivation to work on this functionality soon.

    Kind regards,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  19. Bruce Hochstetler
    Bruce Hochstetler avatar
    155 posts
    Member since:
    Apr 2007

    Posted 15 Oct 2008 Link to this post

    Hi Guys,

    Another product that does HTML to PDF conversion that's free is iTextSharp...

    I haven't used it, but may be useful.

    Oh, and I'm still waiting on the rich textbox!!!

    Thanks,
    Bruce
  20. Gaurish
    Gaurish avatar
    9 posts
    Member since:
    Oct 2008

    Posted 18 Oct 2008 Link to this post

    Hi 
        I have used Telerik Reporting Q2 2008 , I also want  HTML Handling in PDF. Because I have created report depend upon E-mail from the user some times it will be in HTML formate, so any solution for this proble in Telerik Reporting Q2 2008 .


    Thanks
  21. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 20 Oct 2008 Link to this post

    Hello rohan,

    We have a rich textbox item in the works and it would be available for one of the subsequent versions of Telerik Reporting. Initially it would handle only a limited number of html tags - thus the name rich textbox and not html. For the time being please use the approach from this KB article to avoid html markup in other formats.

    Kind regards,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  22. Gaurish
    Gaurish avatar
    9 posts
    Member since:
    Oct 2008

    Posted 20 Oct 2008 Link to this post

    Thanx a lot for help. I am able to generte the reprot with html content. But when I try to export it to PDF then it cannot render the HTML. Am I missing something ?

  23. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 20 Oct 2008 Link to this post

    Hi Rohan,

    I am afraid you have missed the point of the article - please review its description once again:

    "Currently Telerik Reporting does not operate with HTML content. Exception is when the report is rendered in HTML because the browser that usually displays the report, handles the HTML itself. Unfortunately the rest of the supported formats - Image (GDI), PDF, XLS, RTF do not support HTML out of the box and we're still looking for possible ways to implement our own HTML rendering in most of the supported export formats."

    Kind regards,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  24. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 10 Jan 2009 Link to this post

    Hi:

    "Currently Telerik Reporting does not operate with HTML content. Exception is when the report is rendered in HTML because the browser that usually displays the report, handles the HTML itself."

    Technically, this is not even true.  I have a Telerik report (with lots of complext html content) displayed on a web page, but when I print the report directly using the web browser's 'print' button, all the html codes are printed 'as is' and the format of the report is all ruined. We can print all kinds of web pages with all kinds of html codes directly from the IE and have the format of the webpage preserved nicely, I don't understand why the whole thing breaks when it comes to a Telerik report. 

     

    Again, I emphasize that I'm not exporting the report anywhere, I'm just trying to print it directly from the browser, like I do with other web pages. So I guess I'm hoping for a clearer explanation than what was stated in the last thread.

    Thanks

    Justin

  25. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Jan 2009 Link to this post

    Hello Justin,

    The statement you have quoted in the beginning is correct and your explanations further down confirm it. Printing through the browser would mean that the html page is printed and it is basically WYSIWYG kind of thing. During this process, any html markup represented in the browser with some kind of visual representation would be printed exactly as shown - this goes out for html markup in the ReportViewer as well. I've attached ready for print page from One Note for your convenience.
    Exporting the report to a different format is a completely different thing and support for html for the item responsible for handling it is required.

    Greetings,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  26. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 12 Jan 2009 Link to this post

    Hi Steve:

    Let's pretend that I will NEVER export the content of the ReportViewer (just to make things easier, because the problem I experience has NOTHING to do with exporting).

    I generated a page and view it in report viewer: The page contains all kinds of html codes I placed in there programmatically and it is showing up fine.  I then hit the 'Print' button that is BUILT IN THE REPORT VIEWER.  The page gets send to the printer - and it's complete garbage:   All the html elements are printed as text, and the format of the page - which I can see from the Report Viewer - is all gone. 

    As far as I am concern, NO exporting has been done - just strict printing, and yet still the html codes are NOT handled properly through the Viewer.

    Thanks.

    Justin
  27. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 12 Jan 2009 Link to this post

    Hello Justin,

    Ahaaa! Using the ReportViewer's print button and not the browser's button was the missing key of information for your scenario. We use the Adobe Plugin (if available) when printing and the user has the option to select the printer he would like to use. So when printing through the ReportViewer you are doing export to pdf internally and then show the exported file in the acrobat print preview. In order to change that behavior you can replace the default action by overriding the PrintReport function of the ReportViewer and use the PrintAs() client-side method with Default passed as argument so that it would always use the browser printing capabilities.:

     <telerik:ReportViewer ID="ReportViewer1" runat="server" >
            </telerik:ReportViewer>
        <script type="text/javascript">
            ReportViewer.prototype.PrintReport = function()
            {
              this.PrintAs("Default");
            }
        </script>  

    Hope this helps.

    Regards,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  28. Paulo
    Paulo avatar
    5 posts
    Member since:
    Sep 2007

    Posted 12 Jan 2009 Link to this post

    Hello.

    I just faced the same problem.

    Is there a way I can read a text or varchar, containning html code, from the database and then, inside the report, remove all html code? You have any function that does this?

    Otherwise I'll have to save 2 text fields in the database, the Content and the Text properties from RadEditor so I can use one at a time. In normal situations thats not a problem, but right now I have a project in production where I'm adding reports. If I go for this sollution now it will be a massive amount of coding since the project is quit big now and uses RadEditor extensivly.

    EDIT:
    As an alternative, is there anyway I can have different styles applied to text in the same textBox?

    If so, can you provide me a reference for the style configurations? I'm willing to take the time to make a parser to translate HTML formating to any kind of formating that may solve this problem, even if it takes me a couple of days it will surely be faster then adding an extra text field to every RadEditor, and it will provide a better final product to the client.
  29. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 12 Jan 2009 Link to this post

    Hi Steve:

    Thanks for the clarification.  This is unfortunate, though.  Most of the reports I generate are complex in format/structure and requires the extensive use of html elements.  So, I was hoping to rely on Telerik's Report mostly because I like the print features that come with the Report Viewer's 'Print' button. 

    But if using Telerik's Print button means lossing all the html format I have in the report, then it is not worth it for me.  I look forward to the day when there is a 'true' html-capable reporting product. Hopefully, that'll come before I retire!

    Justin
  30. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 13 Jan 2009 Link to this post

    Hi guys,

    @Paulo: you can use the built-in StripHTMLTags function if needed. If you want more power at your hands you can even write your own user function to handle this for you. If urgent, you can also use a workaround as suggested in this KB article. However our devs are already working on a richtextbox item for the Q1 2009 release expected at the end of February, so if you can wait until then, you will have basic html support provided out of the box, including different styles applied to text in the same textBox.
    @Justin: as stated above, we are working on richtextbox for the Q1 release and would provide basic html handling. "True" HTML capability basically means that we would have to make our own little browser item for the reporting product :)

    Greetings,
    Steve
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  31. JustinWong
    JustinWong avatar
    147 posts
    Member since:
    Mar 2007

    Posted 13 Jan 2009 Link to this post

    That sounds great, Steve.  Could there by support for the table, div, and/or span tags?
Back to Top
DevCraft banner