Invalid XHTML. RadEditor content should be correct XHTML in order to export to PDF

6 posts, 0 answers
  1. John
    John avatar
    7 posts
    Member since:
    Jun 2009

    Posted 01 Dec 2011 Link to this post


    Hello, i am sending the html code of a page to display it in a radeditor so i can export it to rtf or to pdf. However, i'm getting this error:


    Invalid XHTML. RadEditor content should be correct XHTML in order to export to PDF.
    Parse error:
    Declaración DTD inesperada. Línea 674, posición 13.
    at line:
    <body><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">



    this is how my radeditor is defined:
    <telerik:RadEditor ID="redCertificate" runat="server" Width="90%" Height="800px"
                    Language="es-ES" onexportcontent="redCertificate_ExportContent">
                    <exportsettings openinnewwindow="true" filename="Certificate">
                    <Rtf PageHeader="RadEditor content" />
                </exportsettings>
                    <content></content>
                </telerik:RadEditor>

    and this is the code behind

    protected void btnPDF_Click(object sender, EventArgs e)
            {
                redCertificate.ExportToPdf();
            }

    Any ideas what could be causing this error?

    thanks in advance
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Dec 2011 Link to this post

    Hello,

    Take a look into the following demo.
    Editor / Export to PDF

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. J2K
    J2K avatar
    33 posts
    Member since:
    Sep 2005

    Posted 18 Dec 2012 Link to this post

    Have the identical problem, and always have had this issue with PDF export feature used by Telerik.  Using the Rad Editor, I check W3C validation service which reports document was successfully checked as XHTML 1.0 Transitional, but when exporting to a PDF using Telerik's export, the yellow page of death appears. Using the Dec 2012 version of Telerik controls.  


    This document was successfully checked as XHTML 1.0 Transitional!

  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 19 Dec 2012 Link to this post

    Hi,

    My suggestion is to start to remove content until you find which tag/class or style is causing the problem. You can find unsupported scenarios in the following help article: PDF Export, e.g.

    • Image transparency

    • Right-to-left fonts

    • Nested DIV elements with absolute position

    • Nested DIV elements with specified width or height

    • Automatic text clipping

    • Client-side binding

    • Medium trust

    If you are unable to find the reason for the problem, please, provide the problematic content for examination on our end.


    Best regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. ADV Dev
    ADV Dev avatar
    5 posts
    Member since:
    Dec 2013

    Posted 11 Jan 2015 in reply to Rumen Link to this post

    Hi,

    Any ETA on when Automatic text clipping will be implemented in PDF export.

    Kind Regards,

  7. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 14 Jan 2015 Link to this post

    Hello,

    There are no firm plans for this to be updated with the currently used PDF exporting functionality. In the feature a new PDF generator will be used, but there is no firm estimation when this will happen. 

    Currently, I can suggest extending the PDF exporting functionality by  using a custom or third-party PDF library. You can refer to this blog post for further details on the matter - Using an external library for the export to PDF functionality in Telerik’s ASP.NET Editor.
     
    Regards,

    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017