Quantcast
Channel: HTML Renderer
Viewing all 693 articles
Browse latest View live

Created Unassigned: Corrupted colspan makes columns appear in top left corner of document. [9108]

$
0
0
<html>
<body >
<table>
<tr>
<td>Test</td>
<td colspan="3">8 570</td>
<td>Test</td>
</tr>
<tr>
<td colspan="4">1 449</td>
<td>1 187</td>
</tr>
</table>
</body>
</html>

Created Unassigned: Exception on Windows Universal [9109]

$
0
0
On windows universal there is no WebClient avaliable. It throws an exception inside SetHtml All referencesz should be converted to WebRequest.

Exception thrown: 'System.TypeLoadException' in HtmlRenderer.dll
AppError:System.TypeLoadException: Could not load type 'System.Net.WebClient' from assembly 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
at TheArtOfDev.HtmlRenderer.Core.Handlers.ImageDownloader..ctor()
at TheArtOfDev.HtmlRenderer.Core.HtmlContainerInt.SetHtml(String htmlSource, CssData baseCssData)

New Post: How to embed fonts using HtmlRenderer.PDFSharp ?

$
0
0
Hi,
I'm using HtmlRenderer.PDFSharp to render to pdf file but how do I embed the fonts into the pdf?
I'm testing using the 02.Text.htm file.
The sample WinForm app works fine but when I code it myself, some characters became rectangles.

I also tried a file with Simplified Chinese and it all came out rectangles.

Any ideas?
Thanks.

New Comment on "Documentation"

$
0
0
Hi Naimishmakwana, I needed this as well so I threw together a quick example https://github.com/DenisPitcher/HTML-Renderer/blob/master/Documentation/PDFGeneration.md Denis

New Post: Page Break Always is not functional

$
0
0
Hey guys,

I'm inserting a div element with the attribute page-break-always: after to force a page break from that point and separate the content before with the content after. This should result in multiple pages, however the converted PDF document I receive does not produce the page break as expected.

Please fix this issue, I'm using the GeneratePdf method in namespace, TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator, passing in the html string and configurations.

Best regards,

Adhy

Created Unassigned: Page Break Issue - Unable to recognise page-break-after [9110]

$
0
0
I have tried inserting a div element to my HTML string with the attribute page-break-after: always, which should separate content and render multiple pages for the end PDF conversion. However, the end result does not separate the document into multiple pages as forced using the div element. This is the snippet:

"<p><strong>PAGE ONE</strong><br />
<br />
What is Lorem Ipsum?</p>

<p><strong>Lorem Ipsum</strong>&nbsp;is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an<br />
<br />
<strong>Lorem Ipsum</strong><br />
&nbsp;</p>

<div style="page-break-after: always"><span style="display: none;">&nbsp;</span></div>

<p>PAGE TWO</p>
"

Please fix this issue, thanks in advanced!

Regards,

Adhy

New Post: Left margin applies to second line of bullet

$
0
0
When trying to render the following bullet item the bullet gets a left margin of 20px as it should but when the text goes to the next line, it is again indented.
<ul style="width: 100px">
<li style="margin: 0 0 0 20px">asdf asdf asdf asd fas df </li>
</ul>

Commented Feature: Support image align\floating [8840]

$
0
0
http://www.w3schools.com/tags/att_img_align.asp
Comments: @ArturTep, any update on the possibility of this feature?

New Post: CSS3 Support

$
0
0
Are there any plans to support CSS3 and what might be the timeline for its release?

New Post: How to generate PDF with footer and page numbers?

$
0
0
Hello!

Thank you for the geat work!
I too join the question, is there any tools to customize PDF (header, footer, pages etc)?

New Comment on "PDF generation"

New Post: Use an existing PDF as template

$
0
0
Hi there,

is it possible to open an existing PDF as a template, and place the html on that template?
I can't find a way to do that.

Created Unassigned: Rowspan and colspan together [9111]

$
0
0
Rendering table with first top cell on the right contained colspan and rowspan together couses an issue (cell is not merged in two dimensions - there are borders in the center of cells - looks very weird). Fo example: first cell row has rowspan='5' and next first cells in next 5 rows have colspan='2'.

Edited Unassigned: Rowspan and colspan together [9111]

$
0
0
Rendering table with first top cell on the right that cointains colspan and rowspan together couses an issue (cell is not merged in two dimensions - there are borders in the center of cells - looks very weird). Fo example: first cell row has rowspan='5' and next first cells in next 5 rows have colspan='2'.

Edited Unassigned: Rowspan and colspan together [9111]

$
0
0
Rendering table with first top cell on the left that cointains colspan and rowspan together couses an issue (cell is not merged in two dimensions - there are borders in the center of cell - looks very weird). Fo example: first cell row has rowspan='5' and next first cells in next 5 rows have colspan='2'.

