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

Name cannot begin with the '-' character, hexadecimal value 0x2D

8 Answers 666 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kyle Jones
Top achievements
Rank 1
Kyle Jones asked on 29 Oct 2009, 09:25 PM
Hey,

I am having problems with your ExportToPdf() method.  When I try to invoke it like you do in your demo I get this error : "

Name cannot begin with the '-' character, hexadecimal value 0x2D".  Why is this happening?



Thank,

Kyle

8 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 30 Oct 2009, 09:37 PM
I believe this is happening because your editor contains non-valid XHTML code. For more information on the exporting feature read over this article. Basically the editor content is created as a XHTML table and then converted to .pdf so if there are non-valid tags then this function will produce an error.
0
Lini
Telerik team
answered on 02 Nov 2009, 09:16 AM
Hi Kyle,

If you still get this error you might also wish to check your page encoding - try setting it to UTF8 if it is not already set to that.

All the best,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Octavio
Top achievements
Rank 1
answered on 10 Jun 2013, 06:27 AM
I got the same error  

Name cannot begin with the '-' character, hexadecimal value 0x2D

Could you update de link of the article? 

Thanks in advance!

0
Octavio
Top achievements
Rank 1
answered on 10 Jun 2013, 06:28 AM
I got the same error  

Name cannot begin with the '-' character, hexadecimal value 0x2D

Could you update de link of the article? 

Thanks in advance!

0
Danail Vasilev
Telerik team
answered on 12 Jun 2013, 03:56 PM
Hello Octavio,

Note that RadEditor's content will be rendered as an XHTML table and then convert that table to a PDF document. That requires that the rendered output is valid XHTML. If it is not, you will receive an exception that the export cannot be completed.

Therefore I can suggest you to verify that the RadEditor's content is valid. If you cannot handle that, it is better to open a support ticket and send us a fully runnable sample with reproduction steps of the issue, so we can investigate in on our side.

Regarding the link of the mentioned article it has been updated and moved to PDF Export link. Note that the RadEditor and RadGrid uses the same mechanism for PDF export so that handling similar issues may be reliable to both controls.


Regards,
Danail Vasilev
Telerik
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 the blog feed now.
0
kamii47
Top achievements
Rank 1
answered on 26 Jun 2013, 01:39 PM
I am also getting same error.
0
Danail Vasilev
Telerik team
answered on 28 Jun 2013, 02:33 PM
Hello Kamran,

As already mentioned in this forum thread - such problem might occur if the content that you are trying to export is not XHTML compliant. Could you please verify that this is the case? If so, I recommend you to check the content of the editor using the W3C Validation dialog and correct the errors.

Also, you might wish to check your page encoding - try setting it to UTF8 if it is not already set to that.

If non of the above solves the problem, could you please provide the problematic content so we can investigate it locally?

Regards,
Danail Vasilev
Telerik
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 the blog feed now.
0
RJ
Top achievements
Rank 1
answered on 04 Nov 2015, 11:40 AM

Getting the same error.

This document was successfully checked as XHTML 1.1!
Result: Passed 
File: Use the file selection box above if you wish to re-validate the uploaded file RadEditorContent.html
  
Modified: (undefined)
Server: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko
Size: (undefined)
Content-Type: text/html
Encoding: utf-8 
Doctype: XHTML 1.1 
Root Element: html
 
OptionsShow Source Show Outline List Messages Sequentially Group Error Messages by Type
Validate error pages Verbose Output Clean up Markup with HTML-Tidy
Help on the options is available.
 
Congratulations
The uploaded document "RadEditorContent.html" was successfully checked as XHTML 1.1. This means that the resource in question identified itself as "XHTML 1.1" and that we successfully performed a formal validation of it. The parser implementations we used for this check are based on OpenSP (SGML/XML) and libxml2 (XML).
 
"valid" Icon(s) on your Web page
To show your readers that you have taken the care to create an interoperable Web page, you may display this icon on any page that validates. Here is the HTML you could use to add this icon to your Web page:
 
Valid XHTML 1.1
  <p>    <a href="http://validator.w3.org/check?uri=referer"><img      src="http://validator.w3.org/http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" /></a>  </p>  A full list of icons, with links to alternate formats and colors, is available: If you like, you can download a copy of the icons to keep in your local web directory, and change the HTML fragment above to reference your local image rather than the one on this server. See also our help items related to documents transferred over secure protocols for these icons and the "uri=referer" feature.
 
Validating CSS Style Sheets
If you use CSS in your document, you can check it using the W3C CSS Validation Service.
 
↑ Top
 
Source Listing
Below is the source input I used for this validation:
 
1.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
2.<head> <title>Validation Results</title><meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8"/></head>
3.<body><div><div style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(0,0,0); padding-bottom: 0px; text-align: left; padding-top: 0px; font: 12px/12px Arial, Verdana, Tahoma; padding-left: 0px; margin: 0px; widows: 1; letter-spacing: normal; padding-right: 0px; background-color: rgb(242,247,253); text-indent: 0px; -webkit-text-stroke-width: 0px;">
4.<div style="white-space: normal; word-spacing: 0px; text-transform: none; color: rgb(0,0,0); padding-bottom: 0px; text-align: left; padding-top: 0px; font: 12px/12px Arial, Verdana, Tahoma; padding-left: 0px; margin: 0px; widows: 1; letter-spacing: normal; padding-right: 0px; background-color: rgb(242,247,253); text-indent: 0px; -webkit-text-stroke-width: 0px;"><span class="report_results_author" style="font-size: 12px; vertical-align: top; font-weight: bold; margin-left: 5px;">Martial Bayron</span> <span class="Apple-converted-space"> </span><span class="report_remarks_date" style="font-size: 11px;">11/02/2015 10:36:48 PM<span class="Apple-converted-space"> </span></span><span class="remupd" style="width: auto; float: none; text-align: left; padding-top: 5px; font: italic 11px Arial; font-stretch: normal;">  Last edited by Juan De la Cruz on 11/02/2015 at 10:38 PM</span></div>
5.</div></div></body>
6.</html>

 

 

Tags
Editor
Asked by
Kyle Jones
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Lini
Telerik team
Octavio
Top achievements
Rank 1
Danail Vasilev
Telerik team
kamii47
Top achievements
Rank 1
RJ
Top achievements
Rank 1
Share this question
or