HTML with styles in PDF export

Stimulsoft Reports.NET discussion
Post Reply
yoyo
Posts: 15
Joined: Tue Dec 13, 2011 9:58 am
Location: Bratislava

HTML with styles in PDF export

Post by yoyo »

Hello.
I have web formular with WYSIWYG editor (something like TinyMCE) and I need generate PDF from this form. But export to PDF dont support HTML and CSS code (only some simple tags).

For example I have XML element :
TEXT TEXT TEXT]]>
If I have settings AllowHtmlTags = true, It filters my styles. If I use StiOptions.Export.Html.ReplaceSpecialCharacters = false in HTML export it is ok but PDF is obviously unsatisfactory.

Can you please advice me, if it is possible show styled text defined by HTML + CSS code in PDF export? If it is possible please send me simple example, maybe with my html code.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

HTML with styles in PDF export

Post by HighAley »

Hello.
yoyo wrote:I have web formular with WYSIWYG editor (something like TinyMCE) and I need generate PDF from this form. But export to PDF dont support HTML and CSS code (only some simple tags).

For example I have XML element :
TEXT TEXT TEXT]]>
If I have settings AllowHtmlTags = true, It filters my styles. If I use StiOptions.Export.Html.ReplaceSpecialCharacters = false in HTML export it is ok but PDF is obviously unsatisfactory.

Can you please advice me, if it is possible show styled text defined by HTML + CSS code in PDF export? If it is possible please send me simple example, maybe with my html code.
Unfortunately, there is no full HTML support now because there is no build-in support in the .NET Framework. If this support will be added to future .Net Framework versions we will definitely include it in our product.

At this moment there is an 'Allow Html Tags' property of the text component which involves support of the simple HTML tags (text style, font, color, line spacing, alignment). All this tags display correctly in the exported PDF file.

As a workaround you could convert HTML to the RTF and use Rich Text box. But there may be several problems in big text and pdf export.

Thank you.
yoyo
Posts: 15
Joined: Tue Dec 13, 2011 9:58 am
Location: Bratislava

HTML with styles in PDF export

Post by yoyo »

Thank you.
yoyo
Posts: 15
Joined: Tue Dec 13, 2011 9:58 am
Location: Bratislava

HTML with styles in PDF export

Post by yoyo »

Thank for you reply. I tried to test which html tags are supported. But how I can define styles. If I use style="....." in html tags, and I set 'Allow Html Tags' to true, in reports show me simple text. Styles are filtred. You replied that Stimulsoft supports the simple HTML tags (text style, font, color, line spacing, alignment). But how I can define this styles? I dont understand which HTML tags do you thing about. Can you write some simple examples please?

And where I find list of HTML tags which are supported??
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

HTML with styles in PDF export

Post by HighAley »

Hello.
yoyo wrote:Thank for you reply. I tried to test which html tags are supported. But how I can define styles. If I use style="....." in html tags, and I set 'Allow Html Tags' to true, in reports show me simple text. Styles are filtred. You replied that Stimulsoft supports the simple HTML tags (text style, font, color, line spacing, alignment). But how I can define this styles? I dont understand which HTML tags do you thing about. Can you write some simple examples please?

And where I find list of HTML tags which are supported??
Please, read the '3.6 HTML Tags' section of our Universal User Manual.

Thank you.
Post Reply