New Post: Script injection threat?

$
0
0
Hi,

I'm considering using this project to render HTML coming from an end-user rich text editor into images to display in reports. I'll use the HtmlRender.RenderToImage() method.

From a security perspective I just want to ensure nothing bad could happen e.g. if an end-user somehow injected malicious JavaScript into the HTML. I can't find any documentation in relation to this. Is this a risk and if so does HTML Renderer protect against it?

Can someone familiar with HTML Renderer share their thoughts on this?

Commented Unassigned: Strong Name Assemblies Error [9095]

$
0
0
I am trying to use PDFSharp in our project but it seems that the assemblies are not signed and we get compile error in our project

Error 3 Assembly generation failed -- Referenced assembly 'HtmlRenderer' does not have a strong Error 2 Assembly generation failed -- Referenced assembly 'HtmlRenderer.PdfSharp' does not have a strong name

Comments: I'm also hitting this issue. I want to use HTML Renderer to render HTML as images in SQL Server Reporting Services (SSRS) reports. The problem is that SSRS is quite secure in the way it needs to be extended so it would allow for a much simpler/cleaner solution if the HTML Renderer DLLs were strong name assemblies.

New Post: CSS word-break : break-word vs break-all

$
0
0
I have a situation where I have td elements with a fixed width. If a word happens to be long enough that it will exceed the width of the cell, it will be placed on a new line.

However, if there is a single word on the new line, and that word exceeds the td width, that word will go past the boundary and be cutoff.

word-break:break-all takes care of this by breaking the word at the first letter that crosses they boundary, but word-break:break-word takes the whole word and moves it to the next line.

Is there any way to have the best of both worlds? I want the break-word functionality but I would like break-all if there is only one word on a line that exceeds the boundary.

Thanks!

Created Unassigned: Method not found: 'Void TheArtOfDev.HtmlRenderer.Core.HtmlContainerInt.SetMargins(Int32)' [9112]

$
0
0
Error:
```
Method not found: 'Void TheArtOfDev.HtmlRenderer.Core.HtmlContainerInt.SetMargins(Int32)'.
Instances of this error (10)
1. Hide Call Stack
at TheArtOfDev.HtmlRenderer.WinForms.HtmlContainer..ctor()
at TheArtOfDev.HtmlRenderer.WinForms.HtmlPanel..ctor() in myFolder\HtmlRenderer.WinForms\HtmlPanel.cs:line 121
```

I was using HTML-Renderer for few weeks now and I have no problems before, but now instead of opening design of Forms with HtmlPanel in it, this weird error is there for each HtmlPanel in Form.
Application can be started and debugged step by step to HtmlContainer line 56: `_htmlContainerInt.SetMargins(0);` to HtmlContainerInt line 454:
```
public void SetMargins(int value)
{
if (value > -1)
_marginBottom = _marginLeft = _marginTop = _marginRight = value;
}
```
Everything is OK application run normally. At run time if found method as expected, even `F12 Go To Definition` work.
But designer not work, I already try to clean solution, rebuild, reboot system.
Thanks in advance for your help.
[I already post this on github.com](https://github.com/ArthurHub/HTML-Renderer/issues/60)

New Post: Images don't display in PDF

$
0
0
I have a fairly simple HTML page rendered via asp.net. It look beautiful in the PDF after running it through HtmlRenderer.PdfSharp EXCEPT that the images don't appear. Just the red X of a missing image in the PDF even though the web page itself does display the image correctly.

Here is my HtmlRenderer.PdfSharp code:
public void BuildPDF( string url, string pdfPath ) {
   string html = GetHTML(url);
   Byte[] res = null;
   using( MemoryStream ms = new MemoryStream() ) {
      using( FileStream file = new FileStream(pdfPath, FileMode.Create, FileAccess.Write) ) {
         byte[] bytes = new byte[ms.Length];
         var pdf = TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(html, PdfSharp.PageSize.A4);
         pdf.Save(ms);
         res = ms.ToArray();
         file.Write(res, 0, res.Length);
         ms.Close();
      }
   }
}

private string GetHTML(string url) {
   string html = string.Empty;
   HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
   request.AutomaticDecompression = DecompressionMethods.GZip;

   using( HttpWebResponse response = (HttpWebResponse)request.GetResponse() )
   using( Stream stream = response.GetResponseStream() )
   using( StreamReader reader = new StreamReader(stream) ) {
      html = reader.ReadToEnd();
   }

   return html;
}
And here is the img html that doesn't render in the PDF: <img src="images/ChartImg.png" />

How can I solve this?
Viewing all 693 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>