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

EDITOR,HTML Table borders and PDF Export

1 Answer 207 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Luka
Top achievements
Rank 1
Luka asked on 13 Jan 2014, 01:50 PM
Hi! I'm just back from solving a problem with HTML Table borders when being exported to PDF by editor. It seems that the PDF exporter has a bug or a feature :D that makes the border property of the <TABLE> element for the outline border. So that means you need to give borders to every <TD> element that needs one. But if you put them where the outline is, you'll have an ugly extra/double bolded border. If you dont want that you have to specify borders for every TD element that is not outlined by the border property of the <TABLE> element. I know that telerik knows of this bug since when you copy paste a table from MS Word the editor makes tables in the same fashion (they remove some left,right,top borders...). Is this gonna be fixed or should I template my tables for exporting like that?

EDIT (how i came to this problem):

The problem comes when you have custom tags in the editor (e.g. <CustomerTable type=7>). I replace these tags with live data from DB and generate a document like this:

editor_doc.Content = myTemplate.GenerateDocFromTemplate(customerID, editor_doc.Content)
editor_doc.ExportToPdf()

I run a GenerateDocFromTemplate method which just replaces all of the custom TAGs so you're not using the "copy-paste" method  described above. That's where the problem comes.

This really should be documented.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 15 Jan 2014, 12:01 PM
Hello Luka,

The Export To PDF functionality comes from a third-party library that has some known limitations that are already documented in this help article.

We are aware that some of our users would need more advanced functionality and this is why we provide an approach to set a custom or another third-party library for this feature

Regards,
Ianko
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.
Tags
Editor
Asked by
Luka
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or