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

Inability to 'Export To PDF' when using CSS Table Styles available by default

1 Answer 372 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 25 May 2016, 02:51 PM

Greetings!

So the title sort of says what we're experiencing - we're using the radEditor in an area of our application to create html "letter bodies" that are then saved to the database and can eventually be converted to a PDF format via the ExportToPDF function included in the Telerik assemblies.  The issue occurs when we attempt to "export to PDF" a letter that contains a table which we have applied a CSS style to (all testing so far has been done with the CSS Styles available from the dropdown by default).  This table styling appears to work correctly when it is selected in the editor, and affects the table correctly in the preview, but when the body is ultimately converted to a PDF, the css of the html is included as text rather than as styling on the table as expected. 

So my questions are two-fold:

Is this a known issue in the ConvertToPDF function that is included in the Telerik product? (an inability to convert inlike css to the applicable style) And if so,

Can you recommend an alternative PDF converter that might support this functionality?

Thanks,

 

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 26 May 2016, 07:30 AM
Hello Josh,

Testing with the table styles in this demo (http://demos.telerik.com/aspnet-ajax/editor/examples/import-export/pdf-export/defaultcs.aspx), the PDF generated seems fine.

However, in the demo, in the description, it is noted that full HTML page is not supported. If the table styles are inside the head tag they will definitely be disregarded. This, however, is only a guess as I am not well aware how the styles are applied in the HTML content you use and how to possible recreate the same situation so to provide a better answer. 

Possible alternative of the built-in export-to-PDF functionality is incorporating RadWordsProcessing and RadPdfProcessing for exporting PDF—http://www.telerik.com/support/code-library/extending-the-radeditor-pdf-exporting-with-pdfformatprovider.

Another option is using RadClientExportManager—http://demos.telerik.com/aspnet-ajax/client-export-manager/overview/defaultcs.aspx.

Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
Josh
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or