Page 1 of 1
HTML with styles in PDF export
Posted: Tue Jan 24, 2012 9:54 am
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.
HTML with styles in PDF export
Posted: Wed Jan 25, 2012 3:07 am
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.
HTML with styles in PDF export
Posted: Wed Jan 25, 2012 7:38 am
by yoyo
Thank you.
HTML with styles in PDF export
Posted: Mon Jan 30, 2012 5:08 pm
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??
HTML with styles in PDF export
Posted: Thu Feb 02, 2012 3:34 am
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.