This is a migrated thread and some comments may be shown as answers.

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

5 Answers 84 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jaime
Top achievements
Rank 1
Jaime asked on 01 Dec 2011, 10:13 PM

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

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 02 Dec 2011, 07:05 AM
Hello,

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

Thanks,
Princy.
0
J2K
Top achievements
Rank 1
answered on 18 Dec 2012, 10:45 AM
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!

0
Rumen
Telerik team
answered on 19 Dec 2012, 02:02 PM
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.
0
ADV Dev
Top achievements
Rank 1
answered on 11 Jan 2015, 06:40 AM
Hi,

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

Kind Regards,

0
Ianko
Telerik team
answered on 14 Jan 2015, 08:13 AM

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.

 
Tags
Editor
Asked by
Jaime
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
J2K
Top achievements
Rank 1
Rumen
Telerik team
ADV Dev
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or